# Claude Code Commands, Part 1: Audit Your Prompts Before You Blame the Model

> Part 1 of our Claude Code commands series: the start-of-message rule, a version table, and /claude-api prompt-audit with a baseline you can re-run.

Source: https://bytevancer.com/blog/claude-code-commands-part-1-prompt-audit · Published 2026-10-03 · ByteVancer · AI Engineering

**Before you say the model got worse, audit the prompts it's reading. Part 1: the slash-first rule, which version you need, and /claude-api prompt-audit with a re-runnable baseline.**

> **Part 1 of 4: Claude Code commands, explained** — **Part 1: Audit your prompts with /claude-api prompt-audit (you're here)** · [Part 2: /effort, /simplify and /frontend-design](https://bytevancer.com/blog/claude-code-commands-part-2-effort-simplify-frontend-design) · [Part 3: ultracode, /batch, /compact and /rewind](https://bytevancer.com/blog/claude-code-commands-part-3-ultracode-batch-compact-rewind) · [Part 4: build-eval and hillclimb for your Claude app](https://bytevancer.com/blog/claude-code-commands-part-4-build-eval-hillclimb)

New series: the Claude Code commands that actually change how a session goes, cut into four short parts so nobody has to doom-scroll a 20-minute post. Part 1 starts where most "the model got dumber" takes should start: **your own prompts**. Every fact below comes from Anthropic's Claude Code docs. The study-buddy app, its files and every example command are ours and purely illustrative. So are the jokes.

## TL;DR

- A slash command only counts at the very start of your message. `tidy this /simplify` is just a sentence. Anything after the command name is its arguments.
- Two worlds: shell commands like `claude update` run in your terminal; slash commands run inside a Claude Code session.
- `/claude-api prompt-audit` (v2.1.221+) flags instructions written for older models in your prompts, skills and tool descriptions, then proposes fixes as a diff.
- Pin three things before auditing: a baseline task, a fence around the files in scope, and a check Claude can actually run.
- Judge every hunk, re-run the same task, keep what the check backs up. No check, no verdict. 🫡

## Rule zero: the slash goes first

Anthropic's commands reference is blunt: "A command is only recognized at the start of your message." Text after the name becomes its arguments. Type / on an empty prompt to list what's available, and keep typing to filter. Commands sent mid-response queue until the turn ends (a few, like /status and /usage, run right away).

Some entries in that reference are marked **Skill**. Those are bundled skills: prompt-based instructions Claude follows, which the `disableBundledSkills` setting turns off. /simplify, /batch and /claude-api are all that kind.

**Same laptop, two kinds of command**

**🖥️ Your terminal** *(shell commands)* — Run these outside a session, in your normal shell. Check what you have, then update the way you installed it.

```bash
claude --version
claude update
```

**💬 Inside Claude Code** *(slash commands)* — Typed into the session prompt, first thing in the message. Type / to browse the menu; letters filter it.

```text
/effort status
/claude-api prompt-audit
```

*The shell vs session split is from Anthropic's docs; the example pairs are our picks.*

> **The classic fail** — Typing `please tidy FlipCard.tsx /simplify` doesn't run anything: the command isn't at the start, so it isn't recognized as one. Flip it around: `/simplify src/components/FlipCard.tsx`.

## Check your version before you start

Here's what each part needs. If something is missing from your / menu, run `claude --version` before assuming it's broken.

**Requirements from Anthropic's Skills, Commands and Workflows docs and the anthropics/skills repo (checked Oct 3, 2026).**
- **/claude-api prompt-audit** — What it needs: Claude Code v2.1.221 or later; Part: 1
- **/effort, /simplify, /code-review** — What it needs: Built in, nothing to install; Part: 2
- **/example-skills:frontend-design** — What it needs: Install Anthropic's example-skills plugin first; Part: 2
- **ultracode (dynamic workflows)** — What it needs: A paid plan, or the Anthropic API, Bedrock, Google Cloud Agent Platform or Microsoft Foundry; on Pro, turn on "Dynamic workflows" in /config; Part: 3
- **claude --effort ultracode** — What it needs: v2.1.203 or later; Part: 3
- **/effort ultracode on | off** — What it needs: v2.1.284 or later; Part: 3
- **/batch** — What it needs: A git repo or a WorktreeCreate hook; outside git, v2.1.281 or later; Part: 3
- **/compact, /rewind, /clear, /context** — What it needs: Built in, nothing to install; Part: 3
- **/claude-api build-eval and hillclimb** — What it needs: v2.1.259 or later; Part: 4

## Pick your yardstick before you touch a prompt

Meet the running example for this series: study-buddy, an imaginary Next.js app that turns your class notes into flashcards. It calls the Claude API to write the cards, has a quiz mode with flip animations, and a CLAUDE.md full of all-caps rules from a few model generations ago. We made all of it up.

First, the best-practices line that matters most: "Give Claude a check it can run: tests, a build, a screenshot to compare." Without one, "looks done" is the only signal you get. So write the yardstick down:

*Our illustrative baseline note: one task, a fence around the files, a check that runs.*
```text
BASELINE (study-buddy, illustrative)
Task:   add a "shuffle deck" button to quiz mode
Scope:  src/app/quiz/**, src/components/Deck*.tsx
Check:  npm test -- deck && npm run build
Record: pass/fail, follow-up prompts needed, rules Claude ignored
```

Run that task once with the prompts as they are and note the follow-ups and ignored rules. That's your before picture. Ask Claude to show evidence (test output, the command and its result) rather than just saying it worked; the docs call that the cure for the trust-then-verify gap.

## What /claude-api prompt-audit actually does

`/claude-api` is a bundled skill that loads Claude API and Managed Agents reference material for your project's language. It switches on by itself when your code imports `anthropic` or `@anthropic-ai/sdk`, which study-buddy does, because that's how it writes flashcards. Its workflows start when you type a subcommand: `/claude-api <subcommand>`.

Today's subcommand is `prompt-audit`. Per the Skills page, it will "flag instructions written for older models" across your prompts, skills and tool descriptions, then propose the fixes "as a diff". A diff means you read every proposed line before you accept it. Its siblings include migrate, upgrade and cost-optimize (v2.1.247+), plus the build-eval and hillclimb pair waiting in Part 4.

*Start of the message, as always.*
```text
/claude-api prompt-audit
```

So what would it chew on in study-buddy? Here's the vibe of the file, invented for this post:

*Invented example. Which lines a real audit flags depends on your files and your model.*
```markdown
# CLAUDE.md (study-buddy, illustrative)
IMPORTANT!!! You are a world-class senior engineer.
ALWAYS think step by step before EVERY answer.
NEVER EVER add a library that isn't installed. I mean it.
Cards must be JSON. ONLY JSON. NO OTHER TEXT. ONLY JSON.
Run `npm test -- deck` after touching src/components/Deck*.
```

And a diff in the shape an audit could propose. Also illustrative, not real tool output:

*Illustrative diff. Real output will differ; the point is that you review each hunk.*
```diff
-IMPORTANT!!! You are a world-class senior engineer.
-ALWAYS think step by step before EVERY answer.
-NEVER EVER add a library that isn't installed. I mean it.
+Don't add dependencies without asking.
-Cards must be JSON. ONLY JSON. NO OTHER TEXT. ONLY JSON.
+Card output must match the schema in src/lib/cardSchema.ts.
 Run `npm test -- deck` after touching src/components/Deck*.
```

## Judge every hunk, not the vibe

The best-practices page gives the test for each line: "Would removing this cause Claude to make mistakes?" It also warns that bloated CLAUDE.md files cause Claude to ignore instructions, so pruning isn't just aesthetics:

**Accept or reject this hunk?**
- Does the line carry a project fact Claude can't guess, like a command, a path, a schema or a house rule? → **Keep the fact (rewording is fine, deleting isn't)**
- Could removing it plausibly make the baseline task go wrong? → **Keep it for now and let the re-run prove it**
- Is it volume rather than information: caps, repetition, threats, hype? → **Accept the removal**
- Otherwise → **Unsure? Accept it provisionally and let the re-run decide**

On our made-up file: the test command survives untouched, because it's a real project fact. The "no new libraries" shout becomes one calm rule, because the constraint is real even if the volume isn't. The JSON chant now points at an actual schema file instead of repeating itself. The "world-class engineer" line goes; it says nothing about the project.

## Re-run the same task, then keep or revert

Start a fresh session (the docs recommend /clear between unrelated tasks anyway) and run the exact baseline task with the exact same check. Then compare: did it pass, how many follow-ups, any rules still ignored?

**The prompt-audit loop**
Baseline → Audit → Judge → Re-run → Keep or revert

1. **Baseline** — Run one task with the old prompts and record the check result.
2. **Audit** — /claude-api prompt-audit proposes fixes as a diff.
3. **Judge** — Accept or reject each hunk with the decision tree.
4. **Re-run** — Fresh session, same task, same check.
5. **Keep or revert** — Keep what the check backs up; git revert the rest.

Equal or better with a shorter file? Keep it. Worse? Revert the unsure hunks with git. One run is a tiny sample, so if it's close, run it a couple more times. The docs say to test CLAUDE.md changes by watching how Claude behaves; this loop is that, written down. Part 4 grows it into a real eval.

> **Two failed corrections? Reset.** — Anthropic's best-practices page lists "correcting over and over" as a failure pattern: after two failed corrections, /clear and write a better prompt. A prompt audit is that same advice applied on purpose, once, to your whole setup.

## How we do it at ByteVancer

This blog runs on the same energy: a research file of sourced facts, a builder agent, a scratch build, then a separate reviewer agent that fact-checks the draft against the research file before we commit, deploy and run live checks. The rule holding it together: a check only counts if it actually ran, with its output in the transcript.

## The whole series

1. **Part 1: Audit your prompts with /claude-api prompt-audit (this post)**
2. [Part 2: /effort, /simplify and /frontend-design](https://bytevancer.com/blog/claude-code-commands-part-2-effort-simplify-frontend-design)
3. [Part 3: ultracode, /batch, /compact and /rewind](https://bytevancer.com/blog/claude-code-commands-part-3-ultracode-batch-compact-rewind)
4. [Part 4: build-eval and hillclimb for your Claude app](https://bytevancer.com/blog/claude-code-commands-part-4-build-eval-hillclimb)

Next up: [Part 2](https://bytevancer.com/blog/claude-code-commands-part-2-effort-simplify-frontend-design) tidies study-buddy's flip-card component with /simplify, sets /effort on purpose, and builds the app a landing page with /frontend-design.

## Frequently asked questions

**Why isn't my Claude Code slash command working?**
A command is only recognized at the start of your message, so text before it turns the whole thing into a normal prompt. Put the command first and any arguments after it. Type / on an empty prompt to see the commands available to you, and run claude --version in your terminal to check that your build is new enough.

**What does /claude-api prompt-audit do?**
It flags instructions written for older models in your prompts, skills and tool descriptions, and proposes fixes as a diff you can review. It's part of the bundled /claude-api skill and needs Claude Code v2.1.221 or later.

**What's the difference between claude update and a slash command?**
claude update and claude --version are shell commands you run in your terminal, outside a session. Slash commands such as /effort or /claude-api prompt-audit are typed inside a Claude Code session, at the start of a message.

**How do I know whether a prompt-audit change actually helped?**
Record a baseline first: pick a single representative task, fence off which files are in scope, and choose a check Claude can run, such as tests or a build. After accepting the hunks you agree with, run the same task in a fresh session with the same check and compare. Keep the changes the check backs up and revert the rest with git.

**Should I delete rules from my CLAUDE.md?**
Anthropic's best practices say to keep CLAUDE.md short and to ask of each line whether removing it would cause Claude to make mistakes. Bloated CLAUDE.md files cause Claude to ignore instructions, so prune regularly and test each change by watching how Claude behaves.

## Keep reading

- [Claude Code Commands, Part 2: /effort, /simplify and /frontend-design](https://bytevancer.com/blog/claude-code-commands-part-2-effort-simplify-frontend-design) — Part 2 of our Claude Code commands series: set /effort per model, clean up with /simplify (not /code-review), and brief /frontend-design properly.
- [Claude Code Effort Levels: Low, Medium, High or Max?](https://bytevancer.com/blog/claude-code-effort-levels) — Claude Code effort levels explained: what low to max really change, real build times, Terminal-Bench 3.0 results and a cheat sheet for picking a level.
- [All ByteVancer engineering articles](https://bytevancer.com/blog)

## Want a Claude-powered app whose prompts you can actually trust?

We build cloud applications with Claude in the loop: prompts that are audited, checks that run, and evidence before anything ships. See our [prompt engineering for Claude-powered cloud apps](https://bytevancer.com/services/cloud-applications) or [talk to the team](https://bytevancer.com/contact).

## Sources

- [Claude Code docs — Commands reference (checked Oct 3, 2026)](https://code.claude.com/docs/en/commands)
- [Claude Code docs — Skills: bundled skills and /claude-api workflows (checked Oct 3, 2026)](https://code.claude.com/docs/en/skills)
- [Claude Code docs — Best practices](https://code.claude.com/docs/en/best-practices)
- [Claude Code docs — Dynamic workflows (checked Oct 3, 2026)](https://code.claude.com/docs/en/workflows)
- [GitHub — anthropics/skills (example skills, for demonstration and educational use)](https://github.com/anthropics/skills)

---

*This is the Markdown copy of https://bytevancer.com/blog/claude-code-commands-part-1-prompt-audit — the page itself has the interactive charts and diagrams.*
