Managing skills with the CLI
Use the ratel-mcp skill command group to move agent skills behind Ratel Local, wire the prompt-time preload hook, and debug skill ranking.
Ratel Local serves skills through the same catalog as tools. The agent finds them with
search_capabilities and loads a winner with get_skill_content.
Tools, MCP & Skills owns the concept and retrieval model.
This page covers the ratel-mcp skill commands that move folders and edit host settings.
Ratel Local loads <dir>/<name>/SKILL.md from its configured skill directories. Set them
with skills.dirs; otherwise it uses ~/.ratel/skills.
Frontmatter name and description are required. tags, triggers, and stacks are
optional. Author-defined triggers join the indexed tags.
Every CLI move is recorded in ~/.ratel/skill-manifest.json, so it can be reversed.
| Verb | Job |
|---|---|
activate | move Claude Code / legacy Codex skills into the Ratel-managed folder |
list | show which skills Ratel currently manages |
install-hook / uninstall-hook | register / remove the prompt-time preload hook |
preload-hook | the hook entrypoint itself (run by Claude Code, not by you) |
suggest | rank skills for a prompt, to debug why one does or doesn't fire |
deactivate | move managed skills back where they came from |
skill activate
ratel-mcp skill activate [--dry-run] [--yes]Moves native skill folders from ~/.claude/skills and ~/.codex/skills into
~/.ratel/skills. Each move is recorded in the manifest.
Codex uses newer skill locations
Ratel Local 0.4.0 scans the legacy Codex folder ~/.codex/skills. Current Codex
discovers personal skills from ~/.agents/skills and project skills from
.agents/skills, so activate does not find them.
To serve one through Ratel, move it
manually into ~/.ratel/skills or another directory in skills.dirs, and record its
original path yourself. deactivate cannot reverse that manual move; do not leave a
second native copy behind.
Ratel Local then serves those skills on demand instead of having the agent load all of them in every session.
Claude Code is scanned first. A skill id found in both agents is taken from Claude Code and skipped for Codex.
| Flag | Default | Effect |
|---|---|---|
--dry-run | off | report what would move without touching any files |
--yes | off | skip the confirmation prompt |
ratel-mcp skill activate --dry-runwould activate deploy-runbook
would activate debugging-checklistWithout --dry-run, the command confirms before moving. With nothing to do, it prints
no skills to activate (nothing new in ~/.claude/skills).
A name already in the managed folder is skipped, never overwritten. The manifest is written atomically after each move.
Activation always moves skills to ~/.ratel/skills. Keep that directory in
skills.dirs if you replace the default with custom directories.
Run it after installing Ratel Local. Run it again whenever you add native skills.
skill list
ratel-mcp skill listPrints the manifest: one line per managed skill with where it came from.
Ratel manages 2 skill(s):
deploy-runbook (from /Users/you/.claude/skills/deploy-runbook)
debugging-checklist (from /Users/you/.claude/skills/debugging-checklist)With an empty manifest it prints
Ratel manages no skills (run `ratel-mcp skill activate`). Use it before deactivating
skills or whenever you want to check what Ratel Local serves.
skill install-hook / skill uninstall-hook
ratel-mcp skill install-hook [--scope user|project] [--yes]
ratel-mcp skill uninstall-hook [--scope user|project]search_capabilities is the pull path: the agent finds a skill when it searches.
install-hook adds a push path for Claude Code. Its UserPromptSubmit hook runs
skill preload-hook on every prompt and injects a pointer when one skill clearly wins.
| Flag | Default | Effect |
|---|---|---|
--scope | user | user targets ~/.claude/settings.json; project targets <projectRoot>/.claude/settings.json (errors when no project root is found) |
--yes | off | skip the confirmation prompt (install only) |
ratel-mcp skill install-hook --scope userIt appends a hooks.UserPromptSubmit entry to the settings file:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{ "type": "command", "command": "ratel-mcp skill preload-hook", "timeout": 10 }
]
}
]
}
}The binary path resolves through $RATEL_MCP_BIN, then PATH, then an interactive
prompt. Installation is idempotent and backs up the settings file before editing.
Invalid settings JSON is refused rather than overwritten. uninstall-hook removes only
entries carrying the skill preload-hook marker.
Run install-hook once, right after your first activate.
skill preload-hook
ratel-mcp skill preload-hook [--limit N] [--min-score X]Claude Code runs this hook entrypoint on every prompt. You rarely invoke it yourself.
It reads prompt, cwd, and session_id from stdin, then ranks skills against the
prompt. It fires only for a clear lexical lead or a near-tie where exactly one skill
matches the detected project stack.
Otherwise it stays silent.
| Flag | Default | Effect |
|---|---|---|
--limit | 1 | widens the internal candidate pool only; the hook never points at more than one skill |
--min-score | 0 | drop hits below this raw lexical score |
On a hit it writes the standard hook output to stdout:
{
"hookSpecificOutput": {
"hookEventName": "UserPromptSubmit",
"additionalContext": "Ratel: project-relevant skill(s) may apply to this task. Before writing code, load the relevant one(s) with the `get_skill_content` tool and follow them:\n- deploy-runbook — How to deploy: env vars, preview vs production, rollbacks. → get_skill_content(\"deploy-runbook\")"
}
}Each skill is nudged at most once per session. Dedupe state lives under
~/.ratel/skill-preload/.
Project-stack detection is cached at ~/.ratel/skill-signal-cache.json. Dependency
manifest changes invalidate it.
The hook fails open. Errors inject nothing and never block the prompt.
skill suggest
ratel-mcp skill suggest --prompt "<text>" [--cwd <dir>] [--dir <path>]... [--limit N] [--min-score X] [--format json]Runs the preload hook's ranking as a standalone debugging tool.
Ranking uses BM25 over each skill's name, description, and
tags. The project stack from
--cwd multiplies a matching skill's score by 1.6× and can reorder the results. The
preload hook applies a separate clear-winner check before it injects a pointer.
| Flag | Default | Effect |
|---|---|---|
--prompt | required | the prompt text to rank against |
--cwd | — | project directory for stack detection |
--dir | config skills.dirs, else ~/.ratel/skills | skill directory to rank; repeatable |
--limit | 5 | maximum results |
--min-score | 0 | drop hits below this raw lexical score (the stack boost doesn't count) |
--format json | text | print the raw Suggestion[] instead of lines |
Without --dir, suggest reads skills.dirs only from ~/.ratel/config.json, then
falls back to ~/.ratel/skills. It does not merge project or local config. Pass each
project-specific directory explicitly with repeatable --dir to compare the same corpus
that a project gateway serves.
ratel-mcp skill suggest --prompt "build a login form" --cwd . --limit 3auth-flows (score 2.31) How to add authentication: sessions, OAuth, form validation.No hits prints no matching skills. With --format json, each hit includes skillId,
description, score, and stackMatch. A true stackMatch means the ordering boost
applied.
skill deactivate
ratel-mcp skill deactivate [--dry-run] [--yes]Restores each manifest-recorded skill to its source agent folder, then clears its manifest
entry. Skills created directly in ~/.ratel/skills stay put.
Occupied destinations and missing sources are skipped, never overwritten. --dry-run
and --yes behave as in activate.
Run it when you want an agent to own its skills natively again, or to hand a skill back before editing it in place.
A corrupt ~/.ratel/skill-manifest.json aborts activate, deactivate, and list with
an actionable error. Nothing moves until the manifest is fixed.
A typical loop
ratel-mcp skill activate— move native skills behind the pull path:search_capabilities→skills→get_skill_content.ratel-mcp skill install-hook— add the push path, so terse prompts still get a pointer to the single best skill.ratel-mcp skill suggest --prompt "..."— dry-run ranking, then tune the skill'sdescription,tags, ortriggers.ratel-mcp skill list/ratel-mcp skill deactivate— inspect what's managed, and reverse any move.
Ratel Local also ships a browser UI with the same manage/stop-managing actions, bulk operations, and a new-skill form. See Browser UI.