Skip to content

Import from GitHub

Admins can import a skill from a folder of a public GitHub repository into the hosted skill library. On the web app’s Skills page, choose Import from GitHub and name the folder in either of two ways:

  • owner/repo/path/to/skill@ref, where ref is a branch, tag or commit. Without @ref, the repository’s default branch is used.
  • The folder’s address on github.com, as copied from the browser: https://github.com/owner/repo/tree/main/path/to/skill, or the address of its SKILL.md (…/blob/main/path/to/skill/SKILL.md).

In an address, the ref is the single segment after tree or blob, because the address alone cannot show where a ref containing / ends and the folder begins. For a ref such as release/v2, use the first form: owner/repo/path/to/skill@release/v2. Only github.com is read; any other host is refused.

An import reads every file of the folder at one commit and saves them as a draft, so a person reviews it before anything is published. Files a skill cannot hold are left out and listed. The version records the repository, folder, ref and commit, and an imported skill’s scripts never run in hosted conversation runs.

On an imported skill’s Overview tab, Check the source asks GitHub whether the folder has a newer commit than the skill’s newest version, and offers to import it as a new draft.

The route is POST /v1/skill-library/import with {"source": "owner/repo/path@ref"} (or a github.com address). reason (up to 2000 characters) records why; it defaults to Imported from GitHub: <source>. parent_version, the skill’s newest version, imports into that existing skill as a new version instead of refusing with skill_exists. GitHub’s unauthenticated rate limit is low; set a GITHUB_TOKEN secret on the API Worker to raise it.

Code Meaning
invalid_source The source is neither owner/repo/path@ref nor a github.com folder or SKILL.md address.
not_found No such public repository, ref or folder.
not_a_skill The folder has no SKILL.md.
bundle_too_large The folder holds more than 200 files or 8 MiB.
github_rate_limited GitHub refused the request; try later or set GITHUB_TOKEN.
github_unavailable GitHub did not answer as expected.
skill_exists The library already has a skill with that name.