Everything you need to know about setting up and using context-engineer in your projects.
Create your project, run setup, and you're done. Everything activates automatically.
mkdir my-new-project && cd my-new-project && git init/context-engineer:setup/context-engineer:diagnose/context-engineer:fresh-context "building the auth system" before starting multi-session work. Your progress survives across sessions.
Already have a project with a CLAUDE.md? Context-engineer fits right in without touching your existing configuration.
/context-engineer:setup/context-engineer:audit-mcp/context-engineer:diagnose/context-engineer:fresh-context "refactoring payments" before starting. When context gets heavy, TASK.md and PROGRESS.md are ready for a clean handoff.Four zones determine how Claude works. No configuration — it adapts automatically based on how much of the context window is consumed.
When context gets heavy or a feature spans multiple sessions, create handoff files so the next session picks up exactly where you left off.
/context-engineer:fresh-context "implementing JWT authentication"# In a new Claude Code session:
Read TASK.md and PROGRESS.md and continue where the last session left off.Stop using a sledgehammer for every nail. The model switching skill routes tasks to the optimal model automatically.
| Task Type | Model | Cost |
|---|---|---|
| File search, grep, quick lookups, simple edits | Haiku | 1x |
| Code review, refactoring, multi-file changes | Sonnet | 5x |
| Architecture decisions, complex debugging, security review | Opus | 25x |
Four stages of context degradation with automatic detection. The skill flags problems in real time so you can act before quality collapses.
| Stage | Context | Signs |
|---|---|---|
| Stage 1 | ~60% | Forgetting details, asking for re-confirmation of earlier decisions |
| Stage 2 | ~75% | Contradicting decisions, missing imports, inconsistent naming |
| Stage 3 | ~85% | Hallucinating APIs that don't exist, looping on the same fix attempt |
| Stage 4 | ~90%+ | Incoherent reasoning, nonsensical code generation |
| Issue | Solution |
|---|---|
| Hooks don't seem to be filtering | Hooks only activate on output > 40 lines. Run a test suite with enough tests to generate verbose output. |
| Setup added duplicate content | Run /context-engineer:diagnose to check. Remove the duplicate section from CLAUDE.md manually. |
| Context still fills quickly | Expected on large codebases. Use fresh context more frequently. Focus sessions on specific subsystems. |
| Want to customize hook triggers | Edit scripts at hooks/scripts/. Each has a pattern matcher at the top. |
| Want to change the 40-line threshold | Edit the LINE_COUNT check in any hook script under hooks/scripts/. |