MAGS — Memory And Guidance System for Claude Code
npx claudepluginhub doancan/magsMemory And Guidance System — Project documentation memory, session persistence, and development guidance for Claude Code
A Claude Code plugin that keeps your project context alive across sessions.
MAGS indexes your documentation and remembers decisions — so every new conversation picks up exactly where the last one left off.
Claude Code sessions are stateless. Every time you start a new conversation, you lose context: what was decided, what was built, what's next. MAGS solves this by giving Claude a persistent memory layer tied to your project.
/mags-legacy command for existing codebases: generates architecture docs, migration plans, and tech debt trackingpack.yaml manifests# Add the marketplace source
claude plugin marketplace add https://github.com/doancan/mags
# Install the plugin
claude plugin install mags@mags-marketplace
Restart Claude Code, then inside any project:
/mags-init
That's it. MAGS will scan your docs/ directory (or help you create one from templates) and start tracking your project.
| Command | What it does |
|---|---|
/mags-init | Set up MAGS for your project — scan docs or scaffold from templates |
/mags-status | Dashboard — doc health score, next steps |
/mags-docs | List all project documents |
/mags-docs-create <template> | Create a new document from template |
/mags-docs-validate | Run document validation checks |
/mags-docs-search <query> | Search across all documents |
/mags-changelog | Generate a changelog from git history |
/mags-setup | Analyze your project and recommend Claude Code configuration |
/mags-legacy | Initialize MAGS for a legacy/brownfield project with stack detection and tech debt tracking |
/mags-help | Quick reference of all commands, skills, agents, and hooks |
These run silently in the background — no action needed from you:
| Event | What happens |
|---|---|
| SessionStart | Loads project summary and conventions |
Claude automatically uses these when relevant:
| Skill | Activates when |
|---|---|
doc-management | Creating or editing project documentation |
memory-guidance | Storing decisions, conventions, or session context |
claude-md-management | Working with CLAUDE.md project configuration |
testing-strategy | Planning tests, test pyramid, coverage targets, mocking strategies |
security-review | Security audits, OWASP Top 10, threat modeling, secure coding |
infrastructure | DevOps, CI/CD pipelines, containerization, monitoring, deployment |
api-lifecycle | API design, versioning, deprecation, rate limiting, OpenAPI/GraphQL |
| Agent | Purpose |
|---|---|
doc-sync-validator | Checks if documentation matches the actual code |
setup-recommender | Recommends plugins, skills, and hooks for your stack |
Session starts
→ Hook loads: project summary + conventions
You work normally
→ Claude uses MAGS tools as needed (memory, docs)
→ Decisions and context are stored via mags_remember
Next session starts
→ Project summary is restored automatically
→ Stored memories carry over across sessions
Store decisions, conventions, and notes as key-value pairs. MAGS searches them using TF-IDF scoring (offline) or OpenAI embeddings (optional).
"We're using JWT with refresh tokens for auth, remember this"
→ mags_remember is called automatically
Categories: decisions, conventions, notes, context, bugs
MAGS indexes your docs/ directory — parses YAML frontmatter, extracts section headings, and builds a fuzzy search index. Supports .md, .mdx, .rst, and .adoc.
Production-ready workflow orchestration with 84 marketplace plugins, 192 local specialized agents, and 156 local skills - optimized for granular installation and minimal token usage
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations
Curated collection of 154 specialized Claude Code subagents organized into 10 focused categories