Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Margaret is the developer's all-in-one engineering plugin: the one you reach for after you've already tried everything else and still didn't find the best solution or the best way to present it.
Jump to setup instructionsFetched from the repository for this visit.
Design the architecture first. Implement the smallest solution that satisfies it.
Access the full documentation: https://margaret.mintlify.site
Named for Margaret Hamilton, the lead software engineer for the Apollo Program's onboard flight software. Her team's code had to run on hardware with almost no memory or cycles to spare, survive real-time failure during a moon landing, and be provably correct because there was no patching it in flight. That's the standard this plugin borrows: engineered and reliable, no more than the mission needs.
Margaret is a plugin for developers. It bundles the things senior engineers actually want during a session:
Use them one at a time, or run /margaret-ship to take a change through all of them in order.
Two commands, matched to how often the work actually happens.
Once per repo — /margaret-init detects the stack and writes margaret's project context in two tiers: a block of five lines or fewer fenced into AGENTS.md (always in context — the one-line stack plus the constraints that prevent damage during ordinary work), and the detail in .margaret/, loaded only by the command that needs it. Re-runnable: it regenerates strictly between its fences, so your own prose survives. If anything is missing — no test command, no typecheck script, a CI job calling a runner the repo doesn't have — it says so and offers the fix. It's the only command that touches repo config.
Once per change — /margaret-ship runs the loop:
margaret-preflight → the repo's own typecheck, lint, tests
margaret-scan → over-engineering in the diff
margaret-guard → exploitable security findings in the diff
margaret-docs → changelog, context files, docs
It stops at the first failure, offers the fix, re-runs that step, then carries on — findings about code that's about to change are findings you pay for twice. It expects a person, so don't wire it to a git hook or CI; CI should run npm run typecheck, npm run lint, and npm test directly, which costs no tokens and needs no agent.
Design work sits outside the loop on purpose: /margaret-design code is once per feature and hands the diff back for you to refine, so it isn't a step in a per-change sequence.
Before writing code, the agent runs the candidate through a set of filters and builds at the first one that clears:
1. Is there even a requirement here? → no: skip it (YAGNI)
2. Does this repo already solve it? → reuse it, don't rewrite
3. Stdlib solves it? → use it
4. Platform feature solves it? → use it
5. Existing dependency solves it? → use it
6. One line solves it? → write the line
7. Otherwise: least code that satisfies the requirement
These filters only work once the problem is understood — the agent reads the code the change touches and traces the real flow before picking one. Never trimmed away: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. A shortcut that cuts a real corner gets a margaret: comment naming the ceiling and the upgrade path; non-trivial logic leaves one runnable check behind.
Without Margaret:
function getDateVariants(date: string): string[] {
const parts = date.split('-')
const yyyy = parts[0]
const mm = parts[1]
const dd = parts[2]
if (!yyyy || !mm || !dd) {
return []
}
const normalizedDay = String(Number(dd))
const normalizedMonth = String(Number(mm))
const normalizedYear = String(Number(yyyy))
const formattedOriginal = `${dd}-${mm}-${yyyy}`
const formattedNormalized = `${normalizedDay}-${normalizedMonth}-${normalizedYear}`
const variants = new Set<string>()
for (const candidate of [formattedOriginal, formattedNormalized]) {
if (candidate) {
variants.add(candidate)
}
}
return [...variants]
}
With Margaret:
function getDateVariants(date: string): string[] {
const [yyyy, mm, dd] = date.split('-')
if (!yyyy || !mm || !dd) return []
return [...new Set([
`${dd}-${mm}-${yyyy}`,
`${+dd}-${+mm}-${+yyyy}`,
])]
}
| Command | Args (default) | What it does |
|---|---|---|
/margaret | lean|full|max|off (full) | Design first, implement smallest. Sticks until changed or session end. |
/margaret-design | design|diagram|code|context|connect|motion (design) | Figma bridge both ways: generate a new artifact, or pull an existing file/selection into code. |
/margaret-guard | — | Security review of the current diff: high-confidence, exploitable findings only. |
/margaret-scan | [repo] (diff) | Over-engineering scan: one line per finding, repo scans the whole tree instead of the diff. |
/margaret-review | — | Hidden session mode: the complexity hunt held across turns instead of one pass. /margaret-review is the only spelling that works. |
/margaret-init | — | Set the repo up for the rest: detect the stack, write the context tiers, report what's missing. |
/margaret-ship | — | Per-change loop: checks, over-engineering scan, security pass, docs. Stops at the first failure. |
/margaret-help | — | Reference card for all of the above. |
Two skills trigger from natural language with no command of their own: margaret-preflight runs the repo's own checks ("run the tests", "typecheck") and margaret-docs realigns changelog and docs with a change that just landed ("update the docs"). Both are steps of /margaret-ship.
Switch the level for the current session with /margaret lean|full|max|off. Set the level for every new session with /margaret default <mode>, which writes it to ~/.config/margaret/config.json (%APPDATA%\margaret\config.json on Windows) — or set MARGARET_DEFAULT_MODE, which takes priority over the file. Default is full.
Node.js needs to be on your PATH for the hook-based hosts below — if it isn't, the skills still work, the always-on activation just stays quiet instead of erroring on every prompt.
Two separate prompts.
/plugin marketplace add <this-repo>
/plugin install margaret@margaret
codex plugin marketplace add <this-repo>
codex plugin add margaret@margaret
Run codex and open /hooks to review and trust the two lifecycle hooks (reused from Claude Code's hooks/claude-hooks.json).
Gemini has no hook system, so it loads AGENTS.md as always-on context instead of switching modes — the screen always applies.
gemini extensions install <this-repo-url>
None of these three run hooks either. Copy the matching rules file into your project:
.cursor/rules/margaret.mdc.windsurf/rules/margaret.md.clinerules/margaret.mdReference-only, not a packaged install: hooks/copilot-hooks.json and hooks/qoder-hooks.json document the hook shape those tools expect. Wire them into that tool's own settings by hand.
Removing the plugin (marketplace remove / delete the checkout) doesn't touch state margaret wrote elsewhere: the mode flag, ~/.config/margaret/config.json, and (if you wired it up) a statusLine entry in ~/.claude/settings.json. Run this before removing the plugin — the script is itself a plugin file:
It only removes the statusLine segment it owns, so a statusline you combined with another plugin's is left otherwise intact.
node scripts/uninstall.js
Runs the unit tests, checks that every declared command/skill in plugin.yaml is backed by a real file, and checks that the persona's static copies (AGENTS.md, .cursor/, .windsurf/, .clinerules/) haven't drifted from each other.
npm test
Margaret © 2026 by Sofia Botechia Hernandes is licensed under MIT.
GitHub checked 16h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.