/context - Context Analysis & Optimization
Description
Analyze and optimize your Claude Code context configuration using Anthropic's context engineering principles.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for VAMFI/claude-user-memory, shared by 5 entries
in this directory. It describes the repository, not this entry specifically.
name: context description: Analyze and optimize context configuration. Reviews CLAUDE.md, knowledge-core.md, and active context for optimization opportunities. Helps prevent context rot (39% improvement, 84% token reduction).
/context - Context Analysis & Optimization
Analyze and optimize your Claude Code context configuration using Anthropic's context engineering principles.
Usage
/context # Analyze mode (default)
/context analyze # Same as default
/context optimize # Actively optimize context
/context reset # Reset to templates
What This Does
Analyze Mode (Default)
When you run `/context` or `/context analyze`:
**Read context files**
- CLAUDE.md (project configuration)
- knowledge-core.md (accumulated learnings)
- Imported files (via
@syntax)
**Analyze token count and relevance**
- Count total tokens in context
- Identify stale/redundant information
- Check for context rot indicators
**Identify optimization opportunities**
- Sections that should be archived
- Redundant content that can be consolidated
- Missing imports that could improve modularity
**Report findings**
- Current token usage
- Stale information detected
- Potential token savings
- Recommended actions
Optimize Mode
When you run `/context optimize`:
**Run analysis** (as above)
**Archive stale information**
- Move outdated patterns to knowledge-core.md historical section
- Add timestamps to archived content
- Preserve information for future retrieval
**Prune redundant context**
- Remove duplicate information
- Consolidate similar sections
- Replace verbose explanations with concise bullet points
**Update CLAUDE.md**
- Keep only high-signal, project-specific content
- Use imports for modular organization
- Ensure clear structure with markdown headings
**Report token savings**
- Before/after token counts
- Percentage reduction
- Expected performance improvement
Reset Mode
When you run `/context reset`:
**Confirmation prompt**
- Warns that this will discard current context
- Asks for explicit confirmation
**Restore templates** (if confirmed)
- CLAUDE.md →
.claude/templates/CLAUDE.md.template - knowledge-core.md → Fresh template
- Clear project-specific customizations
- CLAUDE.md →
**Fresh start**
- Ideal for switching to new project
- Removes accumulated context rot
- Begins with clean slate
Output Examples
Analyze Mode Output
📊 Context Analysis
## Current Configuration
**Memory Hierarchy**:
- Enterprise: Not configured
- Project: ./CLAUDE.md (450 tokens)
- User: ~/.claude/CLAUDE.md (120 tokens)
- Imports: 3 files (280 tokens)
**Total Context**: 850 tokens
**Files Analyzed**:
- ✓ CLAUDE.md (450 tokens)
- ✓ knowledge-core.md (320 tokens)
- ✓ @.claude/templates/agents-overview.md (100 tokens)
- ✓ @.claude/templates/skills-overview.md (90 t
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11