The Problem
Coding agents like Claude Code, Codex, and Cursor each expect skills in their own directory layout, and teams want those skills committed per-project. Manually copying markdown skill files into every agent's directory — per project, per agent, per skill — is error-prone and doesn't scale. This CLI turns that into a single command.
What This Does
skills is a TypeScript CLI that fetches skill definitions from GitHub, GitLab, arbitrary git URLs, or local paths, and installs them into the correct agent directory. It supports project-scoped (default) or global (-g) installs, and symlink or copy modes. src/add.ts drives the add flow, src/installer.ts owns the filesystem work (symlinks, path safety, canonical directories), src/skills.ts discovers skills from a repo, and src/agents.ts detects which agents are installed.
How It Is Wired
Execution starts at main in src/cli.ts:553, which reaches 120 functions. It parses args, then dispatches to runAdd, runFind, runRemove, runCheck, or runUpdate. The add path flows through src/add.ts (21 functions, imports 12 modules — the highest instability at 0.73) into src/installer.ts for filesystem effects: symlink creation, directory cleanup, path validation. src/skill-lock.ts owns readSkillLock/writeSkillLock; readSkillLock is called from 11 places, the widest blast radius in the repo — change its signature and a dozen call sites break. src/agents.ts (Ca 8, Ce 1, instability 0.11) is the most stable hub; detectInstalledAgents is called from 6 places. One function calls a model for inference, via the HuggingFace provider. The module graph has 49 modules, 72 edges, and no circular dependencies — but the two oversized files (src/add.ts at 1,653 lines, src/installer.ts) concentrate most of the routing, so changes there ripple widely.
How To Use It
pnpm install
npx skills add vercel-labs/agent-skills
Target specific agents or skills:
npx skills add owner/repo --skill frontend-design -a claude-code -a opencode
npx skills add owner/repo --all -y
Sources include GitHub shorthand (owner/repo), full URLs, GitLab, git URLs, and local paths. Scope is project (./<agent>/skills/) or global (~/<agent>/skills/). No environment variables are required; configuration lives in package.json and tsconfig.json.
Real-World Use
A team standardizes on a shared skill repo. Each developer runs:
npx skills add team/agent-skills --skill "Convex Best Practices" -a claude-code
The skill lands in ./claude-code/skills/, is committed to the project, and is shared with the team — with --all -y for CI-friendly non-interactive installs.
Code Health & Issues
Static analysis found 9 findings (2 high, 7 medium):
- High — Oversized files:
src/add.tsandsrc/installer.ts(1,653 lines) are hard to hold in one head; split by responsibility. - High — Duplicated code: 40 repeated 6-line blocks across 12 files (
src/add.ts,src/list.ts, their tests); extract shared helpers. - Medium — High branching density: 82 branch points over 206 lines in
src/source-parser.ts,src/find.ts,src/plugin-manifest.ts; consider table/strategy dispatch. - Medium — Deep nesting:
src/cli.tsreaches indentation depth 6; flatten with early returns.
SDLC observations: no LICENSE file at root (default is all rights reserved), agents.yml pushes to the default branch with no declared GITHUB_TOKEN permissions and no persist-credentials: false, no Dependabot, and no dependency vulnerability scan in CI. Tests and CI are present; no committed secrets found.
The Bottom Line
A well-structured CLI for a real pain point, with clean module boundaries and no circular dependencies — but the two core files carry too much weight and the automation workflow needs hardening before it's production-safe. Suitable for teams standardizing agent skills; add a license before redistributing.