Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Command Reference

Complete reference for the libskills CLI.

Commands

init — Scaffold a skill

libskills init [OPTIONS]
OptionDescription
-n, --nameLibrary name
-r, --repoGitHub repo (author/name)
-l, --languageLanguage: cpp, rust, python, go, js
-t, --tagsComma-separated tags
--versionLibrary version (default: 0.1.0)
--tiertier1 or tier2 (default: tier2)
--groupmain or contrib (default: contrib)
-o, --outputOutput directory (default: .libskills)

Examples:

libskills init
libskills init -n spdlog -r gabime/spdlog -l cpp -t "logging,async,cpp"
libskills init -n mylib -r me/mylib -l python -t "web,api" -o ./skills/

validate — Schema validation

libskills validate [PATH]

Validates skill.json against the LibSkills schema. Checks that all referenced files exist and P0 files are declared.

Examples:

libskills validate              # default: .libskills/
libskills validate .libskills/
libskills validate path/to/skill.json

lint — Quality check

libskills lint [OPTIONS] [PATH]
OptionDescription
-f, --fixAuto-repair issues where possible

Checks:

  • Token counts (500–1500 per file)
  • pitfalls.md ≥ 3 sections
  • safety.md ≥ 2 sections
  • overview.md exists
  • examples/ ≥ 1 file
  • tags ≥ 1 entry
  • risk_level is valid

Examples:

libskills lint
libskills lint .libskills/
libskills lint --fix .libskills/

update — Refresh registry index

libskills update [OPTIONS]
OptionDescription
-r, --registryPath to registry directory

Downloads the registry index and builds the content search index.

Examples:

libskills update
libskills update -r /path/to/libskills-registry
libskills search <KEYWORD>

Searches the local registry index by name, tags, and summary.

Examples:

libskills search logging
libskills search "async runtime"
libskills find [OPTIONS] <QUERY...>
OptionDescription
-l, --limitMax results (default: 10)
-t, --thresholdMin score 0.0–1.0
-r, --registryRegistry path
--rebuildForce rebuild content index

Searches skill file content using TF-IDF relevance scoring, not just metadata.

Examples:

libskills find async logger
libskills find "fast HTTP client" -l 5
libskills find web framework --rebuild

get — Download a skill

libskills get [OPTIONS] <KEY>
OptionDescription
-r, --registryRegistry path

Downloads a skill to ~/.libskills/cache/{key}/.

Examples:

libskills get cpp/gabime/spdlog
libskills get python/psf/requests -r ./registry/

info — Show skill metadata

libskills info <KEY>

Displays full metadata for a cached skill, including trust score, tags, dependencies, and file listing.

Examples:

libskills info cpp/gabime/spdlog

list — List cached skills

libskills list [OPTIONS]
OptionDescription
-v, --verboseShow additional detail

Examples:

libskills list
libskills list -v

cache — Manage cache

libskills cache <SUBCOMMAND>
SubcommandDescription
clearRemove all cached skills
pruneSame as clear
pathShow cache directory paths

Examples:

libskills cache path
libskills cache prune

serve — HTTP API server

libskills serve [OPTIONS]
OptionDescription
-p, --portPort (default: 8701)
-H, --hostHost (default: 127.0.0.1)
-r, --registryRegistry path

Starts an HTTP server exposing all skills via REST API.

Examples:

libskills serve
libskills serve -p 8080 -H 0.0.0.0

Configuration

The CLI stores data in ~/.libskills/:

~/.libskills/
├── index.json       # Local registry index
├── embedding.json   # Content search index
├── config.toml      # CLI configuration (future)
└── cache/           # Downloaded skills
    └── {lang}/{author}/{name}/
        ├── skill.json
        ├── overview.md
        └── ...