opencodehub CLAUDE.md

A set of instructions for using OpenCodeHub, a local tool that indexes code and maps how files and symbols relate to one another. It also documents repository-specific lessons and a Claude Code plugin.

In plain words
What is it for?
Use it to find symbols, inspect what depends on them, estimate change impact, map diffs to affected code, review scan findings, and run read-only queries against the local code history.
Why use it?
It helps an agent explore a codebase through dependency and execution-flow information instead of relying only on ordinary text search. It also explains when the index is stale and how to refresh it.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/theagenticguy/opencodehub/claude-md
Clone the repo
git clone --depth 1 https://github.com/theagenticguy/opencodehub
Per session 1,722 This file is loaded in full into every session.
When invoked 1,722 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01722 $0.01722
Opus 5 $0.00861 $0.00861
Sonnet 5 $0.00344 $0.00344
Haiku 4.5 $0.00172 $0.00172

Measured yesterday against content hash 18bc3bd857ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opencodehub CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCodeHub MCP Tools

This repository has been indexed by OpenCodeHub. When you are working in this codebase, prefer the following MCP tools over raw file search — they return graph-aware results grouped by execution flow and include blast-radius risk tiers.

  • list_repos — enumerate repos currently indexed on this machine.
  • query — hybrid BM25 + vector search over symbols, grouped by process.
  • context — inbound/outbound refs and participating flows for one symbol.
  • impact — dependents of a target up to a configurable depth, with a risk tier.
  • detect_changes — map an uncommitted or committed diff to affected symbols.
  • list_findings — browse SARIF findings from the latest scan by severity and rule.
  • sql — read-only SQL against the local temporal store (cochanges), 5 s timeout; the node/edge graph is queried via the typed tools or Cypher via the MCP sql tool.

Run codehub analyze after pulling new commits so the index stays aligned with the working tree. codehub status reports staleness.

Full MCP surface

The full MCP surface is 29 tools (see packages/mcp/src/server.ts); the 6 listed above are the high-frequency exploration tools. For the full inventory, use the /codehub-guide skill.

AMBIGUOUS_REPO

When two or more repos are indexed on this machine, per-repo tools require an explicit repo: (or the repo_uri: alias — a Sourcegraph-style URI such as github.com/org/repo, or local:<hash> for unpublished repos) and return AMBIGUOUS_REPO otherwise. The error envelope carries a structured _meta payload on structuredContent.error: { error_code: "AMBIGUOUS_REPO", jsonrpc_code: -32602, choices: [ { repo_uri, default_branch, group } ] (capped at 10), total_matches, hint } — so the calling agent can retry deterministically with a single repo_uri from choices. When total_matches > choices.length, the caller knows the list was truncated.

See ADR 0012 (docs/adr/0012-repo-as-first-class-node.md) for the rationale behind repo_uri as a first-class node attribute. The repo_uri shape was promoted to a typed graph attribute by AC-M6-1 (packages/core-types/src/nodes.ts:524-552). group_cross_repo_links (the AC-M6-3-reframed MCP tool) and the group_* family (AC-M6-4) all emit repo_uri in the same canonical form, so a caller can use any of those tools' repo_uri outputs as input to AMBIGUOUS_REPO.choices retries.

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 132 lines · 1,722 tokens per session scan A 18bc3bd857ef

Subscribe to this mod's changes

opencodehub CLAUDE.md is an instructions file published in the GitHub repository theagenticguy/opencodehub (3 stars, last pushed 20d ago), licensed Apache-2.0. It adds 1,722 tokens to every session, about $0.0086 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories