Want to access all premium content?

Become a paying subscriber to get access to all courses, guides like this, prompts and skills library, and $500+ worth of AI tools.

Claude Code’s /claude-api prompt-audit command checks your CLAUDE.md, skills and prompts for instructions written for older models. Repeated checks and lines like “CRITICAL: YOU MUST ALWAYS” can add unnecessary work. In Anthropic’s test, removing those habits reduced cost and improved accuracy.

We’ll save a baseline answer, run the audit, review its suggestions and repeat the task. You’ll need Claude Code 2.1.221 or later and a folder containing a CLAUDE.md or skills. On Pro or Max, lower usage can help your allowance last longer.

Step 1: Update Claude Code. Check that your version includes the command.

Step 2: Save a baseline. Run a task you use often.

Step 3: Run the audit. Check your instructions for outdated habits.

Step 4: Review the fixes. Approve changes and keep rules that serve a purpose.

Step 5: Compare the results. Repeat the task with the updated instructions.

Step 1: Update Claude Code

The audit comes with Claude Code’s claude-api skill. Check your version in Terminal.

claude --version

You need version 2.1.221 or later. To update, run this.

claude update

Restart Claude Code, then type /claude-api. If it doesn’t appear, check the version again.

Step 2: Save a baseline

Open Claude Code in the folder you want to audit, such as a project containing a CLAUDE.md or skills.

Choose a task you run often that uses those instructions. It could be writing a caption, fixing a bug or summarizing notes.

Run it as usual and save the answer as before.txt. Record the elapsed time and answer length. Choose a task with clear checks so you can judge whether the next answer improves.

Step 3: Run the audit

In the same session, enter this command.

/claude-api prompt-audit

Without a path, the audit examines the current folder. That includes CLAUDE.md files, skills, rules, tool descriptions and code that calls the Claude API.

Your global ~/.claude/CLAUDE.md needs to be named separately, as shown in Use case #1.

The audit looks for patterns such as these.

Pattern

Example

Suggested action

ALL-CAPS emphasis

“CRITICAL: YOU MUST ALWAYS…”

Rewrite in normal case or remove

Repeated verification

“Double-check your work twice”

Remove unnecessary repetition

Blanket demands for exhaustive work

“Be maximally thorough. Don’t stop early.”

Remove or give it a specific scope

Instructions to write out reasoning

“Think step by step before every answer”

Remove the scaffold and use effort settings

Fixed steps for judgment calls

“Follow these 6 steps for every caption”

Describe the goal and completion checks

Conflicting rules

“Keep answers short” alongside “Explain everything in detail”

Ask you to resolve the conflict

The audit preserves project context, procedures for risky actions and rules that still prevent a known failure. In our test, it kept “Never push to git without asking me first”.

The report starts by stating which files it read, the target model and whether Git history was available. It then summarizes the findings.

Each finding includes its file and line, the instruction, the matched pattern, an explanation, confidence and a proposed action.

Low-confidence findings stay in the report without entering the proposed changes. Ask about any item individually, such as “Show me finding 1 in full”.

Our small test project took 40 seconds to audit. A larger downloaded skill took two minutes and 35 seconds.

Depending on the run, Claude may print the report in Terminal or save prompt-audit-report.md in the folder.

Step 4: Review the fixes

The audit proposes edits for you to approve. If the footer shows auto mode, press Shift+Tab until it’s off so Claude waits for your decision.

Then send this prompt.

❝

Apply only the high-confidence findings from the audit. Keep every rule that has a reason or protects a risky action, and show me the diff before saving.

Read the diff before approving. In our test, Claude removed the CRITICAL, thoroughness and step-by-step lines.

It also changed “Keep every answer under 3 lines” to “Keep answers short and cover only what was asked”, and replaced a skill’s six-step process with one direct instruction.

The medium-confidence finding stayed untouched, and Claude left a conflicting rule for us to decide.

If a rule came from a past failure, explain that before removing it. You can also approve findings by number, such as “Apply 1, 3 and 4”.

If the folder uses Git, commit the current version before applying changes so you have a clear restore point.

Step 5: Compare the results

Start a fresh Claude Code session in the same folder so it loads the updated instructions.

Run the exact task from Step 2 and save the response as after.txt.

Compare the answers against your task’s requirements. Check correctness, instruction-following, length and elapsed time.

Our two captions both followed the rules. The second run was two seconds faster, a small difference from a single comparison.

The audit doesn’t test its edits. Try the updated instructions on your usual tasks, and restore any change that makes the results worse.

Resolve flagged conflicts too. In our test, a remaining “explain every change in detail” instruction still added an explanation beneath the caption.

Revisit the audit when you change models. Instructions that helped an earlier model may need updating.

Use cases

After reviewing one project, try these three checks.

Use case #1: Audit your global CLAUDE.md

If you have a global instructions file, give the command its path.

/claude-api prompt-audit ~/.claude/CLAUDE.md

A named file becomes the full audit scope. Review changes carefully because these instructions affect every project.

Use case #2: Check a downloaded skill

Open Claude Code inside the skill’s folder and run this.

/claude-api prompt-audit

In a downloaded skill, our audit found outdated model names, an assumption that every speaker reads Russian and references to missing files.

Approve the relevant fixes, then run the skill on a familiar task.

Use case #3: Audit Claude Project instructions

Copy the Project’s instructions from claude.ai into ~/Desktop/project-instructions.md.

Then run this command.

/claude-api prompt-audit ~/Desktop/project-instructions.md

Review the changes, paste the revised text back into the Project and test it with a question you ask often.

Limitations

Anthropic’s figures came from an API customer-support test. Switching from Opus 4.8 to Opus 5.5 reduced cost by about 18%. The prompt audit reduced it by another 9% and improved accuracy by about two points.

Those figures describe that test. Your results depend on the instructions and tasks you use. Pro and Max have a flat subscription price, so reduced usage helps preserve your allowance.

Clean files may produce few findings. Separate runs can also describe the same instruction differently or recommend different actions. Compare outputs before keeping a change.

The audit itself consumes usage. One tester reported runs costing $1.28–$5.10 at API list prices and taking two to six minutes.

In our test, a request to write out reasoning in a scratchpad triggered an Opus 5.5 safeguard error. If that happens, remove the instruction manually, open a fresh session and retry.

Use /doctor for the separate check for an oversized CLAUDE.md.

The original guide was checked on November 26, 2026. The command, audit patterns and model behavior may change.

Closing

Start with one project and a task you can check. Save the baseline, review the audit’s suggestions and compare the result after applying them.

Then work through your global instructions and downloaded skills, keeping the edits that improve your usual tasks.

See you in the next one :)