Skip to content

Claude Code

Claude Code gets the full surface: a project-scope MCP server, a plugin with five slash commands, a code-analyst subagent, and 11 skills. Everything in this page is shipped at plugins/opencodehub/.

from inside the target repo
codehub init

codehub init writes a project-scope .mcp.json, links the plugin under .claude/, appends .codehub/ to .gitignore, and seeds opencodehub.policy.yaml. Restart Claude Code to pick up the changes.

The .mcp.json shape:

.mcp.json
{
"mcpServers": {
"opencodehub": {
"command": "codehub",
"args": ["mcp"],
"env": {}
}
}
}

codehub mcp runs the stdio MCP server. The 29 tools register under the mcp__opencodehub__* namespace.

The plugin lives at plugins/opencodehub/. codehub init symlinks it into the target repo’s .claude/ directory.

SurfaceCountWhat
Slash commands5/probe, /verdict, /owners, /audit-deps, /rename
Subagent1code-analyst
Skills11listed below
Hooks2PreToolUse augment + PostToolUse re-index
CommandArgumentRuns
/probe <symbol>symbol namecontext + impact(direction: upstream, depth: 3); returns a 5-line brief — what it does, top callers, top callees, blast radius, risk tier.
/verdict [base-ref]optional base ref (defaults to main)verdict against the base; returns tier, top drivers, blockers, next action.
/owners <target>symbol or pathowners; returns top 3 contributors with commits, last-touched, lines changed, plus the code-owner candidate.
/audit-depsnonelicense_audit + list_findings; returns license tier, GPL/strong-copyleft deps, proprietary/unknown deps, security findings.
/rename <old> <new>two namesrename(dry_run: true) first, prints diff, asks for confirmation; only writes on explicit yes.

Source for each command: plugins/opencodehub/commands/.

The code-analyst subagent has access to 16 OCH MCP tools plus Read/Grep/Glob. Its rules of engagement:

  • Exploring — uses query for concept jumps and context for the 360° view.
  • Impactimpact(direction: upstream) for callers, direction: downstream for callees; api_impact for public API boundaries; shape_check for structural drift.
  • Ownershipowners; quotes signatures verbatim from signature rather than paraphrasing.
  • Riskverdict, list_findings, list_findings_delta, license_audit, list_dead_code.
  • Refactorsrename with dry_run: true first, never applies without explicit confirmation.

Every claim is grounded in a tool call. If a tool returns nothing, the subagent says so — it does not invent coverage.

Source: plugins/opencodehub/agents/code-analyst.md.

The plugin ships 11 skills. Skills auto-trigger when their description matches the user’s request, or you can name them explicitly. Pick from the table:

SkillWhen to use
codehub-documentLong-form codebase docs — architecture book, module map, per-repo reference. Run after codehub analyze or after a large merge.
codehub-pr-descriptionPR write-up, branch summary, release notes. Calls detect_changes + verdict + owners + list_findings_delta. Refuses on a clean tree.
codehub-onboardingRanked reading order for new engineers. Pulls project_profile + top processes + entry points + owners + centrality.
codehub-contract-mapCross-repo HTTP contract matrix. Group mode only — needs a named group.
codehub-code-packDeterministic 9-item code pack (manifest, skeleton, file-tree, deps, AST chunks, xrefs, embeddings, findings, licenses + readme). Byte-identical for the same (commit, tokenizer, budget).
opencodehub-impact-analysis”Is it safe to change X?” / “What depends on this?” / blast-radius questions.
opencodehub-pr-review”Review this PR”, “What does PR #42 change?”, “Is this PR safe to merge?”
opencodehub-exploring”How does X work?”, “What calls this?”, “Show me the auth flow.”
opencodehub-debugging”Why is X failing?”, “Where does this error come from?”, “Trace this bug.”
opencodehub-refactoring”Rename this”, “Extract this into a module”, “Move this.”
opencodehub-guideReference for OpenCodeHub itself — tools, resources, schema.

Source: plugins/opencodehub/skills/.

The plugin’s hooks.json registers two hooks:

  • PreToolUse on Bash | Grep | Glob — runs hooks/augment.sh (5s timeout) to enrich the call with graph context before the tool fires.
  • PostToolUse on Bash — re-indexes incrementally after git commit | merge | rebase | pull, and runs hooks/docs-staleness.sh to flag stale generated docs.

You can disable either by editing .claude/plugins/opencodehub/hooks.json in the target repo.

In a Claude Code session, ask:

which OpenCodeHub tools do you see?

The agent should list 29 tools, all under mcp__opencodehub__*. If it sees zero, the most common causes are: Claude Code wasn’t restarted after codehub init, or codehub is not on PATH for the editor’s process (try launching the editor from a shell that has codehub resolved, or set command to the absolute path in .mcp.json).