Skip to content

Agent skills ​

osdk skills installs agent skills — SKILL.md instruction packages that AI coding agents such as Claude Code, Codex, Cursor, OpenCode, Gemini CLI, and GitHub Copilot read. A skill is content for an external agent, so osdk does only three things with it: download it from a source, place it in the same BLAKE3 content-addressed store that tools use, and link it into each agent's skills directory. osdk never runs a skill's scripts.

A skill belongs to the same "fetch immutable content, verify, land it, record a lock, reproduce" family as a model snapshot, and reuses osdk's existing content-addressed store, link modes, and osdk.lock.

Command reference ​

text
osdk skills add <SOURCE>
  [-s|--skill NAME]...        # pick skills by name in a multi-skill repo (* for all)
  [-a|--agent ID]...          # target agents; config default, or interactive multi-select
  [-g|--global]               # install into the agent's user-level dir, not the project
  [--copy]                    # copy instead of linking
  [--ref REF]                 # GitHub version: branch:main / tag:v1 / rev:<sha> / branch / commit
  [-l|--list]                 # list the skills a source offers, without installing
  [--no-lock]                 # do not record the install in osdk.lock

osdk skills list [-g]
osdk skills find [QUERY...] [--owner OWNER] [--limit N]
osdk skills remove NAME [-g] [-a ID]...
osdk skills sync [-g]
osdk skills update [SKILL...] [-g]
osdk skills path NAME
osdk skills use <SOURCE> [-s NAME] [-a ID] [--ref REF]
osdk skills init [NAME]
osdk skills agents

find (alias search) searches GitHub for installable skill repositories and prints each hit as owner/repo, ready to pass to add. It queries GitHub's public search API anonymously and only falls back to GITHUB_TOKEN/GH_TOKEN when it hits the anonymous rate limit; it never contacts skills.sh, so no registry key is needed. --owner restricts to one org/user and --limit caps the result count (1–50).

list shows locked skills for the selected scope. Project scope also reports unlocked project installation paths. sync reproduces the commit, content hash, and install mode recorded in the lock. It also installs applicable declarations that have no lock entry and records them. update re-resolves the lock's requested_ref, except that an explicit [skills.<name>].ref change wins. If the repository commit advances but the selected skill's content hash does not, only the lock commit advances; changed skill content is reinstalled. A bare 40-hex commit left by an older project is migrated to default-branch intent; spell an intentional permanent pin as ref = "rev:<commit>". To switch to a different pinned commit, edit ref and run skills update with network access. update also makes the install follow the project's [skills.<name>].agents (or [skills].default_agents when empty): an agent removed there is unlinked, keeping a directory a still-declared agent shares, an added one gets the copy the lock pins, and the lock's agents is rewritten. use installs nothing and writes no lock — it uses one skill on the fly: with no -a it writes the generated prompt to stdout (pipe it, e.g. osdk skills use owner/repo | claude), and with -a <id> it starts that agent's CLI interactively with the prompt. init scaffolds a SKILL.md template so you can start authoring a skill.

Source formats ​

FormExample
GitHub shorthandowner/repo
GitHub namespacedgithub:owner/repo
Repo subdirectorygithub:owner/repo/skills/web-design-guidelines
github.com URLhttps://github.com/owner/repo/tree/main/skills/x (tree/<ref> is stripped)
Local path./my-skills, ../x, /abs/x, ~/x

A source can be a single skill (a SKILL.md at its root) or a collection. Collection discovery looks in the repo root, its immediate subdirectories, and the conventional containers skills/, .agents/skills/, and .claude/skills/; use -s to pick by directory name, or -s '*' for all.

Target agents ​

osdk skills agents lists the agents osdk knows and their project / global skills directories:

Agent--agentProject dirUser-level dir
Claude Codeclaude-code.claude/skills~/.claude/skills
Codexcodex.agents/skills~/.codex/skills
Cursorcursor.agents/skills~/.cursor/skills
OpenCodeopencode.agents/skills~/.config/opencode/skills
Gemini CLIgemini-cli.agents/skills~/.gemini/skills
GitHub Copilotgithub-copilot.agents/skills~/.copilot/skills
Universaluniversal.agents/skills~/.config/agents/skills

Several agents share .agents/skills on purpose: one install serves them all, and remove counts how many agents still reference a skill. Explicit -a values win, then [skills].default_agents; otherwise osdk detects installed agents. One detection is selected automatically together with the shared directory (recorded as universal); multiple or zero detections open a checklist: arrow keys move, Space toggles, a toggles all, Enter confirms, and detected agents start checked. It offers one choice per directory -- agents sharing .agents/skills in a project are the single universal choice, while with -g each agent has its own -- and installs exactly what is checked. --yes accepts detections (or all agents when none are detected), while other non-interactive calls fail immediately. Link/copy is asked only for multiple physical destinations; one destination is copied directly. Explicit --copy and [skills].link_mode take precedence. Before writing, the installation summary lists every destination and marks overwrites. add asks for confirmation unless --yes was supplied. Shared physical directories are written once.

Immutable identity and reproduction ​

add and first installs via sync record the identity in osdk.lock:

toml
[skills.web-design-guidelines]
source = "github:vercel-labs/agent-skills/skills/web-design-guidelines"
content_hash = "b3-v2:…"                 # BLAKE3 digest of the staged content
requested_ref = "branch:main"            # requested ref; default means repository default
resolved_commit = "063bee94…"            # the immutable commit a floating ref resolved to
install_mode = "copy"                    # selected placement policy
agents = ["claude-code"]

For an existing lock entry, osdk skills sync reproduces from it: it prefers the staged content-addressed copy, and when that copy is gone it re-downloads a GitHub source at the recorded resolved_commit and recomputes content_hash. A mismatch fails closed — a moved tag or a substituted mirror cannot install — and placement reuses install_mode. A local source whose staged copy is gone cannot be reproduced and is reported. With --offline, GitHub lock replay requires the staged copy. An operation that needs to download the archive reports a cache miss even when commit metadata is cached.

How skills land ​

Directory links use a junction on Windows and a symlink on Unix. Both work without elevated privileges. Where links are unavailable, or with --copy, the tree is copied. Override the link mode for skills alone with [skills].link_mode. After the installation summary is confirmed, an existing real directory may be replaced: osdk prepares the new path beside the destination, renames the old directory to a temporary backup, and restores it if activation fails. A copied skill can therefore be updated by a later add, update, or sync. A legacy lock without install_mode infers its placement from the existing target (link versus real directory). A local source that overlaps its destination is rejected before staging so it cannot delete itself.

For each skill, update prepares every Agent target before changing the active installation. If a target fails to activate, the previous installation and lock entry are preserved.

Security ​

  • Fail-closed downloads: a GitHub tarball goes through osdk's existing download stack, bounded by archive size and entry-count limits; a skill's file count (default 1000) and total size (default 25 MiB) are capped too, so an oversized or hostile repo fails loudly instead of being staged whole.
  • Complete-candidate failover: HTTP 200 alone does not accept a GitHub source; its tarball must unpack safely, otherwise osdk removes that candidate and tries the next GitHub download route.
  • Pre-install preview: the first install prints the skill's name, description, file count, size, and whether it contains script-like files, so you see what an agent will read before it is written into the agent directory.
  • osdk does not execute skills: staging and linking are osdk's job; execution happens inside the downstream agent.
  • Trust gate: read-only commands (agents / list / path) never trip it; add / remove / sync write to disk and stay gated. A declarative [skills] entry needs no trust to say what to install; only a byte-source key such as endpoint does.

Declarative configuration ​

Declare skills in osdk.toml and run osdk skills sync on a fresh checkout. It installs declarations that match when and have no lock entry, then writes their resolutions to osdk.lock.

toml
[skills]
default_agents = ["claude-code"]

[skills.web-design]
source = "github:vercel-labs/agent-skills"
skill = "web-design-guidelines"
ref = "branch:main"
agents = ["claude-code", "codex"]

The declaration name is the lock key and the installation directory name. For a collection, skill selects a directory and defaults to the declaration name. Relative local paths are resolved from the config file that declares source. For an external project config, they are relative to the actual project root. ref applies to GitHub sources. An empty agents list falls back to [skills].default_agents and then to agent detection. A single detected Agent is selected automatically. If a choice is still needed in CI or without a terminal, sync exits immediately with status 1 and asks you to set agents or [skills].default_agents. Pass --yes to accept the recommended targets. sync prints a summary for first-time installs and asks before replacing any existing unlocked skill directory, even when the file contents match. A nonempty CI value enables CI mode, except false (case-insensitive) and 0. In CI or without a terminal, pass --yes to replace the directory or move it aside first. sync copies to a single destination and uses automatic linking for multiple destinations unless [skills].link_mode is set. Custom endpoint support is pending. Setting it on a declaration with no lock entry produces an error.

Existing entries are replayed from the lock. When a declaration's when filter excludes the current platform, sync and skills update without names report the required platform and skip the skill, preserving its installation and lock entry. A named update for an excluded skill reports the requirement and exits with status 1. Use osdk skills update <name> to apply changes to a ref or Agent list. To change the source or skill selection, run osdk skills remove <name> and sync again, or install explicitly with skills add. When removing a declaration, use osdk skills remove <name> to drop the lock entry too.

[skills].scope sets the default scope. The default project uses project Agent directories and the project lock. Set global to use user-level Agent directories and the osdk.lock in the user configuration directory. Pass -g to explicitly select user scope. skills path uses the configured scope. With scope unset, it checks the project lock first, then the user lock. See reference/configuration/skills.md in the osdk-guide skill for the full field reference.

Recovering skills installed by an older version in a subproject ​

Older releases could install a skill in a subproject and record it in an ancestor's osdk.lock. When the current project has no lock entry for that name, osdk skills list and osdk skills remove <name> look for entries in ancestor locks within the same Git repository. When the installed content matches an ancestor entry's content hash, both commands report the installation paths and how to migrate the entry. If the local directories are gone, they show candidates for you to check.

  1. From the subproject, run osdk skills list or osdk skills remove <name>. Verify that the ancestor entry belongs to this subproject. You can also inspect ancestor osdk.lock files manually, including in projects without Git.
  2. Copy the entire [skills.<name>] table into the osdk.lock beside the subproject's osdk.toml. Keep every field, including the content hash, agents, install mode, and any recorded commit. If the subproject has no lockfile yet, create one with schema = 4.
  3. Verify that both tables match, then delete the old table from the ancestor lock. Keep the other entries in both locks. To uninstall the skill, run osdk skills remove <name> again from the subproject.

If the installation matches none of the ancestor entries, both commands report the unlocked paths. Once you confirm it is a standalone installation, you can remove it manually from those agent paths.

Released under the MIT License