Skip to main content
MindStudio
Pricing
BlogAbout
My Workspace
Claude Code best practicesClaude.md tipsClaude Code tokens

Claude Code Best Practices: 9 Anthropic Tips Still Worth Using

Anthropic's updated Claude Code best-practices guide cuts token use and errors. Here are nine techniques from the November update that still hold up.

Edited by Luis Chavez-Mattos, Director of Product RSS
Claude Code Best Practices: 9 Anthropic Tips Still Worth Using

How do you actually cut Claude Code’s token usage?

The biggest lever is getting Claude to write a script instead of reading a file directly into the chat. When Claude opens a file in context, it reads every row, and if that data gets passed somewhere else, it reads it again. Anthropic found that routing the same job through code instead of chat dropped token usage on one internal task from 150,000 tokens to 2,000, a 98% reduction. The fix is simple: tell Claude not to open the file, and instead write a script that extracts only what you need and returns just the answer.

This matters most when you don’t actually need Claude to understand the content, only to move or transform it. A two-hour meeting transcript moving from Google Drive into a CRM doesn’t need to be read twice at full length just to get filed. If you do want a summary or analysis of the actual content, reading it makes sense. But for deterministic tasks like pulling spend and leads by month from a report, a script gets you the same output for a fraction of the cost.

TL;DR

  • Script over chat is the single biggest token saver: have Claude write code to process files instead of reading them directly, which took one Anthropic job from 150,000 tokens down to 2,000.
  • Checklists plus a progress file split big projects into a setup session and a series of small execution sessions, which stops Claude from either overreaching in one shot or quitting early.
  • JSON beats Markdown for tracking progress because Claude is less likely to quietly edit or merge JSON entries, so a “passes: false” field only flips to true once a task is actually validated.
  • Hooks and deny rules enforce behavior that Claude.md can’t, since Claude can choose to ignore a plain-language instruction but can’t bypass a hook or permission rule.
  • “Be ambitious” is one of the few surviving prompt phrases from Anthropic’s older prompting guide, used specifically to push Claude to build more rather than the smallest thing that satisfies the task.
  • Putting data before the question, instead of after it, reportedly improved answer quality by up to 30% in Anthropic’s own tests, especially with large or multi-document context.
  • Starting broad before narrowing down applies to research, tool comparisons, or supplier shortlists, and Anthropic says the amount of search effort accounts for a large share of research quality.
Rapidly build enterprise-grade, production-ready software.
Regulation-compliant applications from the first build.
Ship to production
Already in:✓ SOC 2✓ HIPAA✓ Audit log

Why does Claude perform better when code does the reading?

Claude Code, like most agentic coding tools, treats anything pasted or uploaded into the chat as context it has to process token by token. A spreadsheet or transcript gets read in full, and if that data needs to move somewhere else, it often gets read a second time. That doubles the cost for no real benefit when the task is mechanical.

Writing a script shifts the actual data handling outside the model’s context window. Claude still does the thinking, it just does it by producing code that runs against the file locally, and only the result comes back into the conversation. Anthropic’s example of the 150,000-to-2,000 token drop illustrates the scale of savings possible on this kind of task. The practical move is to explicitly tell Claude: don’t open this file, write a script that gives me just the output I need.

Why do big Claude Code projects fall apart halfway through?

Anthropic identified two common failure modes when a large task is handed to Claude in a single prompt. Either Claude tries to complete everything in one continuous session, and the conversation gets long enough that it loses track of earlier context (sometimes called context rot). Or it does a small amount of work, checks its own output, and decides the task is done well before it actually meets the criteria you had in mind.

The fix Anthropic uses internally is to split the work into two kinds of sessions. The first session does no actual work. It only sets up a checklist of everything that needs to be done, plus a progress file that tracks state. Every session after that completes one item from the checklist, verifies it, and updates the progress file before moving to the next. This is the same approach Anthropic used when having Claude play Pokémon: when its memory was wiped, it could read its own notes and progress file to pick up where it left off, tracking things like how many levels a Pokémon still needed before hitting a target.

Why does Anthropic use JSON instead of Markdown for checklists?

This is a counterintuitive one. Most Claude Code setups keep documentation, instructions, and plans in Markdown because that’s the format everything else lives in. But Anthropic deliberately keeps task-tracking files in JSON, with each task marked “passes: false” until it’s been tested and verified.

Let every team build.
Without shadow IT.
IT adminEvery app, approved
Campaign trackerMarketing✓
ExpensesFinance✓
OnboardingHR✓
InspectionsOperations✓
Shift schedulerNursing✓

The reasoning, in Anthropic’s own words, is that the model is less likely to inappropriately change or overwrite JSON files compared to Markdown files. A Markdown checklist invites Claude to tidy it up, merge similar items, or quietly drop one without telling you. JSON gets treated more like data than like prose, so Claude is more likely to leave the structure alone and only flip the boolean once a task genuinely passes. For something like a recurring client report, each section (spend, leads, cost per lead, client email) gets its own entry, so you can see at a glance what’s actually been completed and trust that it wasn’t silently reworded or merged.

When should you use a hook instead of a Claude.md instruction?

Claude.md instructions are suggestions. Claude can read them, understand them, and still decide not to follow them exactly, especially under conversational pressure. Anthropic ran into this with file paths: an agent kept getting them wrong no matter how the instructions were worded. The fix wasn’t stronger language, capital letters, or words like “important” or “always.” It was changing the tool itself so it only accepted full file paths, making the mistake structurally impossible. Anthropic calls this poka-yoke, a manufacturing term for designing a process so an error can’t happen in the first place.

The practical signal: if you keep adding emphasis to a line in Claude.md and Claude still ignores it, that line belongs in a hook or a deny rule instead. Claude can choose to skip a Claude.md instruction, but it can’t skip a hook, because Claude Code enforces those every time. A deny rule on a sensitive folder (so Claude literally can’t read raw client exports, for example) is both more reliable and adds a layer of data protection. Anthropic’s caveat is to use this sparingly: hooks should cover rules that must never be broken, not general preferences. Ending up with dozens of hooks usually means most of them should have stayed as plain instructions.

Which old prompting tricks still work, and which are dead?

Phrases like “think step by step” or “be thorough” no longer produce a measurable difference, according to Anthropic’s own prompting guidance. But one phrase from the same era has stuck around: “be ambitious.” Claude’s default behavior leans conservative, building the smallest thing that technically satisfies the request. Anthropic’s long-standing example contrasts a bare prompt (“create an analytics dashboard”) against one that adds “include as many relevant features and interactions as possible, go beyond the basics.” The expanded version pushes Claude to build more, rather than stopping at a minimal version.

Two other practices from Anthropic’s guidance hold up. First, order matters: pasting your data or documents before your question, rather than after, reportedly improved results by up to 30% in Anthropic’s testing, particularly with large or multi-document input. Second, asking Claude to quote the exact lines of source material it’s relying on before answering keeps it grounded in what’s actually in the document instead of drifting into assumptions.

How do examples and permission to say “I don’t know” improve output?

For Claude Code skills (reusable instructions for repeated tasks like generating a weekly report), the instinct when output comes out wrong is to add more written rules. Anthropic’s guidance suggests the opposite: show examples of correct output rather than explaining the rules in more detail. In Anthropic’s own testing, adding examples moved accuracy from 72% to 90% without any other changes. The recommendation is three to five solid examples, either inside the main skill file or as a separate reference file.

The enterprise platform for building software with AI
›Build a claims app for 400 adjusters.
HIPAAAudit logSelf-hosted

Separately, Claude defaults to attempting an answer even when it doesn’t have enough information, which increases the risk of fabricated detail. Giving it explicit permission to say it doesn’t know, with example wording like “I don’t have enough information to confidently assess this,” reduces that false-information problem.

Why does starting broad before narrowing down improve research?

When Anthropic built its own research system, it found that roughly 80% of the difference in research quality came down to how much search effort went in, not the sophistication of the final answer. The system starts with short, broad searches to map out what exists, then narrows into specific angles. Effort scales with the question: a simple fact might get a single research pass, while a complex comparison gets multiple agents working in parallel.

This same principle applies outside of formal research tasks. Choosing a tool for your team works better if you first ask for every option on the market, then compare the top three, rather than asking for the single best option up front. The same goes for sourcing suppliers or scouting content ideas: get the full landscape first, then narrow. Starting broad surfaces options you wouldn’t have thought to search for directly.

Frequently Asked Questions

What is Anthropic’s “What You Can Stop Doing” update?

It’s a section added to Anthropic’s Claude Code Best Practices page on November 4th, clarifying which older prompting and workflow techniques no longer matter now that the model and tooling have changed, alongside guidance on what still holds up.

Does telling Claude to write a script actually save that much in tokens?

Anthropic’s own example showed a job dropping from 150,000 tokens to 2,000 tokens by having Claude process a file through a script rather than reading it directly into the conversation, a 98% reduction. Savings vary by task, but the principle applies broadly to any file-handling job where you don’t need Claude to understand the content, just transform or move it.

Why use JSON instead of Markdown for progress tracking?

Anthropic found Claude is less likely to inappropriately edit or overwrite JSON files compared to Markdown, making JSON more reliable for tracking whether tasks have genuinely passed validation rather than being silently merged or reworded.

Are hooks better than writing instructions in Claude.md?

For rules that must never be broken, yes. Claude can ignore or deprioritize a Claude.md instruction, but it cannot bypass a hook or a deny rule, since Claude Code enforces those mechanically every time. Anthropic recommends keeping hooks limited to strict rules, not general preferences.

Is “be ambitious” actually a useful prompt phrase?

It’s one of the few phrases from Anthropic’s earlier prompting guidance still cited as effective, used to push Claude toward building more complete output rather than the minimal version that technically satisfies a request. It hasn’t been independently benchmarked against omitting it in a side-by-side test.

Editorial standards

Related Articles

Fix Degraded Claude Code Output: Trim Skills, Not Add Them

Claude Code output feel worse after a model upgrade? Learn why fewer skills and less rigid instructions often produce better results.

fix Claude CodeClaude Code skillsCLAUDE.md tips

This Free Claude Code Skill Turns Your Agent Into a Video Editor

A free, open-source Claude Code skill guides coding agents through transcribing, cutting, and polishing raw footage into finished video.

Claude Code video editing skillAI video editor automationClaude Code skills

How to Set Up Claude Code's Auto Mode, Deny Rules, and Hooks

A practical guide to Claude Code's auto mode, deny rules, sandboxing, and hooks, based on Anthropic's own internal workflow changes.

Claude Code auto modeClaude Code hooksClaude Code deny rules

Fix AI Coding Agent Problems With Skills, Rules, and Hooks

Practical fixes for AI coding agents that fake completion, skip tests, or ignore rules, using devil's advocate reviews, evidence, and hooks.

AI coding agent rulesClaude Code skillsAI agent hooks

10 Best GitHub Repos for Claude Code in 2025

The top GitHub repos and skills builders use to extend Claude Code into video editing, scraping, app building, testing, and SEO.

Claude Code GitHub reposClaude Code skillsbest Claude plugins

How to Set Up Claude Code Skills for a Full Dev Workflow

A practical guide to installing Claude Code skills for PRDs, specs, planning, and validation, covering the outer loop and inner loop of AI coding.

Claude Code skillsAI coding workflowClaude Code marketplace plugin

Presented by MindStudio

No spam. Unsubscribe anytime.