4 Slash Commands for a Tiny Claude Code Budget
01 / Four commands that protect a small token budget
Claude Code can spend more than expected when one conversation grows for hours. The cause is simple: each new request may carry parts of the earlier conversation back to the model. With a tiny budget, your first control is not a complicated configuration file. It is learning four slash commands: /clear, /compact, /cost, and /context.
These commands are built into Claude Code. They do not replace good prompts, and they cannot guarantee a particular bill. They give you visibility and let you stop carrying unnecessary history into the next task.
02 / Use /clear when the task is finished
Run /clear after completing a self-contained task, such as fixing one test, editing one configuration file, or explaining one error. It removes the current conversation context so your next request starts clean.
This is usually the clearest token-saving move. If you ask about a different project area in the same session, old discussion, pasted logs, and previous tool results may no longer help. Keeping them around can make later requests larger and less focused.
A practical beginner rule is: one meaningful work item per conversation. Finish the change, verify it, then use /clear before starting unrelated work.
03 / Use /compact when useful history still matters
Sometimes you need to continue the same task, but the conversation has become large. Run /compact to ask Claude Code to summarize the existing context and continue with a shorter version.
Use this when the model still needs decisions, constraints, filenames, or test results from earlier messages. For example, a multi-file bug fix may depend on the original error and the approach already chosen. Clearing everything would force you to repeat that information.
Compact summaries are not perfect. Important details can be omitted, so check the resulting context before making a risky change. If the task can be restated in two sentences, /clear plus a short restatement is often more predictable.
04 / Check the bill with /cost before adding more work
Run /cost when you want to inspect the current session's usage. This command does not reduce tokens by itself. Its value is stopping a small problem from turning into an open-ended session.
Set a personal limit before you begin. For example: investigate one failure, make one focused patch, and stop if the session is becoming expensive. If the cost is already uncomfortable, clear the session and write a compact request containing only the current error, relevant file, and expected result.
CheapRelay charges per real token, including cache reads and writes. There is no monthly fee or subscription, so checking usage is still important even when you use pay-as-you-go access.
05 / Use /context to find what is taking space
Run /context when you suspect the session is carrying too much information. It helps you inspect the context available to Claude Code and identify why a request feels bloated.
Look for large command outputs, repeated file contents, generated documents, and long logs. Do not paste an entire log when the final error and a small surrounding section are enough. Ask the shell for targeted lines, or describe the failure before opening more files.
06 / A low-cost routine for your first week
- ■ Start with a precise task and a clear stopping point.
- ■ Use /context if the session grows unexpectedly.
- ■ Use /compact when the same task must continue.
- ■ Use /cost before broad investigation or repeated retries.
- ■ Use /clear when changing tasks or projects.
For cheaper requests, choose a model that fits the job. Claude Haiku 4.5 can be a sensible first option for small edits and straightforward questions; reserve a more capable model such as Claude Sonnet 5.5 for work that actually needs it. The right choice depends on the task, not a promise of a fixed saving.
CheapRelay provides one pay-as-you-go API key for Claude Code and other supported tools through its API base at api.cheapapirelay.com. You can sign up for CheapRelay when you want usage-based access without a monthly commitment. Combine that billing model with disciplined slash-command habits, and a small balance becomes easier to monitor instead of disappearing inside one oversized conversation.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-29 | Coding agents, cheaply | EN | Review 1 Small Diff Before Spending More A beginner workflow for getting useful AI code review on a tiny budget, with a fixed token cap and focused questions. |
| 2026-10-29 | Coding agents, cheaply | EN | A $5 Coding Agent Memory File Can Cost More A beginner guide to coding agent memory files, token costs, cache billing, and a tiny-budget workflow that keeps context useful. |
| 2026-10-29 | Coding agents, cheaply | EN | A $10 Shared AI Budget for a Tiny Coding Team A beginner-friendly setup for sharing AI coding tools across a small team while keeping usage visible, flexible, and capped. |
| 2026-10-29 | Coding agents, cheaply | EN | $1 Budget: OpenCode With Pay-Per-Token Billing Set up OpenCode with CheapRelay, connect a model, and keep your first terminal coding session small with a $1 spending target. |
| 2026-10-29 | Coding agents, cheaply | EN | $1 Cherry Studio Budget, Several Models, One Key Connect Cherry Studio to CheapRelay, add two models with one key, and track token costs with a $1 practice budget. |
| 2026-10-29 | Coding agents, cheaply | EN | $1 Test Budget: Connect Cursor to a Custom API Connect Cursor to an OpenAI-compatible endpoint, verify the model, and keep your first API test small with a $1 spending target. |