Enables autonomous context management for codebases through claude.md files. Use when creating, maintaining, or synchronizing AI agent context. Provides tools and workflows for monitoring context health, detecting staleness, and updating intelligently. Helps Claude work proactively as a context manager.
Autonomously maintains claude.md files as cognitive maps for codebases. Use proactively during development to monitor context health, detect staleness, and surgically update documentation based on code changes.
/plugin marketplace add AnthemFlynn/ccmp/plugin install claude-context-manager@ccmpThis skill inherits all available tools. When active, it can use any tool Claude has access to.
LICENSE.txtassets/templates/source-code-template.mdassets/templates/test-directory-template.mdreferences/context_manager_mode.mdreferences/examples.mdreferences/structure_guide.mdscripts/auto_update.pyscripts/create_index.pyscripts/generate_claude_md.pyscripts/monitor.pyscripts/scan_repo.pyscripts/validate_claude_md.pytest-context/claude.mdThis skill enables you to work as an autonomous context manager for codebases, maintaining accurate and actionable context intelligence through claude.md files.
Behavioral guidance: Instructions for working proactively as a context manager
Monitoring tools: Scripts to assess context health and detect staleness
Update automation: Intelligent context synchronization based on code changes
Quality standards: Patterns for creating actionable, dense agent context
claude.md files are cognitive maps - operational intelligence that helps you:
This is agent context, not documentation. The goal is making future-Claude more effective.
Before starting, read references/context_manager_mode.md to understand how to work autonomously and proactively as a context manager.
Key operating principles:
Starting fresh in a repository? → "Initial Setup" workflow
Working in active codebase? → "Continuous Maintenance" workflow
Code just changed significantly? → "Change-Responsive Update" workflow
Exploring existing context? → "Context Exploration" workflow
When first working in a repository that needs context management:
python scripts/scan_repo.py /path/to/repo
This shows:
Focus on high-impact directories first:
For each priority directory:
python scripts/generate_claude_md.py /path/to/directory
This creates structured context with:
Review generated files and:
Use references/structure_guide.md and references/examples.md for guidance.
python scripts/create_index.py /path/to/repo
Generates navigable index of all context files.
Once context exists, maintain it autonomously:
Run periodically (start of session, after major work):
python scripts/monitor.py /path/to/repo
Provides:
Critical priority (immediate action):
python scripts/auto_update.py /path/to/directory
High priority (soon):
python scripts/auto_update.py /path/to/directory --analyze-only
# Review suggestions, then update
Medium/Low priority (monitor): Note for later, continue monitoring
After updates:
python scripts/validate_claude_md.py /path/to/directory/claude.md
Checks for:
Periodically refresh the index:
python scripts/create_index.py /path/to/repo
When code changes occur (you made changes or observed changes):
For each changed directory:
python scripts/auto_update.py /path/to/directory --analyze-only
This analyzes:
If update recommended:
python scripts/auto_update.py /path/to/directory
This performs surgical updates:
python scripts/validate_claude_md.py /path/to/directory/claude.md
When entering an area with existing context:
Before working, read the claude.md file:
view /path/to/directory/claude.md
Understand:
As you work, note:
If you discover inaccuracies or important missing info:
# Update the specific file
str_replace /path/to/directory/claude.md
Or use auto-update for comprehensive refresh.
When you discover patterns not documented:
✅ Update context when:
✅ Generate new context when:
⚠️ Before:
Assesses context health across repository.
Key outputs:
Usage:
python scripts/monitor.py /path/to/repo [--format json|text]
Exit codes:
Intelligently updates context based on code changes.
What it does:
Usage:
python scripts/auto_update.py <directory> [--analyze-only] [--force]
Modes:
--analyze-only: Show recommendations only--force: Update even if no changes detectedIdentifies directories needing context.
Usage:
python scripts/scan_repo.py <repo_path> [--min-files N] [--show-existing]
Creates new context files with smart defaults.
Usage:
python scripts/generate_claude_md.py <directory> [--output FILE] [--force]
Checks context quality and completeness.
Usage:
python scripts/validate_claude_md.py <path> [--strict]
Builds master index of all context files.
Usage:
python scripts/create_index.py <repo_path> [--format tree|table|detailed]
references/context_manager_mode.md
Read this first. Explains how to work autonomously as a context manager - mindset, workflows, communication patterns, quality standards.
references/structure_guide.md
Best practices for agent context - what to include, what to avoid, how to structure, maintenance triggers.
references/examples.md
Real-world examples for different directory types - API layers, services, tests, config, models.
assets/templates/source-code-template.md
Starting template for general source directories.
assets/templates/test-directory-template.md
Starting template for test suites.
Do:
Context health check complete. 3 files need attention:
- src/api/ (critical - 45 days, 23 commits) → Updating now
- src/services/ (high - 30 days, 15 commits) → Should I update?
- tests/integration/ (medium - 20 days) → Monitoring
Don't:
I checked and there are issues.
Do:
Updated src/api/claude.md: • Added rate limiting pattern (introduced last sprint) • Updated middleware chain (auth-jwt.ts now handles tokens) • Removed deprecated cors-handler.ts reference
Context now current with HEAD.
Don't:
Updated file.
Do:
src/utils/ has 12 files but no context. Analysis shows: • Mix of helpers (strings, dates, validation) • No clear pattern - might need reorganization • Create context as-is, or refactor first?
Don't:
You should add context there.
Every section should answer: "What does this tell me to DO differently?"
❌ Descriptive:
This directory contains services.
✅ Actionable:
**Service Pattern**: Class-based with constructor DI
**Rule**: All async methods, throw domain errors (never return errors)
**Example**: `class UserService { constructor(db, logger) {} }`
Use tokens efficiently.
❌ Verbose:
The API directory is important. It handles requests from the frontend.
It communicates with backend services. It uses Express.js.
✅ Dense:
**Framework**: Express 4.x
**Pattern**: Route → Validator → Service → Serializer
**Rule**: No direct DB, asyncHandler required
Context must reflect reality, not history.
❌ Historical:
We migrated from MySQL to PostgreSQL in 2023.
✅ Current:
**Database**: PostgreSQL 15, Prisma ORM
**Migrations**: prisma/migrations/
Context manager automatically integrates with other CCMP plugins:
Sessions load relevant context automatically:
When a session starts, relevant claude.md files are loaded based on objectives.
Context health in session handoffs: Session handoffs include context health reports and update recommendations.
Checkpoints trigger health checks: Session checkpoints automatically check if changed directories have stale context.
To enable: Use lib/session_integration.py in your session workflow.
TDD cycles update test context: When TDD GREEN checkpoints succeed, test documentation can be auto-updated with discovered patterns.
Integration API:
from lib.ccmp_integration import CCMPIntegration
integration = CCMPIntegration()
integration.update_state("claude-context-manager", {
"health_score": 87,
"last_scan": "2025-11-01T10:00:00Z",
"critical_files": ["src/api/"]
})
Maintain context awareness:
Working in new directory?
→ Check for context
→ Note if missing
Discovering pattern?
→ Check if documented
→ Add if missing
Finding gotcha?
→ Add to context immediately
Quick maintenance check:
python scripts/monitor.py .You're managing context well when:
Context management isn't about perfect documentation - it's about maintaining cognitive maps that multiply your effectiveness.
Every claude.md file should make future-you faster, more accurate, and more pattern-aware.
Your mission: Make the next Claude session in this codebase even better.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.