// 21 tips in Performance
Getting faster responses and better results.
CLAUDE.md loads into every message. Move workflow-specific instructions into skills that load on demand to reduce token costs across your session.
A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.
Every event emitted while processing a single prompt shares a prompt.id UUID, letting you trace the complete chain of API calls and tool executions.
Pass custom instructions to /compact so Claude preserves test output, code changes, and other context that matters to your workflow.
CLI tools like gh, aws, and gcloud don't add persistent tool definitions to your context, saving tokens compared to equivalent MCP servers.
Trigger automatic tool search earlier so idle MCP tool definitions stop consuming your context window and tokens.
Use --effort to set reasoning depth per session, from quick low-effort tasks to maximum reasoning on complex problems.
Reserve Claude Code's max effort level for architectural and complex decisions where deeper reasoning pays off, and stick to default for everyday tasks to keep token usage in check.
The --bare flag skips CLAUDE.md, hooks, skills, plugins, and MCP servers at startup, giving you a minimal, fast Claude Code invocation ideal for CI pipelines and scripted tasks.
Bloated Docker images slow CI, increase attack surface, and cost money — paste your Dockerfile and ask Claude to audit it for quick wins.
Claude Code's JSON output includes cost_usd and duration_ms metadata — pipe it through jq to log spending per run and catch runaway automation before it gets expensive.
Packages accumulate over time and slow down installs. Claude can analyse your dependency list against your source files and flag the ones that are likely dead weight.