> ## Documentation Index
> Fetch the complete documentation index at: https://docs.komodor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync skills from a GitHub repository

> Connect a folder in a GitHub repository as a skill source. Each skill in it syncs as a read-only skill, with a new version on every push that changes it.

Keep your skills in Git and make them available to your agents. Connect a repository folder to
your account, and the Komodor Agentic Operation Platform (KAOP) keeps it in sync: every folder with
a `SKILL.md` becomes a skill, and a push that changes one publishes a new version within about 60
seconds. The sync runs one way — the repository is the source of truth, and a synced skill stays
read-only in KAOP.

Skill sources are turned on per account. If the Skills page has no **Synced repositories** button,
ask your account team to turn them on.

## Before you connect

Make sure you have the following before you add a source:

| You need | Why |
| - | - |
| A GitHub connection installed as a GitHub App | KAOP reads the repository with the app's installation. A connection made with a personal access token is refused. See [Built-in integrations](https://docs.komodor.com/manage-your-agents/build/built-in-integrations.md). |
| **Contents: Read-only** on the repository | To read the skill files. |
| **Webhooks: Read and write** on the repository | To add the push webhook that tells KAOP about each push, and to remove it when you delete the source. |
| The installation covers the repository | An installation set to **Only select repositories** must include it. |
| `skill.create` | To connect a source. See [Permissions](#permissions). |

Sources read from repositories on github.com.

## Connect a repository

**1. Open Synced repositories**

On the **Skills** page, choose **Synced repositories**. A side drawer opens with the account's
sources, each with its state, its last synced commit and when KAOP last checked it. Add a
repository from there.

![The Synced repositories drawer, with one source listed. The source shows its repository, an In sync state, its branch, its folder and a count of four skills, then the commit it last synced, when it synced, and when KAOP last checked GitHub, and its team: sre label. Each source has Sync now, Edit and Delete buttons, and the drawer ends with Done and Add repository.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-drawer.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=696725b74d0e29a9ad817109d2920150)

**2. Describe the source**

| Field | What it is |
| - | - |
| GitHub App connection | The GitHub App installation to read with. |
| Repository | The repository that holds the skills. |
| Branch | The branch to follow. Only pushes to this branch are synced. |
| Folder path | The folder that holds the skills. Leave it empty for the repository root. |
| Labels | Optional labels every skill of the source carries. See [Labels](#labels). |

![The Add repository form, filled in. GitHub App connection and Repository are chosen from lists, Branch and Folder path are typed in, and one label, team: sre, has been added with a key and value pair. A note under the labels says they apply to every synced skill and cannot be edited on the skill. The form ends with Back and Add.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-add-repository.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=43c7086699a4e6da3a578a490456c17b)

**3. Add**

Choose **Add**. Before it saves anything, KAOP checks that the connection is a GitHub App installation, that
the installation holds both permissions on the repository, and that the repository and branch
exist. A refusal names the connection type or the permission that is missing. Once the source
is saved, KAOP adds the push webhook to the repository and runs the first sync.

An account can have several sources, and each syncs on its own. One repository can hold several
sources on different branches or folders; the same connection, repository, branch and folder can be
connected once.

Editing a source — its connection, repository, branch, folder or labels — saves the change and
syncs the source again, even when the branch has not moved.

## How the repository is read

Each skill is a folder containing a `SKILL.md` file. KAOP finds them by a fixed rule, with no
configuration and no model reading your files:

```
sre-skills/                    # the repository
├── README.md                  # outside the folder: not read
└── skills/                    # the source's folder
    ├── k8s-rca/               # one skill
    │   ├── SKILL.md
    │   ├── references/
    │   │   └── runbook.md
    │   └── scripts/
    │       └── collect.sh     # executable in Git, executable on the worker
    ├── open-pr/               # another skill
    │   ├── SKILL.md
    │   └── .gitkeep           # starts with a dot: ignored
    └── notes.md               # in no skill folder: ignored
```

* **Every folder that holds a `SKILL.md` is one skill.** Every other file in that folder and its
  subfolders, such as `references/` and `scripts/`, belongs to the skill and syncs with it.
* **A file Git marks executable stays executable** when the skill reaches an agent's worker.
* **Files and folders whose names start with a dot are ignored**, such as `.gitkeep` or `.github/`.
* **A `SKILL.md` inside another skill's folder is a file of the outer skill**, not a skill of its
  own.
* **A file in no skill folder is ignored.**
* **A skill's name** is the `name` in its `SKILL.md` frontmatter, or the folder's name when the
  frontmatter has none. A `SKILL.md` directly in the source's folder takes that folder's name, or
  the repository's name when the source is the repository root. Without a `name`, renaming a
  skill's folder renames the skill, so set `name` in every `SKILL.md` whose folder may move.

A synced skill meets the same limits as a skill created in KAOP: the size of `SKILL.md`, the number
and size of supporting files, and text files only. See the limits in
[Skills as code](https://docs.komodor.com/manage-your-agents/build/skills-as-code.md#what-can-be-managed-this-way). A skill
over a limit is skipped, as [When a skill is skipped](#when-a-skill-is-skipped) describes.

### Keep each skill's files inside its folder

A file outside a skill's folder is not part of the skill, and a link to it from `SKILL.md` does
not resolve on the worker. A link to another skill's `SKILL.md`, such as `../open-pr/SKILL.md`,
resolves only when that skill is also attached to the agent and its folder in the repository is
named after the skill, because the worker writes each attached skill as a sibling folder named
after it. KAOP does not detect or warn about either case.

Name the other skill instead of linking to its files — "open the pull request with the `open-pr`
skill" — and attach both skills to the agents that need them.

## When a push shows up

GitHub calls the source's push webhook on every push, and the pushed change is a new version
within about 60 seconds. KAOP also checks each source's branch every minute, so a push whose
webhook call was lost is still picked up.

* **Sync now** syncs a source at once and compares every skill folder, even when the branch has
  not moved. Use it after fixing what made a skill skip outside the repository, or to check a
  source without waiting.
* **A missing webhook** — the installation lost **Webhooks: Read and write**, someone deleted the
  webhook, or the repository already has the 20 push webhooks GitHub allows — does not stop the
  source. Syncs continue through the check every minute and may take up to two minutes, the source
  shows a warning, and KAOP tries to add the webhook again every hour.
* **An installation of KAOP that GitHub cannot reach** adds no webhooks, and checks every source
  every 30 seconds instead.
* **A force-push** is read like any other push: skills whose content differs get a new version,
  and no existing version changes.

## What a synced skill looks like

A synced skill carries a **Synced** badge, in the skills list and on its page. Its page shows
where it comes from in three tiles:

| Tile | What it shows |
| - | - |
| Author | The commit's author as Git records it, and the GitHub login that pushed the commit when the push webhook named one. Anyone can set a commit's author, so read it with the pusher and the verified status. |
| Source | The repository and the branch the skill comes from. |
| Commit | The commit the current version was published from, linked to GitHub; whether GitHub verified its signature; and when the source last synced. |

**View in GitHub** opens the skill's folder at that commit. It is the skill's one link to GitHub.

![A synced skill's page. Beside its name are a Synced badge, a View in GitHub button and a disabled Edit button, and under its description is its team: sre label. Three tiles follow: Author, with the commit's author; Source, with the repository and the branch; and Commit, with the short commit SHA, not verified, and when it synced. Below them are the skill's id, the agents using it, when it was updated, its file count, and its instructions.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-synced-skill.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=732737eae51ea4afbd2e89660aab905b)

### Read-only in KAOP

A synced skill is still yours to use: attaching it to an agent, pinning a version and detaching it
all work as for any skill. Changing it, though, happens in the repository. KAOP refuses each of
these, from the console, the API, the MCP server or a `Skill` resource on a management cluster, and
creates no version:

* Editing its content, name, description or labels.
* Publishing a version, or rolling back to an older one.
* Deleting it, unless it is marked **Removed from source**.
* Trying or promoting a suggested improvement to it.

The refusal names the source and links to the skill's folder in GitHub. In the console, **Edit** is
disabled with the same reason. Each refusal is recorded in the
[audit log](https://docs.komodor.com/security-and-governance/controls/audit-log.md) as `skill.edit_refused`.

### Labels

A synced skill's labels are the source's labels. Changing the source's labels changes them on every
skill of the source at once, so [label-scoped grants](https://docs.komodor.com/security-and-governance/identity-and-access/roles-permissions.md)
on a source's labels cover its skills.

## Versions

* **Only a skill that changed gets a new version.** A push that leaves a skill's folder unchanged
  publishes nothing for it.
* **A synced version needs no approval in KAOP.** It is published as soon as it is synced, and
  review happens in the repository, before the change is merged. See
  [Secure the source branch](#secure-the-source-branch).
* **Each version records** the commit SHA, its author, whether GitHub verified it, and who pushed
  it. The publish is recorded in the audit log as `skill.publish`, with the source as the actor.
* **A folder moved or renamed with the same skill name is the same skill.** Its versions, pins and
  attachments are kept, and a version is published only when the content changed too.
* **Changing a skill's name in the repository** makes it a new skill and marks the old one
  **Removed from source**.
* **Pinned agents stay put.** An agent that tracks latest gets the new version on its next run; an
  agent pinned to a version stays on it. See
  [Attaching a skill](https://docs.komodor.com/manage-your-agents/build/skills.md#attaching-a-skill).
* **A sync only adds versions.** It never changes or removes one, so a bad commit cannot take away
  a skill's last good version.

Every skill's page has a **Versions** section, after its instructions and files. For a synced skill,
each version shows the date, the commit and the commit's author.

![The Versions section at the foot of a synced skill's page, under the skill's files. The newest version, v2, is marked latest and shows its date, its short commit SHA and its author, with a View button.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-versions.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=10a6f5abc76b9028acde2a2fc7255327)

**View** opens a version with three tabs:

* **Changes in this version** shows what the version changed against the one before it, in every
  file of the skill, not only `SKILL.md`, and names the files it left unchanged.
* **Compare with current** shows how the version differs from the current one.
* **Full content** shows the version whole.

![The Version v2 dialog on its Changes in this version tab. The file references/common-causes.md is marked changed, and its diff shows one added table row. Under the diff, a line says two files are unchanged: SKILL.md and scripts/collect-logs.sh.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-version-changes.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=1d4032a6c0fca06b59393a38c51a0cbf)

## When a skill is skipped

A skill folder that cannot be synced is skipped whole: KAOP never syncs a skill without one of its
files. The skill stays on its last good version, and every other skill in the push syncs.

| Reason | What to do |
| - | - |
| A file is not text, such as an image or a compiled binary | Remove it from the skill's folder. |
| A file is over a size limit, or the folder has too many files | Trim the skill to the [limits](https://docs.komodor.com/manage-your-agents/build/skills-as-code.md#what-can-be-managed-this-way). |
| The folder holds a symbolic link or a Git submodule | Replace it with the files themselves. KAOP never follows a link. |
| `SKILL.md` fails the checks a skill created in KAOP must pass, such as an invalid name, description or frontmatter | Fix `SKILL.md`. |
| The name is taken by another skill, created in KAOP or synced from another source | Rename one of them. |
| Two folders in the source give the same skill name | Rename one in the repository. Neither syncs until then. |
| A file could not be read from GitHub | Sync again. |

A skipped skill shows in two places:

* **On the source**, which is **Partially synced** and lists each skipped folder with the file and
  the reason.
* **On the skill**, as a warning with the file, the reason and the version it stays on. A new
  skill that was skipped on its first sync exists only in the source's list.

A name clash with another skill clears itself. When that skill is renamed or deleted, KAOP syncs
every source that skipped a folder over the name, without a new push. A skill marked **Removed from
source** keeps its name until someone deletes it.

![A synced skill's page with a warning under its tiles: the last sync skipped this skill. The warning names the file, SKILL.md, gives the reason, frontmatter that is not valid YAML, and says the skill stays on version 1.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-skip-warning.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=4962f5a65245ea88afbb0ea074f10577)

![The Synced repositories drawer with a source in the Partially synced state. Its details are open, and a Skipped skills list names the skipped skill, gives the reason in one line with the full message folded under it, and links the path of the skill's SKILL.md in the repository.](https://mintcdn.com/komodor-test/jqSz5xkcyxuokMIw/figures/fig-skill-sources-skipped-list.png?fit=max\&auto=format\&n=jqSz5xkcyxuokMIw\&q=85\&s=bf988e1a0063aa286fc94e58f5d2853b)

## Source states

| State | Meaning |
| - | - |
| Syncing | A sync is running, or waiting to run after an edit. |
| In sync | Every skill folder synced at the last synced commit. |
| Partially synced | At least one skill was skipped. The source lists which, and why. |
| Error | The sync could not read the source, with the reason. |

A source shows its last synced commit and time, and when KAOP last checked GitHub for a change, so
a quiet repository can be told apart from a stuck sync.

You do not need to open the drawer to see that a source needs attention. When a source is in
**Error**, the **Synced repositories** button shows how many are. Otherwise, it shows how many
sources need attention: those that are **Partially synced**, have a skipped skill, or are missing
their push webhook.

A source moves to **Error** when the connection is revoked, the installation is removed or
suspended, the installation loses **Contents: Read-only**, the repository, branch or folder is
gone, or GitHub cannot be reached, which KAOP keeps retrying. In every case the skills stay on
their last version, usable and read-only, and the next successful sync picks up from there.

## When a skill leaves the repository

A skill whose folder is no longer in the source is marked **Removed from source**:

* Agents it is attached to keep running their current version.
* It cannot be attached to new agents.
* The source lists it with the agents still using it.
* It can be deleted — the one delete allowed on a synced skill — once no agent has it attached.
  Deleting it frees its name.

If a folder with the same skill name comes back before then, it is the same skill again: the mark
is cleared, and a version is published only if the content differs.

## Delete a source

Deleting a source stops syncing it and hands its skills over: each becomes an ordinary skill you can
edit in KAOP, with its versions, labels and attachments unchanged, and agents keep running it. A
skill that was **Removed from source** can be attached again.

KAOP removes the source's push webhook from the repository and stops accepting calls to it. If
GitHub refuses the removal, for example because the installation lost **Webhooks: Read and write**,
KAOP shows the webhook's address and a link to the repository's webhook settings: remove it there.
If GitHub could not be reached, KAOP finishes the removal within the hour. Moving a source to
another repository or connection moves its webhook the same way.

Connecting the same folder again does not undo a delete. The handed-over skills keep their names,
so every folder of the new source is skipped as a name clash until its handed-over skill is renamed
or deleted.

## Secure the source branch

> [!WARNING]
>
> Anyone who can push to the source branch changes what agents run. A push reaches every agent that
> tracks latest within about a minute, with no KAOP permission and no approval step in KAOP.
> Connecting a source is a decision to trust everyone with push access to that branch, and the
> repository's reviews are the only review a change gets.

* **Protect the branch** with required pull request reviews, so no change lands unreviewed.
* **Require code owners on the source's folder**, so the people who own the skills review every
  change to them.
* **Pin critical agents** to a version, and move the pin when you have checked a new one.
* **Keep secrets out of the repository.** Synced content is stored like any skill's content and is
  not scanned for secrets. Give agents secrets as
  [credentials](https://docs.komodor.com/security-and-governance/identity-and-access/credentials-secrets.md).

Each version records its commit and who pushed it, and KAOP accepts a webhook call only when its
signature checks. A webhook call only asks for a sync: KAOP reads the branch and the files from
GitHub with the source's own connection, never from the call.

## Permissions

A source has no permissions of its own. It uses the skill permissions.

| To do this | You need |
| - | - |
| List and read sources | `skill.read` |
| Connect a source | `skill.create` |
| Edit a source, or sync it now | `skill.update` |
| Delete a source | `skill.delete` |

A grant scoped by label covers the sources whose labels match. A grant that names a skill or a name
pattern never matches a source, which has no name.

The [audit log](https://docs.komodor.com/security-and-governance/controls/audit-log.md) records `skill_source.create`,
`skill_source.update`, `skill_source.delete` and `skill_source.sync` for a person's actions, and
`skill.create` and `skill.publish`, with the source as the actor, for what a sync publishes.

## From the API

| Call | What it does |
| - | - |
| `GET /api/v1/skill-sources` | List the account's sources. |
| `POST /api/v1/skill-sources` | Connect a source, and run its first sync. |
| `GET /api/v1/skill-sources/{id}` | One source: its state, error, last synced commit, last check, skipped skills and removed skills. |
| `PATCH /api/v1/skill-sources/{id}` | Change the fields sent, then sync again. |
| `DELETE /api/v1/skill-sources/{id}` | Delete the source and hand its skills over. The response counts them, and names a webhook GitHub kept. |
| `POST /api/v1/skill-sources/{id}/sync` | Sync now. |

```bash theme={null}
curl -s -X POST "$AGENTOPS_URL/api/v1/skill-sources" \
  -H "Authorization: Bearer $AGENTOPS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": "<GitHub connection id>",
    "repo_owner": "acme",
    "repo_name": "sre-skills",
    "branch": "main",
    "path": "skills",
    "labels": {"team": "sre"}
  }'
```

A synced skill's `managed_by` field names its source and folder, and carries `sync_warning` when it
was skipped. Each version of it carries `commit`, with the SHA, author, verified flag and pusher.

The [MCP server](https://docs.komodor.com/developer-tools/mcp-server.md) takes the same fields. An agent in chat does not
connect, edit, delete or sync a source: it explains what a source does and points you to the Skills
page.

## What a source does not do

* **It does not write back.** Nothing in KAOP changes the repository.
* **It does not attach skills.** Attaching skills to agents and pinning versions stay in KAOP.
* **It reads from github.com only.** GitHub Enterprise Server, GitLab and Azure DevOps are not
  sources.
* **It is not declared on a management cluster.** A source is managed from the Skills page, the API
  or the MCP server. To keep skills as `Skill` resources instead, see
  [Skills as code](https://docs.komodor.com/manage-your-agents/build/skills-as-code.md#keep-skills-in-git).

## Next steps

> [card] [Skills](https://docs.komodor.com/manage-your-agents/build/skills.md)
>
> What a skill is, how versions and pins work, and how an agent finds the right one.

> [card] [Skills as code](https://docs.komodor.com/manage-your-agents/build/skills-as-code.md)
>
> Versions, rollback and pins from the API, and `Skill` resources on a management cluster.

> [card] [Built-in integrations](https://docs.komodor.com/manage-your-agents/build/built-in-integrations.md)
>
> Install the GitHub App and manage the connection.

> [card] [Roles & permissions](https://docs.komodor.com/security-and-governance/identity-and-access/roles-permissions.md)
>
> Label-scoped grants that cover a source's skills.


## Related topics

- [Skills](https://docs.komodor.com/manage-your-agents/build/skills.md)
- [Skills as code](https://docs.komodor.com/manage-your-agents/build/skills-as-code.md)
- [Deploy a self-hosted agent](https://docs.komodor.com/manage-your-agents/build/deploy-a-self-hosted-agent.md)
- [Integrations list](https://docs.komodor.com/manage-your-agents/build/built-in-integrations.md)
- [Code Review](https://docs.komodor.com/manage-your-agents/build/catalog/code-review.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.