What problem does it solve?
Claude-based agent workflows often bloat prompts and context with verbose tooling traces, tests, and environment noise. This Skill provides a compact, repeatable setup to minimize token usage and ensure stable performance by configuring session-wide hooks and lean test flags.
Core Features & Use Cases
- Session optimization: automatically enables AI_AGENT=1, CLAUDECODE=1, and NODE_OPTIONS=--max-old-space-size=8192 to reduce token waste and improve tooling traces.
- Prompt-context injection: injects project state (git branch, dirty state, scripts, violations, and config) into prompts to inform Claude without extra tool calls.
- Tooling efficiency: reduces verbose test outputs and truncates long results for compact context in PreToolUse and PostToolUse.
Quick Start
Copy scripts/llm-env.sh, scripts/llm-test-flags.sh, and scripts/llm-truncate.sh into .claude/hooks/ and chmod +x, then configure in .claude/settings.json: SessionStart -> llm-env.sh, PreToolUse (Bash) -> llm-test-flags.sh, PostToolUse (Bash) -> llm-truncate.sh.