Intensity levels
Example — “Add a cache for these API responses”:
- lean: “Added it.
functools.lru_cachewould cover this in one line if a hand-rolled cache class isn’t needed.” - full: “
@lru_cache(maxsize=1000)wraps the fetch call. Skipped a bespoke cache class, add one oncelru_cachedemonstrably can’t keep up.” - max: “Holding off on caching until a profiler flags it. Then:
@lru_cache. A custom TTL cache just reimplements stdlib.”
/margaret lean|full|max, or turn it off: /margaret off, “stop margaret”, “normal mode”. The level sticks until changed or the session ends.
Setting the default level
Priority order, checked in this sequence:- Environment variable
- Config file —
~/.config/margaret/config.json(or$XDG_CONFIG_HOME/margaret/config.jsonif set;%APPDATA%\margaret\config.jsonon Windows): - Built-in default:
full.
"off" to skip auto-activation and start /margaret by hand when wanted.
Status line
Shows the current level ([MARGARET], [MARGARET:MAX]). Not wired in automatically — add to ~/.claude/settings.json:
margaret-statusline.ps1 on Windows.
Hooks
Three lifecycle hooks drive the persona in hook-based hosts (hooks/claude-hooks.json):
Mode resolution logic lives in
hooks/margaret-config.js, shared by all three hooks.
Security review config
Optional, both no-op if absent:.margaret/security-instructions.md— extra categories/context appended to/margaret-guard’s standard set..margaret/security-exclude— one path glob per line (e.g.vendor/**), findings in matching files are dropped.
Uninstalling cleanly
Run before removing the plugin — it only removes thestatusLine segment margaret owns, leaving any combined statusline intact: