# Budget Optimization for Claude Code Usage

Optimize Claude Code token spend by applying practical habits for cost control, including model selection, context management, and efficient task delegation.

**Canonical URL:** https://skillshunter.net/skills/discovered-44422c38538021bc5a6866f220557b8a71d0f019b727bcbf

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-44422c38538021bc5a6866f220557b8a71d0f019b727bcbf

**Markdown URL:** https://skillshunter.net/skills/discovered-44422c38538021bc5a6866f220557b8a71d0f019b727bcbf.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-44422c38538021bc5a6866f220557b8a71d0f019b727bcbf/download

**Category:** Software & Development

**Source URL:** https://github.com/minhnguyenyf/skills/blob/7213d81500a27f3a96028144f5342ccfe4efbe4a/common/budget-optimization/SKILL.md

**Source commit:** 7213d81500a27f3a96028144f5342ccfe4efbe4a

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T11:12:04.000000Z

**Updated at:** 2026-11-30T06:52:26.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before applying cost-saving strategies, ensure you have validated your Claude Code environment and reviewed the pricing page at https://www.anthropic.com/pricing. Use `/cost` or `/usage` commands within a session to measure actual token usage and costs.

### When to use it

- Selecting the appropriate model (Haiku, Sonnet, Opus) based on task complexity to minimize costs.
- Keeping context length minimal by using `/compact` or `/clear` commands to avoid unnecessary token usage.
- Delegating noisy searches to a subagent to prevent context bloat.
- Reading narrowly by using grep and line-range commands to avoid processing large files.
- Writing complete prompts with specific file details, symptoms, and error text to avoid retries.
- Leveraging existing skills to avoid re-explaining context in each session.

## Skill instructions

---
name: budget-optimization
description: Practical habits for keeping Claude Code token spend down on a monthly budget. Use when the user asks about cost, token usage, model choice for cost, or says a session is getting expensive.
---

# Budget optimization

Details and settings: [README.md](README.md).

## Rules of thumb
1. **Match model to task.** Haiku for mechanical work (renames, doc edits, greps, boilerplate). Sonnet or Opus for root-cause debugging, architecture, and anything where a wrong answer costs a rebuild or hardware test.
2. **Keep context small.** New session per topic; `/compact` or `/clear`. Every turn re-sends the context.
3. **Delegate noisy searches** to a subagent (Explore) so raw output stays out of the main context.
4. **Read narrowly.** Grep, then read a line range. Large notes files (the migration notes) are over 1300 lines.
5. **Write complete prompts**: file, symptom, exact error text.
6. **Lean on skills** instead of re-explaining context.
7. **Do not cut effort on hard problems.** Low effort there costs more in retries.

## Do not
- Do not copy a settings file over `~/.claude/settings.json`. It holds the auto-commit `hooks` block; merge keys by hand.
- Do not set `permissions.defaultMode` to `dontAsk` to save cost. It is a safety setting.
- Do not quote dollar savings as facts. Check https://www.anthropic.com/pricing and use `/cost` or `/usage`.

