Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

setup-agent-config

FreeRuns bundled scriptsNot checked

Token-efficient AI agent hooks -- env vars, test flag optimization, output truncation, NODE_OPTIONS. Use when optimizing Claude Code for fewer tokens or…

redpanda-databy redpanda-data★ 34 GitHub stars

About this skill

Setup LLM Optimization

What This Sets Up

  • SessionStart: AI_AGENT=1, CLAUDECODE=1, NODE_OPTIONS=--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

  1. Copy scripts/llm-env.sh, scripts/llm-test-flags.sh, scripts/llm-truncate.sh -> .claude/hooks/. chmod +x.
  2. Configure in .claude/settings.json:
    • SessionStart: llm-env.sh
    • PreToolUse (Bash): llm-test-flags.sh
    • PostToolUse (Bash): llm-truncate.sh

Verify

  • AI_AGENT/CLAUDECODE set after session start
  • vitest --verbose rewrite to vitest
  • Long output truncated

See REFERENCE.md for vitest config optimizations.

Install setup-agent-config in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

REFERENCE.mdscripts/llm-env.shscripts/llm-test-flags.shscripts/llm-truncate.sh

FAQ

What does the setup-agent-config skill do?

Token-efficient AI agent hooks -- env vars, test flag optimization, output truncation, NODE_OPTIONS. Use when optimizing Claude Code for fewer tokens or reducing context waste.

How do I install the setup-agent-config skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the setup-agent-config skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare setup-agent-config with