Imported from shortcuts/radin (
skills/radin-setup-hooks/SKILL.md). Install upstream withnpx skills add shortcuts/radin --skill radin-setup-hooks. Copyright stays with the author.
radin: Set Up Companion-Tool Hooks
install.sh normally wires codebase-memory-mcp globally: it runs upstream's
own configuration and restores whatever that write dropped. When it did that, there is nothing for
this skill to do — the graph works in every repo with no per-project step.
This skill is the fallback for two cases:
- A C compiler was missing at install time, so
radin-cbm-jsonwas never built andinstall.shinstalled the binary only. - The user ran
codebase-memory-mcp uninstallbut kept radin.
Check first with RADIN_CLI doctor and read its
codebase-memory-mcp wiring (informational) section. Both lines OK means
upstream's configuration already landed: say so and stop, unless the user
wants a per-repo .mcp.json entry anyway.
Scope
Only codebase-memory-mcp needs wiring at all. caveman and ponytail are
Claude Code plugins, so their hooks register globally at plugin-install time.
rtk is a CLI with no hook or MCP wiring. If radin later adds another
companion tool that needs wiring, extend this skill and
lib/radin-cbm-hooks.sh rather than writing a new one.
Never run codebase-memory-mcp install yourself. Its write replaces whole
hook arrays in ~/.claude, deleting other tools' hooks. Only
RADIN_CLI cbm-config install may run it, because it snapshots first and
restores after. When the user wants the full wiring, run that and report its
RESTORED/INTACT lines as-is; it exits non-zero naming
RADIN_CLI cbm-hooks all as the fallback when it cannot. Otherwise use the
merge-only path below.
Steps
-
Confirm the user is in the repo they want wired: run
git rev-parse --show-topleveland show the path. If it does not look right, ask. -
Ask for explicit y/n confirmation, naming the two writes: "This adds a codebase-memory-mcp section to
~/.claude/CLAUDE.mdand an MCP server entry to.mcp.jsonin<repo path>. Anything already defined is left alone. Proceed?" -
On yes:
RADIN_CLI cbm-hooks all -
On no: stop, write nothing.
Report
Print the script's output as-is: one ADDED or PRESENT line per write. A
non-zero exit writes nothing and prints its own cause and remedy -- relay that
line, add nothing to it.
Then tell the user to restart Claude Code so the MCP server loads. The graph
indexes itself on first connection (install.sh sets auto_index); if a query
reports no project, ask the agent to index the project.