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.
npx skills add xcrft/mastermind --skill mastermind-codegraph-researchgit clone --depth 1 https://github.com/xcrft/mastermindWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xcrft/mastermind/mastermind-codegraph-research)<a href="https://agentmods.dev/skills/xcrft/mastermind/mastermind-codegraph-research"><img src="https://agentmods.dev/badge/skills/xcrft/mastermind/mastermind-codegraph-research/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xcrft/mastermind/mastermind-codegraph-research"><img src="https://agentmods.dev/badge/skills/xcrft/mastermind/mastermind-codegraph-research.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.02642 |
| Opus 5.5 | $0.00018 | $0.01057 |
| Sonnet 5.5 | $0.00009 | $0.00528 |
| Haiku 4.5 | $0.00005 | $0.00264 |
Grade A, and why
mastermind-codegraph-research 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codegraph research — discover structure with mmcg
The shared structural discovery layer for Mastermind. Claims about symbol existence, indexed callers, imports, and bounded blast radius come from a fresh mmcg result rather than memory. Exact source contracts and runtime behavior come from source reads and tests.
The graph is syntactic evidence with name-based target candidates, without compiler/type resolution. Dynamic dispatch, reflection, generated code, re-exports, and cross-language edges can reduce precision.
Never name a symbol, file, caller, or blast radius from memory. "I think X exists" is not evidence; mmcg_search X returning a hit is. A spec, audit, or critique built on a guessed symbol fails at the first step that touches real code.
Effort selection at handoff
Before starting a research agent, use [[mastermind-agent-handoff]] to select and apply effort to the ordinary spawn. Preserve the source/map bindings and carry facts and gaps when the duty changes. Source and citation checks below still apply.
Structural vs literal
- Bounded orientation (relevant changes, symbols, callers, tests, and history
for a role) → one
mmcg_briefbefore broad discovery. Use its aggregatedisciplinesto route needed evidence: inspect frontend interaction states, QA coverage, or migration data and rollback boundaries when those disciplines are detected. The classifier is path-based and is not proof of behavior; a scope-incomplete signal means it classified only returned changed files. - Concept discovery (the intent is known but the exact symbol is not) →
Before retrieval, freeze a query-only
request_contract: the requestedoperationand exact quotedconstraintswith uniqueid, original-querytextandkind(input,state,scope,result). Pass it tommcg_concept_prepare, inspect the bound source, thenmmcg_concept_finish. The original query stays authoritative if that ledger is incomplete or mistaken. Omitting it supplies the whole query as the operation with an empty parsed ledger; it does not remove any original constraint. Supply alternative implementation vocabulary in optionalhintswhen the request uses different words; preserve the original query as the criterion. Assess the requested action, object and constraints for every candidate. Topic mentions, unrelated dispatch and neighboring operations are insufficient. Followoperation-roles-v3: relevant entries declareimplementation,entrypoint,contract,essential_helperorsupporting_context. First identify the candidate's own observable behavior, then its relationship to the operation. A concrete branch inside a broad handler or file module may own or expose the operation through a mandatory inspected path; delegation alone does not reduce it to context. A helper need not implement the whole workflow, but being mandatory or running earlier is insufficient: its own behavior must perform a defining domain step or enforce a requested constraint. Useful generic readiness, configuration or lifecycle prerequisites remain context. Bind non-implementation roles to inspected caller/consumer/implementation source ranges throughsupporting_evidence; entrypoints/contracts/helpers require evidence outside their own declaration. Generic call-graph membership is insufficient. Admit context only for specific inspected navigation to an existing requested operation satisfying every explicit constraint. Opposite or missing behavior, a narrower scope, or a place to add the feature is irrelevant. An uninspected constraint stays unknown. Prefer semantic roles for necessary steps and specific result entrypoints, including cached-result paths. Relevant entries require a typedwitnesswith ownbehavior,relationandconstraint_checks. Cover every declared constraint exactly once byconstraint_id,status=matchedand inspected source-boundevidence. Contradicted checks require irrelevant; uninspected checks require unknown, including for context. Preserve input options separately from runtime state and result conditions: an omitted selector does not establish absent binding, and rendering instructions does not execute the requested action. Record unresolved intent inquery_ambiguities; useful results for an ambiguous query may only be supporting context under a plausible original interpretation that retains every explicit constraint. The fullcandidatespage preserves navigation. Use itssemantic_candidatespartition for operation claims and retainsupporting_contextseparately. Read beyond incomplete excerpts when needed; otherwise keep the candidate unknown. The calling agent supplies judgments; the server checks source bindings, completeness and declared consistency, not semantic truth. Reprepare after a role-contract change. Retrieval limits and unknowns prevent an absence claim. Usemmcg_conceptfor a fast lexical shortlist, then read source; its score does not establish operation relevance. Query only returned symbol names. - Structural discovery (symbols, indexed callers/callees, imports, bounded blast radius) → mmcg first. It understands syntax better than literal text search, but remains name-based and bounded.
- Literal (string contents, log messages, comments, config values) →
Grep/Read. The persistent symbol index omits strings; operation review may read bounded source bodies. - Runtime contract (dynamic dispatch, reflection, generated code, re-exports, cross-language edges, exact branch behavior) → read source and run focused tests.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed · +43 lines 2958593c3a8e
- 3d ago Changed · +7 lines 6611e09ca683
- 7d ago Changed · +7 lines b8bb624dd552
- 27d ago Changed · +5 lines acb87543fd39
- 1mo ago Changed · +37 lines 2a0f3b0004cc
- 1mo ago First seen · 104 lines · 45 tokens per session scan A 5bdf75ed9da8
mastermind-codegraph-research is a skill published in the GitHub repository xcrft/mastermind (13 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 2,642 once invoked, about $0.0002 per session on Opus 5.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-30.
Other skills, from other repositories
roam
Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…
dora
Query codebase using dora CLI for code intelligence, symbol definitions, dependencies, and architectural analysis.
codehelper-debugging
When to use.
ix
Answer structural questions about a codebase — what a symbol is, what calls it, what a change breaks, where the hotspots are — from a persistent code graph via the ix CLI, instead of grepping.
x-ray
Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.
lsp-inspect
Full code quality audit for a file, package, or directory. Supports batch mode (directory walk with --top ranking), comparison mode (--diff for branch-only issues), severity calibration by blast radius, fix suggestions, and confidence tiers. Applies a check taxonomy (dead symbols, silent failures, error wrapping…