Skip to main content

Generate and maintain skills

clip sync
clip sync --skills-dir .claude/skills

Each skill includes your purpose, the executable path, one usage line per command, and a commands/ directory of reference files beside SKILL.md. A usage line shows required arguments bare, optional ones in brackets, enum values inline, and a mutation marker, with the first example beside read commands:

- `docker container inspect <container> [--format <format>]` — Read metadata for one or more containers. Example: `docker container inspect app --format '{{json .State}}'`

Commands whose schema lists no arguments point at their own --help. The default destination is .agents/skills in the current project. Choose the skills directory your agent reads.

Sync also writes clip-schema-authoring, a bundled skill for drafting schemas from --help output. See define capabilities. It's owned like tool skills, so a registered tool whose skill name would be clip-schema-authoring is refused.

Skill layout​

.agents/skills/clip-docker/
SKILL.md usage lines, or an index for very large tools
commands/container.md argument descriptions, output notes, and every example
.clip-owned the files CLIP wrote

Commands are grouped by their leading words, so container ls and container inspect share commands/container.md. A group over 15 commands splits on the next word.

Usage lines stay in SKILL.md until they pass 24,000 characters, about 10,000 tokens, or roughly 130 commands with a few arguments each. Past that, SKILL.md becomes an index of group files and their command names, and the usage lines move into the group files. The limit is high on purpose: in the evals, an index at 100 commands cost agents one extra read per task and saved no tokens.

Skills don't include schema.json. The group files carry what agents need from it, and clip doctor and clip refresh read the registration, not the skill.

AGENTS.md pointers​

Sync also maintains a block in AGENTS.md, one line per tool:

<!-- clip:begin generated by clip sync; edit registrations and the commands file, not this block -->
Installed CLI tools. Run them directly; read the usage source before a first call.

- `git`: Review repository changes. Usage: `.agents/skills/clip-git/SKILL.md`
<!-- clip:end -->

Skills carry usage; the pointer carries discovery. In the evals, a one-line mention took prompts that name no tool from 0 to 9 of 9, and every harness reads AGENTS.md, including ones without skill support. The skill still earns its place once the agent has found the tool: fewer lookups, fewer usage errors, and fewer tokens per task.

clip sync --agents-file CLAUDE.md # write the block to another file
clip sync --target agents-md # pointers only; tools without a CLIP skill point at --help
clip sync --target skills # skills only

CLIP appends the block when the file has none and edits only between its markers, leaving the rest of the file alone. Updates and block removal preserve existing read, write, and execute permissions, even under a stricter process umask. New files use normal creation permissions. It removes the block when no tools are registered. A missing, duplicated, or out-of-order marker, or a symlinked file, stops sync before it writes anything; restore the markers or delete both.

Ownership​

Run sync after changing or removing registrations. CLIP refreshes its own skills and removes stale ones, including group files a smaller schema no longer needs. It refuses collisions with unowned directories, extra user files anywhere in a skill, and symlinks. Generated files are managed output; edit the source schema or registration instead.

Inside a Git project, registrations default to the uncommitted .clip/tools.local.json. --scope shared writes the committed .clip/tools.json, and --scope global writes ~/.config/clip/tools.json; set CLIP_HOME to move the global directory. Local overrides shared, which overrides global. Skills provide guidance; they don't grant permissions, store credentials, or bypass your agent's approval rules. To skip prompts for read-only commands, clip permissions proposes allow rules you can review and apply with --write.