Persistent memory, smart hooks, and curated skills for Claude Code CLI.
Never lose context again.
A production-ready configuration system for Claude Code CLI that transforms it from a stateless assistant into a persistent, context-aware development partner.
Out of the box, Claude Code CLI:
- Forgets everything between sessions — no memory of previous conversations
- Loses context on compact — auto-compact summarizes and destroys critical details
- Doesn't enforce workflows — skills and best practices are optional and easy to skip
- Requires manual setup per project — MCP servers, .gitignore, memory files
- No diagnostics — you can't see what's configured at a glance
Claude Code Mastery gives you:
| Feature | What It Does |
|---|---|
| Perpetual Memory | 6-file Memory Bank per project, auto-configured via MCP |
| Smart Hooks | 6 lifecycle events that preserve context and enforce workflows |
| 26+ Curated Skills | From 5 marketplaces: Superpowers, Trail of Bits, CEK, Shield, and custom |
| Zero-Config Launcher | One command (claude) sets up everything automatically |
| Context7 Integration | Auto-lookup of up-to-date library documentation |
| Task Management | Built-in task tracking as a second persistence layer |
curl -fsSL https://raw.githubusercontent.com/alissonlinneker/claude-code-mastery/main/install.sh | bashgit clone https://github.com/alissonlinneker/claude-code-mastery.git
cd claude-code-mastery
./install.shirm https://raw.githubusercontent.com/alissonlinneker/claude-code-mastery/main/install.ps1 | iexOr manually:
git clone https://github.com/alissonlinneker/claude-code-mastery.git
cd claude-code-mastery
.\install.ps1WSL users: The bash installer (
install.sh) auto-detects WSL and is recommended. Useinstall.ps1only for native Windows/PowerShell.
# macOS/Linux: reload your shell
source ~/.zshrc # or source ~/.bashrc
# Windows: reload your PowerShell profile
. $PROFILE# Navigate to any project
cd your-project
# Just run claude — everything is auto-configured
claudeOn first run in a project, the launcher automatically:
- Creates
.mcp.jsonwith Memory Bank MCP configuration - Creates
.memory-bank/directory for persistent memory - Adds
.memory-bank/,.mcp.json,.claude-logs/to.gitignore - Displays project diagnostics
┌──────────────────────────────────────────────┐
│ Claude Code — my-project │
└──────────────────────────────────────────────┘
--- Project Diagnostics ---
CLAUDE.md [OK] 7967 bytes
Memory Bank [OK] 6 files
- activeContext.md (1229B)
- productContext.md (1467B)
- progress.md (1788B)
- projectbrief.md (1045B)
- systemPatterns.md (1621B)
- techContext.md (2564B)
MCP [OK] configured
Branch main
Modified 3 files
Last commit f3f5589 fix: improve auth flow
Log: .claude-logs/session_20260314_143022.log
Every project gets 6 persistent memory files that survive across sessions and compactions:
| File | Purpose |
|---|---|
projectbrief.md |
Project overview, goals, scope |
productContext.md |
Business rules, features, user flows |
techContext.md |
Tech stack, dependencies, configurations |
systemPatterns.md |
Architecture decisions, code conventions |
activeContext.md |
Current tasks, recent decisions, next steps |
progress.md |
What was done, what remains |
Claude is instructed to read all files at session start and write updates after every task — ensuring context is never lost. See the Memory Bank Guide for details.
| Hook | When | What It Does |
|---|---|---|
SessionStart (startup) |
New session | Auto-updates plugin marketplaces |
SessionStart (default) |
Every session | Shows diagnostics, instructs Memory Bank read |
SessionStart (compact) |
After compaction | Full context restoration from Memory Bank |
UserPromptSubmit |
Every user message | Reminds: Memory Bank, Skills, Context7 |
PreCompact |
Before compaction | Auto-saves git state snapshot + instructs full context save |
Stop |
After each response | Reminds to update Memory Bank on task completion |
TaskCompleted |
Task done | Updates Memory Bank and task tracker |
PreToolUse (Bash) |
Before bash commands | Blocks dangerous commands (rm -rf, force push, etc.) |
Superpowers (14 skills) Workflow automation: brainstorming, systematic-debugging, test-driven-development, writing-plans, executing-plans, dispatching-parallel-agents, subagent-driven-development, using-git-worktrees, receiving-code-review, requesting-code-review, verification-before-completion, finishing-a-development-branch, writing-skills, using-superpowers
Trail of Bits (5 skills) Professional security: differential-review, static-analysis, audit-context-building, supply-chain-risk-auditor, agentic-actions-auditor
Context Engineering Kit (4 skills) Quality engineering: sdd (spec-driven development), reflexion, code-review, kaizen
Shield (Security orchestrator) Automated security scanning: SAST, SCA, secrets detection, compliance mapping, penetration testing
Custom Skills (3) Bundled with this project: architect-review, context-guardian, production-audit
| Feature | Vanilla Claude Code | Claude Code Mastery |
|---|---|---|
| Memory between sessions | None | 6-file Memory Bank per project |
| Context after compact | Lost | Restored from Memory Bank + hooks |
| Project setup | Manual | Auto-configured on claude |
| Skills enforcement | Optional | Mandatory with 26+ skills mapped |
| Security analysis | None | Trail of Bits + Shield integration |
| Code quality | Manual | Superpowers + CEK skills |
| Task tracking | None | Built-in task management |
| Library docs | Guessing | Context7 auto-lookup |
| Dangerous commands | Allowed | Blocked by PreToolUse hook |
| Session diagnostics | None | Full project status on launch |
| Cross-platform | CLI only | macOS + Linux + Windows installer |
~/.claude/
├── CLAUDE.md # Global rules (loaded in every session)
├── settings.json # Hooks + permissions + plugins
├── settings.local.json # MCP auto-enable
├── skills/
│ ├── architect-review.md # Architecture evaluation
│ ├── context-guardian.md # Context preservation
│ └── production-audit.md # Production readiness audit
├── hooks/
│ └── auto-update-plugins.sh # Marketplace auto-updater
└── projects/
└── -default/memory/
└── MEMORY.md # Auto-memory index template
The installer also appends a claude_code() function to your ~/.zshrc (macOS), ~/.bashrc (Linux), or PowerShell $PROFILE (Windows) that wraps the claude CLI with zero-config project setup.
See the Configuration Reference for detailed documentation of all settings.
| File | Purpose | Docs |
|---|---|---|
~/.claude/CLAUDE.md |
Global rules for every session | Configuration |
~/.claude/settings.json |
Hooks, permissions, plugins | Hooks |
~/.claude/skills/*.md |
Custom skill definitions | Skills |
Claude Code Mastery is designed to be customized. See the Customization Guide for details.
Installer flags:
./install.sh --interactive # Guided setup with prompts
./install.sh --lang=pt-BR # Hook messages in Portuguese
./install.sh --preset=node # Extra permissions for Node.js
./install.sh --skip-plugins # Skip marketplace installation
./install.sh --plugins=superpowers # Install only selected marketplacesPost-install customization:
scripts/apply-language.sh pt-BR— Change hook languagescripts/apply-preset.sh python— Apply project preset- Add your own skills to
~/.claude/skills/ - Modify hooks in
~/.claude/settings.json
# macOS/Linux
./uninstall.sh
# Windows (PowerShell)
.\uninstall.ps1The uninstaller:
- Restores original configs from
.bakbackups - Removes custom skills and hooks
- Removes the shell launcher function
- Does not remove plugin marketplaces or per-project Memory Bank data
See the Troubleshooting Guide for common issues.
Quick fixes:
| Issue | Solution |
|---|---|
claude: command not found |
Run source ~/.zshrc (or ~/.bashrc) |
| Memory Bank not reading | Check .mcp.json exists in project root |
| Hooks not firing | Verify ~/.claude/settings.json is valid JSON |
| Plugins not found | Run claude plugin marketplace add <repo> manually |
| Permission denied on hook | Run chmod +x ~/.claude/hooks/auto-update-plugins.sh |
- Installer for macOS (zsh)
- Installer for Linux (bash)
- All config files as templates
- 3 custom skills
- Auto plugin marketplace setup
- Full documentation
- Uninstaller with backup restore
- PowerShell installer (
install.ps1/uninstall.ps1) - Windows-compatible hooks (pure PowerShell, no bash dependency)
- WSL detection and setup
- PowerShell launcher function
- Interactive installer (
--interactiveflag) - Selective plugin installation (
--skip-plugins,--plugins=LIST) - Language template system (
--lang=CODE: en, pt-BR, es) - Project-type presets (
--preset=NAME: general, node, python, php, monorepo)
- Web dashboard for memory visualization
- Memory Bank analytics
- Plugin recommendation engine
- CI/CD integration
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes (all content in English)
- Run tests:
bash tests/test-install.sh && bash tests/test-hooks.sh - Commit using Conventional Commits:
feat:,fix:,docs:, etc. - Open a Pull Request
| Resource | Link |
|---|---|
| Claude Code CLI | docs.anthropic.com/en/docs/claude-code |
| Memory Bank MCP | npmjs.com/package/@allpepper/memory-bank-mcp |
| Superpowers | github.com/obra/superpowers |
| Trail of Bits Skills | github.com/trailofbits/skills |
| Context Engineering Kit | github.com/NeoLabHQ/context-engineering-kit |
| Shield | github.com/alissonlinneker/shield-claude-skill |
| Context7 | github.com/upstash/context7 |
| Claude Code Hooks | docs.anthropic.com/en/docs/claude-code/hooks |
| Claude Code Skills | docs.anthropic.com/en/docs/claude-code/skills |