Skip to content

Claude Code

Claude Code gets the full surface: a project-scope MCP server, a plugin with 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 28 tools register under the mcp__opencodehub__* namespace. Every one is read-only with respect to your source — no tool edits the working tree.

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

SurfaceCountWhat
Subagent1code-analyst
Skills11listed below
Hooks2PreToolUse augment + PostToolUse re-index

The code-analyst subagent has access to 15 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.
  • Refactor planningimpact + context to map the blast radius and every reference, then detect_changes to verify scope after you apply the edits. The MCP surface is read-only; it plans and verifies, it does not edit source.

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).
codehub-impact-analysis”Is it safe to change X?” / “What depends on this?” / blast-radius questions.
codehub-pr-review”Review this PR”, “What does PR #42 change?”, “Is this PR safe to merge?”
codehub-exploring”How does X work?”, “What calls this?”, “Show me the auth flow.”
codehub-debugging”Why is X failing?”, “Where does this error come from?”, “Trace this bug.”
codehub-refactoring”What breaks if I rename this?”, “Map callers before I extract this module.”, “Did my refactor touch anything unexpected?” (plan + verify; you apply the edits)
codehub-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 28 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).