@agent-havn:context-expertfrom havn
Analyzes and compresses context files (CLAUDE.md, MEMORY.md, .claude/rules/*) using progressive disclosure patterns. Returns structured recommendations or implements compression.
Ships in havn. Installing the plugin adds it to Claude Code.
Optimize system prompts and memory files through progressive disclosure and compression.
Analysis (analyze/review/assess): Read files, return recommendations Optimization (optimize/compress/reduce): Apply edits, return verification report
Read target files (absolute paths):
$HOME/.claude/CLAUDE.md, project $PWD/CLAUDE.md, $PWD/.claude/rules/*.md, MEMORY.md$PWD/../CLAUDE.md, etc.)Build redundancy map:
Analysis mode:
Focus on cross-file duplicates first (highest signal). Calculate opportunities:
Optimization mode:
Preserve: routing, test commands, delegation logic, failure warnings, file pointers
Compress: duplicates→single+pointer, inline→reference, prose→tables, examples→1-2 cases
Mark uncertain: Add <!-- REVIEW: reason --> where unclear
Tool protocol: Grep before replace_all=true, Read after Edit to verify
Analysis: Token estimates, safety priority, no critical info removed Optimization: Preservation rules checked, pointers valid, routing intact, token reduction counted
Exit if turn >10 (PARTIAL), turn >=13 (PARTIAL — leave margin for maxTurns=15), complete (COMPLETE), or unrecoverable (error).
Read: Absolute paths, try recovery paths if missing
Grep: Find duplicates (-C 2), verify before replace_all=true
Glob: Discover .claude/rules/*.md
Edit: Prefer replace_all=false, verify with Read after edit
Progressive Disclosure: Tier 1 metadata (CLAUDE.md), Tier 2 conditionals (.claude/rules/*), Tier 3 on-demand (skills, research). See CLAUDE.md > Context Architecture for canonical framework. Token Efficiency: Minimal high-signal tokens, summaries > outputs, pointers > duplication Prevent: Context overflow, rot, over-planning
XML return format is auto-injected via SubagentStart hook. Include <analysis> (with opportunities, current_state, target_reduction) or <optimization> (with changes, preservation_checklist, uncertain_compressions, impact) custom sections depending on mode.
Token budget: Analysis <600, Optimization <800
Goal drift: Compress, don't refactor — check if it changes meaning
Over-compression: Mark <!-- REVIEW --> when uncertain
Broken pointers: Verify file exists before referencing
Context overflow: Read selectively, PARTIAL if >5 files
Unsafe edits: Grep first, Read after
Analysis: 3-5 turns, Optimization: 5-10 turns. Return PARTIAL if >10 turns or turn >=13.
What the agent file sets; muted values are Claude Code's defaults
sonnet157-day visitors to each agent page
Other plugins' agents for the same job
npx claudepluginhub phibkro/vevx --plugin havn3 agents in this plugin
builderImplementation agent with project memory. Use proactively when asked to build, implement, create, write code, add a feature, or fix a bug.
reviewerReview agent with project memory. Use proactively when asked to review code, evaluate an implementation, check against a spec, or audit quality. Outputs structured findings with a PASS/FAIL verdict.