Are you the author? Sign in to claim
⚗️ Experimental — A genius-builder brain for your AI coding tools: sharp defaults, real judgment, and the discipline to
⚗️ Experimental (v0.27.0). Under active development — not yet stable, but usable. Its effect is measured in the open (see evals/RESULTS.md); APIs and defaults may change.
Make your AI coding assistant trustworthy. MasterMind is plain Markdown that gives Claude Code, Codex, Cursor, Copilot, and any AGENTS.md tool sharp defaults, real engineering judgment, and the discipline to check its own work — so you can rely on what it produces instead of watching every edit.
No app, no dependencies — just text that loads into your AI. You don't learn any commands: you talk normally ("build me X", "why is this slow?", "review this") and MasterMind applies the right discipline automatically. It improves itself over time, and it's tool-agnostic — one brain for every editor.
🗺️ New here? Explore the live interactive map.
Your AI already knows JavaScript, React, and algorithms. Re-teaching those wastes tokens. MasterMind adds only what's missing — the judgment and rigor that turn "looks right" into "verified":
This is the "trust layer" in Anthropic's own model of AI adoption: the self-verification that lets you stop supervising every change and start relying on the output.
engineering/ROUTER.md, generated by scripts/build-router.mjs — no AI, no network) points each
task straight to the one or two files it needs. The saving is every file it doesn't load: measured
~65% fewer tokens per task (measured; more on single-file tasks, less on multi-file ones). If the index is ever missing, it just loads the field the normal
way — a pure speed-up, never a dependency.CLAUDE.md # the kernel — always loaded, tiny
engineering/
├── active-field.md # which field is active + how leveling works
├── ROUTER.md # generated map: loads only the files a task needs
├── core/ # UNIVERSAL — how to think & work (field-agnostic)
│ ├── mindset · principles · rigor · agent-loop · product-sense
└── fields/_template/ # FIELD SCAFFOLD — init builds your field from this
├── stack-defaults · mentors · curriculum · learning-sources · lessons
└── audit-rules.md # framework-specific defect checks (for code-reviewer)
agents/ # architect · code-reviewer · refactorer · tech-scout
skills/ # auto-applied workflows (you never have to type these)
lab/ # your private, gitignored space for sensitive project data
First, you need an AI coding tool — MasterMind is the brain that plugs into one. If you don't have one yet, install Claude Code (or Codex, Cursor, Copilot, Gemini). Then, from inside the project you want it in:
# Per-project (default) — wires MasterMind into THIS project, for every AI tool you have:
cd my-project
curl -fsSL https://raw.githubusercontent.com/mehrad-dm/mastermind/master/bootstrap.sh | bash
# Prefer it everywhere? one global install for all projects:
curl -fsSL https://raw.githubusercontent.com/mehrad-dm/mastermind/master/bootstrap.sh | bash -s -- --global
MasterMind installs per project by default, and each project gets its own copy of the brain in
<project>/.mastermind/ — its own field, lessons and stack, committed so your team shares it. It wires
the current repo's .claude/ (Claude Code) plus AGENTS.md / .cursor/rules / GEMINI.md for the
tools you have — active only there. Prefer one shared brain for every project instead? add --shared.
Want it everywhere at once? --global. You install from ~/.mastermind; that clone is the source.
It's safe and self-healing — re-run anytime: it backs up a real CLAUDE.md, appends (never
overwrites) an existing AGENTS.md, refreshes the engine while keeping your project's own lessons,
and repairs any wiring. Nothing personal (sessions/memory/settings) is touched or published.
cd ~/.mastermind && git pull && ~/.mastermind/install.sh # update the brain + repair links
~/.mastermind/install.sh --check # is this project wired?
~/.mastermind/install.sh --uninstall # remove from this project (or --global)
Restart your tool after installing — until you do, the brain isn't loaded. Then confirm it's live: ask "are you running as MasterMind?"
Already installed globally (pre-0.20)? Your setup keeps working — nothing breaks. To switch to per-project:
~/.mastermind/install.sh --global --uninstall, then run~/.mastermind/install.shinside each project you want.
/plugin marketplace add mehrad-dm/mastermind
/plugin install mastermind@mastermind
This registers the skills and agents as native commands (user-global). They read the brain from
~/.mastermind, so run install.sh too — the plugin adds the command surface, install.sh wires the brain.
| Tool | How MasterMind loads | Wired by |
|---|---|---|
| Claude Code | project .claude/ — native skills/, agents/, and the kernel CLAUDE.md | install.sh |
| Codex | project AGENTS.md → the brain | install.sh |
| Cursor / Composer | .cursor/rules/mastermind.mdc — frontmatter alwaysApply: true, with the kernel inlined (a generated file, refreshed by re-running install.sh) | install.sh |
| Gemini CLI | project GEMINI.md → the brain (or global gemini extensions install github.com/mehrad-dm/mastermind) | install.sh |
| GitHub Copilot | .github/copilot-instructions.md → symlinked to the kernel, plus .github/hooks/mastermind.json | install.sh copilot |
| Any AGENTS.md tool | project AGENTS.md (Windsurf, Zed, Aider, JetBrains…) | install.sh |
| Plain chat (ChatGPT, …) | paste core/mindset.md + core/principles.md + the field's stack-defaults.md | — |
With --global, Claude Code + Codex are wired once in ~/ for every project instead.
A per-project install now copies the engine into <project>/.mastermind/ — its own field, its
own lessons.md, its own stack defaults — and commits it, so a teammate cloning the repo gets the
same brain. Nothing a lesson learned in one client repo can leak into another.
| (default) isolated | --shared | |
|---|---|---|
| The brain lives in | <project>/.mastermind/ — its own copy | ~/.mastermind — one copy for all |
Field, lessons.md, stack-defaults | owned by this project | shared by every project |
| Updating | re-run install.sh here, when you choose | git pull updates every project at once |
| Committed to the repo? | yes — teammates get the same brain | nothing added |
cd my-project && ~/.mastermind/install.sh # isolated — its own brain
cd my-project && ~/.mastermind/install.sh --shared # opt back into the single shared clone
--check tells you when an isolated project has drifted behind the clone. lab/ stays gitignored
either way. Run it from anywhere in the repo — it installs at the git root, so a monorepo gets
one brain, not one per subfolder.
When one repo holds apps on different stacks — or two React apps with different conventions — give
each its own context. A routes.map in the project's brain maps path globs to contexts:
# .mastermind/routes.map
apps/web/** web
apps/api/** api
packages/** shared
The installer compiles that into each app's own tool-native anchor — a nested CLAUDE.md /
AGENTS.md and a glob-scoped .cursor/rules — so the tool loads the right context by file path,
not the model guessing. Web's lessons never reach api; each app pulls only its own field +
context, so it's isolated and uses fewer tokens. A missing context is created from a template using
the default field; edit its field.md to point at another field once you've bootstrapped one.
A project with no routes.map is single-field — nothing changes, the common case stays simple.
Cursor is per-project only.
--globalcovers~/.claudeand~/.codex; Cursor has no equivalent user-level rules directory we can write, so runinstall.shinside each repo you want it in. Without that, Cursor has no MasterMind at all — and you end up typing "use MasterMind" on every prompt to do by hand what the rule should do for you.
You never have to invoke anything. Describe what you want; MasterMind recognizes it and applies the
matching skill. (Power users can type /name as a shortcut, but nobody has to.)
| When you… | MasterMind automatically… |
|---|---|
| ask to build a feature | designs → implements to rigor → verifies → reviews → captures lessons (build) |
| hit a hard bug | runs structured, evidence-first debugging (debug) |
| finish something | proves it works end-to-end; offers tests/TDD rather than forcing them (qa) |
| face an unknown | learns the real stack + grills its own assumptions against the source (learn, spike) |
| give a fuzzy ask | turns it into a crisp spec — problem, scope, terms, acceptance (spec) |
| want code to fit your team | captures the codebase's real style → name-free rules it follows (signature) |
| want code in a style you admire | writes in the documented public style of an engineer you name — e.g. Dan Abramov, Kent C. Dodds (persona) |
Also auto-applied (and callable by name): explain (AI-friendly docs for an internal package), lab
(a private, gitignored space for sensitive data), handoff, and levelup (teach MasterMind something durable).
Specialist agents — architect, code-reviewer, refactorer, tech-scout — handle deep,
isolated-context work. Full index: skills/README.md.
An LLM's weights are fixed; MasterMind improves by editing its own knowledge base. It turns your corrections and review findings into durable lessons, refreshes best-practices against the live ecosystem, and can bootstrap a whole new field pack for your stack. Every improvement is a git commit — visible and reversible.
Sensitive project data (a client's stack, a team's internal patterns) stays in a gitignored lab/ and
is protected by commit/push guards, so it can never be published by accident. Only the generic,
name-free lesson ever graduates into the shareable knowledge base — patterns, not identities.
Plain Markdown, no runtime — works with any model (Claude, GPT/Codex, Gemini, local) and any tool. Claude Code gets native agents and skills; other tools read the same files and follow them as procedures. One brain, every editor.
Stated plainly, because a tool about not overclaiming shouldn't overclaim about itself.
evals/. Mechanism runs that don't clear that bar are
marked in evals/RESULTS.md and are never quoted publicly..cursor/rules/mastermind.mdc rule works and is the
load-bearing path. The sessionStart/preCompact hook is wired to Cursor's published schema, but
Cursor has open upstream bug reports where a hook's additional_context is accepted and never reaches
the model — so we wire it and say so, rather than claim it works. The installer prints
(unverified upstream) when it wires it.engineering/fields/_template/. init builds the field
for your project's real stack (a pack tuned to someone else's stack is worse than none). The template is
routable and integrity-checked, so a freshly built pack works on day one.Created and maintained by mehrad-dm. Built with Claude Code (Anthropic).
MIT — see LICENSE.
Design enforcement with memory — keeps your UI consistent across a project
Create animation-rich HTML presentations using a coding agent's frontend skills
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Detects 37 AI writing patterns and rewrites text with human rhythm across 5 voice profiles