mastermind-codegraph-research

mastermind-codegraph-research is a skill for Codex from xcrft/mastermind. It costs 45 tokens per session (2,642 once invoked), scanned A, original, MIT.

A repository-research guide for Mastermind, a code-analysis system that maps symbols, callers, imports, and dependencies.

In plain words
What is it for?
Use it to orient yourself in a repository, find symbols and their callers, trace dependencies, check whether files exist, and handle outdated indexes.
Why use it?
It helps an agent investigate a codebase with structural evidence instead of guessing names or relying only on text searches.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to orient yourself in a repository, find symbols and their callers, trace dependencies, check whether files exist, and handle outdated indexes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xcrft/mastermind/mastermind-codegraph-research
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.

Any agent
npx skills add xcrft/mastermind --skill mastermind-codegraph-research
Clone the repo
git clone --depth 1 https://github.com/xcrft/mastermind

Made for: Codex.

Wrote 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.

agentmods badge for mastermind-codegraph-research

README.md
[![agentmods](https://agentmods.dev/badge/skills/xcrft/mastermind/mastermind-codegraph-research/github.svg)](https://agentmods.dev/skills/xcrft/mastermind/mastermind-codegraph-research)
Your own site
<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.

agentmods 80×15 button for mastermind-codegraph-research

Your own site · 80×15
<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>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured today against content hash 2958593c3a8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

skills/workflow/mastermind-codegraph-research/SKILL.md · 203 lines

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_brief before broad discovery. Use its aggregate disciplines to 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 requested operation and exact quoted constraints with unique id, original-query text and kind (input, state, scope, result). Pass it to mmcg_concept_prepare, inspect the bound source, then mmcg_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 optional hints when 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. Follow operation-roles-v3: relevant entries declare implementation, entrypoint, contract, essential_helper or supporting_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 through supporting_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 typed witness with own behavior, relation and constraint_checks. Cover every declared constraint exactly once by constraint_id, status=matched and inspected source-bound evidence. 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 in query_ambiguities; useful results for an ambiguous query may only be supporting context under a plausible original interpretation that retains every explicit constraint. The full candidates page preserves navigation. Use its semantic_candidates partition for operation claims and retain supporting_context separately. 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. Use mmcg_concept for 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.

Read the full file on GitHub · 203 lines

Files

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.

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. today Changed · +43 lines 2958593c3a8e
  2. 3d ago Changed · +7 lines 6611e09ca683
  3. 7d ago Changed · +7 lines b8bb624dd552
  4. 27d ago Changed · +5 lines acb87543fd39
  5. 1mo ago Changed · +37 lines 2a0f3b0004cc
  6. 1mo ago First seen · 104 lines · 45 tokens per session scan A 5bdf75ed9da8

Subscribe to this mod's changes

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.