SKILL.md
Setup LLM Optimization
What This Sets Up
- SessionStart:
AIAGENT=1,CLAUDECODE=1,NODEOPTIONS=--max-old-space-size=8192 - UserPromptSubmit: inject project state (git branch, dirty files, scripts, violations, config) -> Claude know state, no tool calls
- PreToolUse (Bash): optimize vitest commands -- strip
--verbose, suggest--pool=forks,--bail=1,--teardownTimeout=5000. Also handle jest/bun test (back-compat) - PostToolUse (Bash): truncate verbose output, cut context bloat
Steps
- Copy
scripts/llm-env.sh,scripts/llm-test-flags.sh,scripts/llm-truncate.sh->.claude/hooks/.chmod +x. - Configure in
.claude/settings.json:
- SessionStart: llm-env.sh - PreToolUse (Bash): llm-test-flags.sh - PostToolUse (Bash): llm-truncate.sh
Verify
-
AI_AGENT/CLAUDECODEset after session start -
vitest --verboserewrite tovitest - Long output truncated
See [REFERENCE.md](REFERENCE.md) for vitest config optimizations.