KS

kurochenko/skillbook

Developer tools
38 stars Quality 46 Trend 16

Lock-based skill management for AI coding assistants. Keep a central library and project-local copies that are safe to commit.

Overview

Lock-based skill management for AI coding assistants. Keep a central library and project-local copies that are safe to commit. - : ~/.skillbook/skills/ / (git repo for versioning) - : /.skillbook/skills/ / (committable) - : skillbook.lock.json stores version + hash per skill - : synced from project skills (.claude/, .codex/, .cursor/, .opencode/, .pi/) using symlink or copy mode Skills can be single-file (SKILL.md) or multi-file directories (SKILL.md + scripts/references/assets/subfolders). Use this repository version directly with Bun: Example (target a specific project path): Set SKILLBOOK_LIBRARY to override the central library path. The default is ~/.skillbook. SKILLBOOK_LOCK_LIBRARY is still honored as a deprecated fallback when SKILLBOOK_LIBRARY is unset. If you already have ~/.skillbook/skills, generate lock entries: Import a skill into the library from either a markdown file or a directory containing SKILL.md:

README

skillbook

Lock-based skill management for AI coding assistants. Keep a central library and project-local copies that are safe to commit.

How it works

  • Library: ~/.skillbook/skills// (git repo for versioning)
  • Project: /.skillbook/skills// (committable)
  • Lockfile: skillbook.lock.json stores version + hash per skill
  • Harnesses: synced from project skills (.claude/, .codex/, .cursor/, .opencode/, .pi/) using symlink or copy mode

Skills can be single-file (SKILL.md) or multi-file directories (SKILL.md + scripts/references/assets/subfolders).

Install

curl -fsSL https://raw.githubusercontent.com/kurochenko/skillbook/master/install.sh | bash

Quick start

# Initialize library and scan existing projects
skillbook init --library
skillbook scan ~/projects
skillbook list

# Initialize a project and install a skill from the list
cd my-project
skillbook init --project
skillbook install 
skillbook harness enable --id opencode --mode symlink

Run from source (dev)

Use this repository version directly with Bun:

bun run dev --  [args]

Example (target a specific project path):

bun run dev -- harness enable --id cursor --mode copy --project "/absolute/path/to/project" --force

Environment

Set SKILLBOOK_LIBRARY to override the central library path. The default is ~/.skillbook. SKILLBOOK_LOCK_LIBRARY is still honored as a deprecated fallback when SKILLBOOK_LIBRARY is unset.

Common workflows

1) Build your library (first time)

skillbook init --library
skillbook scan ~/projects

If you already have ~/.skillbook/skills, generate lock entries:

skillbook migrate --library

2) Add a skill from a local file or directory

Import a skill into the library from either a markdown file or a directory containing SKILL.md:

skillbook add ./my-skill.md
skillbook add ./my-skill-dir
skillbook add ./my-skill-dir --name my-skill

For directory skills, skillbook copies the full tree (including nested files).

If you changed a harness skill and want to pull those changes into the project copy first, run:

skillbook harness import --id opencode
skillbook push my-skill

3) Install skills into a project

skillbook init --project
skillbook install my-skill
skillbook install --skills alpha,beta
skillbook harness enable --id cursor --mode copy

4) Update a skill and publish to the library

Edit the project copy (any file in the skill directory), then push:

edit .skillbook/skills/my-skill/SKILL.md
# or edit auxiliary files, e.g.
edit .skillbook/skills/my-skill/scripts/deploy.sh
skillbook push my-skill

5) Pull updates from the library

skillbook pull my-skill
skillbook pull --skills alpha,beta

6) Daily project sync

Pull any behind project skills, leave ahead/diverged/local-only skills untouched, and refresh all enabled harnesses:

skillbook sync
skillbook sync --dry-run
skillbook sync --force   # overwrite drifted copied harness files

7) Resolve conflicts

If status shows diverged, pick a winner:

skillbook resolve my-skill --strategy library
# or
skillbook resolve my-skill --strategy project

8) Re-sync harness outputs

If harness files were changed, removed, or drifted:

skillbook harness status --id opencode
skillbook harness sync --id opencode
# overwrite drifted copied harness files
skillbook harness sync --id opencode --force

If symlinks are unsupported in your environment, use copy mode explicitly:

skillbook harness enable --id opencode --mode copy

When symlink mode is enabled but unsupported by the filesystem, skillbook automatically falls back to copy mode and persists it in skillbook.lock.json.

Use --force when migrating so existing harness entries are replaced with real files/directories:

skillbook harness enable --id cursor --mode copy --project "/absolute/path/to/project" --force
skillbook harness status --id cursor --project "/absolute/path/to/project"

Repeat for each harness you use: claude-code, codex, cursor, opencode, pi.

11) Operate on multiple skills in one command

The lock workflow commands support --skills (comma-separated):

skillbook install --skills alpha,beta --project /path/to/project
skillbook pull --skills alpha,beta --project /path/to/project
skillbook push --skills alpha,beta --project /path/to/project
skillbook uninstall --skills alpha,beta --project /path/to/project

You can also combine positional + --skills:

skillbook install alpha --skills beta,gamma --project /path/to/project

Common commands

skillbook status                          # project vs library
skillbook sync                            # pull behind skills + sync enabled harnesses
skillbook verify [--json]                 # read-only project integrity check
skillbook lint [--json]                   # Agent Skills spec convention checks
skillbook add  [--name id]          # add from .md file or skill directory
skillbook scan                       # discover skills in existing projects
skillbook diff  [--files]              # compare library/project skill content
skillbook install  [--skills a,b]     # library -> project
skillbook push  [--skills a,b]        # project -> library
skillbook pull  [--skills a,b]        # library -> project
skillbook uninstall  [--skills a,b]   # remove from project
skillbook resolve  --strategy library|project
skillbook harness status --id 
skillbook harness enable --id  --mode symlink|copy

Automation

Commands that accept --json emit one JSON object on stdout with a top-level ok boolean. Existing command payload fields remain at the top level. JSON errors use { "ok": false, "error": "..." } plus any partial payload fields and the same exit code as the human-readable path.

skillbook status --json | jq

Exit codes:

Code Meaning
0 Success
1 Usage, input, or environment error, including bad args, missing skills, corrupt lockfiles, and verify findings
2 Sync-state conflict, including diverged skills, push/pull refusals, and harness conflicts

The update banner is suppressed when --json is used or stdout is not a TTY.

Agent Skills lint

skillbook lint checks skill directories against Agent Skills conventions: spec-compliant directory names, required SKILL.md frontmatter (name and description), frontmatter name/directory agreement, description length, large skill files, and unknown frontmatter keys. It defaults to project skills in the current directory; use --project or --library to choose scope.

skillbook lint --project /path/to/project
skillbook lint --library --json
skillbook lint my-skill --project /path/to/project

Supported harnesses

Tool Path Format
Claude Code .claude/skills//SKILL.md directory
Codex .agents/skills//SKILL.md directory
Cursor .cursor/skills//SKILL.md directory
OpenCode .opencode/skill//SKILL.md directory
Pi .pi/skills//SKILL.md directory

Development

bun run dev --            # Run CLI in dev mode
bun test                           # Run all tests
bun test src/lib/__tests__/library.test.ts   # Run a single test file
bun test --watch                   # Watch mode
bun run build                      # Compile to dist/skillbook

Test fixtures in test-fixtures/ are generated at runtime and gitignored.

License

MIT

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add kurochenko/skillbook
New to MCP? Start with the mcpskill.org guide →