CLI Reference

August 19, 2026 · View on GitHub

Complete reference for all rolecraft commands, flags, and options.

Node.js API: rolecraft also exposes a programmatic API. See src/index.js or import { ... } from 'rolecraft'. All API functions return plain objects with no side-effects.


Commands

CommandDescription
init [name]Scaffold a new SKILL.md (--template, --list)
install <source>Install a skill with security scan
bundle <sources...>Install multiple skills from inline sources
bundle create [name]Create a new bundle JSON file
use <source>Preview a skill's files without installing
listShow all installed skills
remove <slug>Uninstall a skill
update <slug>Re-install a skill to latest version
rollback <slug>Restore a skill to previous version (from backup history)
setup [source]Detect agents and optionally install a skill
search <query>Search GitHub for skills (--skills-sh for skills.sh)
publish <source>Publish a skill to the registry (requires GITHUB_TOKEN)
checkCheck for available updates
ciRe-install all skills from lockfile (CI mode)
verifyCheck installed skill integrity via content hash
doctorRun system health check
watch [slug]Watch skills for changes and auto-sync
convert <source>Convert between SKILL.md and .mdc formats
profile save/apply/listSave, apply, and manage multi-agent profiles
mcp install/list/remove/update/check/searchInstall, list, remove, update, check, and search MCP servers
agents-xml [--write]Generate skills XML for AGENTS.md
completions bash|zsh|fishGenerate shell completion scripts
test <skill-path>Test a skill quality with built-in assertions
diff <a> <b>Compare two skills section-by-section
compose <a> <b> [<c>...]Compose multiple skills into one
upgradeUpgrade rolecraft to latest version
--help, -hShow usage
--version, -vShow version

Common flags

These flags work across multiple commands:

FlagAffectsDescription
--yes / -yinstall, setup, bundle, mcp, profile, publishNon-interactive: accept all defaults, bypass security prompts
--dry-runinstall, setup, bundle, remove, update, profile, mcp, upgrade, watch, convertPreview without making changes
--globalinstall, use, setupInstall to ~/.agents/skills/ (user-wide)
--projectinstall, use, setupInstall to ./.agents/skills/ (repo-scoped, default)
--allinstall, setup, profile, mcpInstall to every supported agent
--symlinkinstall, setupSymlink instead of copy
--copyinstall, setupForce copy (default)
--frozen-lockfileinstallFail if skill is already installed
--no-mcpinstall, setup, bundleSkip MCP server installation
--interactivesearch, mcp searchOpen TUI for browsing and selecting results
--listinstall, use, setupList available skills from a source without installing
--skill <names>install, use, setupInstall/preview specific skills by name (comma-separated)
--jsonlist, doctor, test, compose, diffOutput structured JSON
--no-colordiff, compose, testDisable colored output
--no-emojitestUse ASCII fallback for emojis

Agent-specific flags

Pass any of these to install, setup, or profile to target specific agents:

FlagAgentSkill directory
--agentsopencode~/.agents/skills/
--claudeclaude-code~/.claude/skills/
--cursorcursor~/.cursor/skills/
--windsurfwindsurf~/.codeium/windsurf/skills/
--devindevin./.devin/skills/
--codexcodex~/.agents/skills/
--copilotcopilot./.github/skills/
--aideraider~/.aider/skills/
--clinecline~/.cline/skills/
--geminigemini-cli~/.gemini/skills/
--codycody~/.cody/skills/
--continuecontinue~/.continue/skills/
--warpwarp~/.agents/skills/
--codeiumcodeium~/.codeium/skills/
--fabricfabric~/.fabric/skills/
--goosegoose~/.agents/skills/
--tabninetabnine~/.tabnine/agent/skills/
--supermavensupermaven~/.supermaven/skills/
--pr-pilotpr-pilot~/.pr-pilot/skills/
--loomloom~/.loom/skills/
--rooroo~/.roo/skills/
--traetrae~/.trae/skills/
--hermeshermes~/.hermes/skills/
--kirokiro~/.kiro/skills/
--augmentaugment~/.augment/skills/
--kilokilo~/.kilo/skills/
--openhandsopenhands~/.agents/skills/
--juniejunie~/.junie/skills/
--factoryfactory~/.factory/skills/
--command-codecommand-code~/.commandcode/skills/
--cortexcortex~/.snowflake/cortex/skills/
--mistral-vibemistral-vibe~/.vibe/skills/
--qwen-codeqwen-code~/.qwen/skills/
--openclawopenclaw~/.openclaw/skills/
--codebuddycodebuddy~/.codebuddy/skills/
--muxmux~/.mux/skills/
--pipi~/.pi/agent/skills/
--autohand-codeautohand-code~/.autohand/skills/
--rovorovo-dev~/.rovodev/skills/
--firebenderfirebender~/.firebender/skills/
--bobibm-bob~/.bob/skills/
--aider-deskaider-desk~/.aider-desk/skills/
--zapzap~/.zap/skills/
--codeepcodeep~/.codeep/skills/
--kimi-codekimi-code~/.kimi-code/skills/
--zcodezcode~/.zcode/skills/
--astrbotastrbot~/.astrbot/data/skills/
--qoder-cnqoder-cn~/.qoder-cn/skills/
--trae-cntrae-cn~/.trae-cn/skills/
--zenflowzenflow~/.zenflow/skills/
--neovateneovate~/.neovate/skills/
--pochipochi~/.pochi/skills/
--adaladal~/.adal/skills/
--droiddroid~/.droid/skills/
--chatgptchatgpt~/.agents/skills/
--codearts-agentcodearts-agent~/.codeartsdoer/skills/
--universaluniversal~/.config/agents/skills/
--ampamp~/.config/agents/skills/
--antigravityantigravity~/.agents/skills/
--antigravity-cliantigravity-cli~/.agents/skills/
--deepagentsdeep-agents~/.agents/skills/
--dextodexto~/.agents/skills/
--loafloaf~/.agents/skills/
--replitreplit./.agents/skills/
--zedzed~/.agents/skills/
--promptscriptpromptscript./agent/skills/
--code-arts-doercode-arts-doer~/.codeartsdoer/skills/
--code-makercode-maker~/.codemaker/skills/
--code-studiocode-studio~/.codestudio/skills/
--crushcrush~/.crush/skills/
--eveeve./agent/skills/
--forgeforge./.forge/skills/
--inference-shinference-sh~/.inferencesh/skills/
--jazzjazz~/.jazz/skills/
--iflowiflow~/.iflow/skills/
--kilo-codekilo-code~/.kilocode/skills/
--kodekode~/.kode/skills/
--lingmalingma~/.lingma/skills/
--mcp-jammcp-jam~/.mcpjam/skills/
--moxbymoxby~/.moxby/skills/
--onaona~/.ona/skills/
--qoderqoder~/.qoder/skills/
--reasonixreasonix~/.reasonix/skills/
--terra-mindterra-mind~/.terramind/skills/
--tiny-cloudtiny-cloud~/.tinycloud/skills/
--zencoderzencoder~/.zencoder/skills/
--codebuddycodebuddy~/.codebuddy/skills/
(see full list for all 86 agents)

Combine multiple flags in one command:

rolecraft install ./my-skill --cursor --claude --devin --copilot

Subcommand detail

rolecraft init [name]

Scaffold a new skill:

rolecraft init my-skill                # creates ./my-skill/SKILL.md
rolecraft init                         # creates ./my-skill/SKILL.md (default: my-skill)
rolecraft init --list                  # list available templates
rolecraft init my-skill --template basic # scaffold from a specific template

Options:

OptionDescription
--listList available templates with descriptions
--template <name>Scaffold from a named template (basic, code-review, git-workflow, testing, security, react)

See the init command docs for available templates and full examples.

rolecraft install <source>

Install a skill from any source:

rolecraft install ./path                             # local directory
rolecraft install owner/repo                         # GitHub shorthand
rolecraft install https://gitlab.com/org/project     # Git URL
rolecraft install git@github.com:owner/repo.git      # SSH URL
rolecraft install npm:package                        # npm package
rolecraft install my-skill                           # registry slug

Accepts: --yes, -y, --dry-run, --global, --project, --all, --symlink, --frozen-lockfile, --no-mcp, --list, --skill, agent flags.

rolecraft bundle <sources...>

rolecraft bundle owner/skill1 owner/skill2 ./local
rolecraft bundle bundle.json
rolecraft bundle bundle.txt
rolecraft bundle create [name]

Flags:

FlagDescription
--dry-runPreview without installing
--no-mcpSkip MCP server installation from skills

rolecraft use <source>

Preview without installing. Same source types as install.

rolecraft use ./my-skill         # show files
rolecraft use owner/repo         # from GitHub
rolecraft use ./my-skill | head -50  # pipe to pager

Flags:

FlagDescription
--listList available skills from a source without previewing
--skill <names>Preview specific skills by name (comma-separated)

rolecraft list

rolecraft list                  # all installed skills
rolecraft list --json            # machine-readable JSON output
rolecraft list --agent cursor    # only skills installed to cursor (-a alias)

rolecraft remove <slug>

rolecraft remove my-skill
rolecraft remove my-skill --dry-run

rolecraft update <slug>

Re-install from original source:

rolecraft update my-skill

rolecraft setup [<source>]

rolecraft setup                  # detect agents only
rolecraft setup ./my-skill       # detect + install
rolecraft setup owner/repo --yes

Flags:

FlagDescription
--yes, -yInstall all skills without prompt
--dry-runPreview without installing
--listList available skills from a source without installing
--skill <names>Install specific skills by name (comma-separated)

rolecraft search <query>

rolecraft search code-review                  # GitHub search
rolecraft search code-review --interactive     # TUI picker
rolecraft search react --skills-sh             # skills.sh (experimental)
rolecraft search react --registry              # rolecraft Registry

rolecraft publish <source>

Publish a skill to the rolecraft Registry:

rolecraft publish ./my-skill                          # auto-detect git remote
rolecraft publish ./my-skill --repo user/my-skill     # explicit repo
rolecraft publish ./my-skill --dry-run                # preview without PR
rolecraft publish ./my-skill --yes                    # non-interactive

Flags:

FlagDescription
--dry-runPreview without publishing
--yes, -ySkip confirmation prompt
--repo <ref>GitHub repository (owner/repo)
--slug <slug>Override skill slug
--name <name>Override skill name

Requires GITHUB_TOKEN environment variable (with repo scope). See publish.md for full details.

rolecraft check

No arguments. Checks all installed skills for newer versions.

rolecraft ci

Re-install all skills and MCP servers from lockfiles. Non-interactive by design — no flags needed.

rolecraft verify

Verifies SHA256 content hashes of all installed skills.

rolecraft doctor

rolecraft doctor                # standard health check
rolecraft doctor --json         # JSON output for scripting
rolecraft doctor --network      # include GitHub connectivity test
rolecraft doctor --deep         # skill conflict detection

Runs comprehensive system health checks: Node.js version, platform info, Git/npm availability, agent directories, lockfile schema validation, disk usage, orphaned directory detection, skill integrity (hash + symlink), MCP server configuration, optional network connectivity (--network), and conflict detection (--deep).

rolecraft watch [<slug>]

rolecraft watch                 # watch all skills
rolecraft watch my-skill        # watch specific skill
rolecraft watch --dry-run       # preview what would be watched

rolecraft convert <source>

Converts between formats. Auto-detects direction:

rolecraft convert ./skill/SKILL.md     # → .mdc
rolecraft convert ./rule.mdc            # → SKILL.md
rolecraft convert ./dir/                # directory, auto-detects format
rolecraft convert ./dir/ --output ./out
rolecraft convert ./skill --dry-run

Flags:

FlagDescription
--dry-runPreview without converting
--output <dir>Output directory (default: current dir)

rolecraft profile

profile save <name>           # capture current config
profile apply <name>          # apply saved config
profile list                  # list all profiles
profile show <name>           # show profile details
profile diff <name>           # compare with current
profile edit <name>           # edit with $EDITOR
profile delete <name>         # remove profile
profile export <name>         # export as JSON
profile import <path>         # import from file/URL
profile link [name]           # link to project

Common flags: --yes/-y, --dry-run, --all, agent flags (--cursor, --claude, etc.)

rolecraft mcp

mcp install <source> [flags]    # install MCP server
mcp list                        # list all MCP servers
mcp search <query> [flags]      # search MCP servers (--npm, --interactive)
mcp check                       # check for MCP server updates
mcp update <name> [flags]       # update an MCP server
mcp remove <name> [flags]       # remove MCP server

Flags: --yes/-y, --dry-run, --name <name>, --all, agent flags (--cursor, --claude, etc.), --npm, --interactive (for search).

rolecraft agents-xml [--write]

Generates XML block for AGENTS.md. Use --write to auto-insert.

rolecraft completions bash|zsh|fish

rolecraft completions bash >> ~/.bashrc
rolecraft completions zsh >> ~/.zshrc
rolecraft completions fish >> ~/.config/fish/completions/rolecraft.fish

rolecraft test <skill-path>

Test a SKILL.md quality with 13 built-in assertions. Supports single skill or batch mode.

rolecraft test ./my-skill/SKILL.md       # test a single skill
rolecraft test --all                     # test all installed skills
rolecraft test --all --json              # JSON output for CI
rolecraft test ./skill --min-score 80    # fail if below 80
rolecraft test ./skill --only name,slug  # run specific assertions
rolecraft test ./skill --verbose          # detailed results
rolecraft test ./skill --no-color         # disable ANSI colors
rolecraft test ./skill --no-emoji         # ASCII fallback for emojis

rolecraft diff <skill-a> <skill-b>

Compare two SKILL.md files section-by-section. Parses frontmatter and body independently.

rolecraft diff ./a.SKILL.md ./b.SKILL.md           # full diff
rolecraft diff ./a.SKILL.md ./b.SKILL.md --brief    # summary only
rolecraft diff ./a.SKILL.md ./b.SKILL.md --json     # JSON output
rolecraft diff ./a.SKILL.md ./b.SKILL.md --no-color # no ANSI
rolecraft diff ./a.SKILL.md ./b.SKILL.md --context 3 # show 3 lines context

Output includes frontmatter changes, section-level diffs, and a summary of changed/added/removed sections.

rolecraft compose <skill-a> <skill-b> [<skill-c> ...]

Combine multiple SKILL.md files into a single composed skill.

rolecraft compose ./a.SKILL.md ./b.SKILL.md                     # stdout (merge mode)
rolecraft compose ./a.SKILL.md ./b.SKILL.md -o combined.md       # write to file
rolecraft compose ./a.SKILL.md ./b.SKILL.md --chain --name Final # chain mode
rolecraft compose ./a.SKILL.md ./b.SKILL.md --dry-run            # preview only
rolecraft compose ./a.SKILL.md ./b.SKILL.md --force              # overwrite output
rolecraft compose ./a.SKILL.md ./b.SKILL.md --json               # JSON output
rolecraft compose ./a.SKILL.md ./b.SKILL.md --no-color           # disable ANSI colors

Modes:

  • merge (default): same-named sections are combined, lines deduplicated
  • chain: later skills override same sections

rolecraft upgrade

Upgrades rolecraft to the latest npm version.