Run a codebase-wide audit with Claude Code dynamic workflows
Added Updated NewHotCopyable prompt below
Published Last verified Released
Our verdict
The right tool when a task is too big for one conversation: an auth sweep across every route, a large migration, a bug hunt. A workflow is a script Claude writes, so the plan lives in code, results are cross-checked by other agents, and a saved run can be repeated. It uses much more of your plan than a normal session, so start with one directory and watch /workflows. It is not interactive mid-run, so split anything that needs your sign-off into separate workflows.
- Who it's for
- Claude Code users on paid plans with large or legacy codebases
- Leverage
- Dozens of parallel agents on one task, with built-in cross-checking
- Effort
- Medium
- Date added
What Codebase Audit with Claude Code Workflows does
A dynamic workflow is a JavaScript script that Claude writes for your task and a runtime executes in the background while your session stays responsive. Unlike subagents, skills or agent teams, where Claude decides turn by turn, the script holds the loop, the branching and the intermediate results, so Claude's context holds only the final answer. That lets it apply a repeatable quality pattern, such as having independent agents adversarially review each other's findings before they are reported. Workflows are available on all paid plans and with Anthropic API access, Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry; on Pro you turn them on from the Dynamic workflows row in /config. The bundled /deep-research workflow fans out searches, cross-checks sources, votes on each claim and returns a cited report. Run /workflows to watch phases and agents, pause with p, stop with x, and save a good run as a command with s.
How builders use Codebase Audit with Claude Code Workflows
- Try the bundled workflow first: /deep-research followed by a question, then run /workflows to watch phases and agent counts.
- Start a one-off workflow by putting ultracode in your prompt or asking for a workflow in your own words, and scope it to one directory.
- Approve the plan Claude Code shows. Choose View raw script to read it first; Ctrl+G opens it in your editor.
- Drill into a phase to see each agent's prompt, recent tool calls and result, and stop any agent that's off track.
- When a run did what you wanted, press s in /workflows to save it to .claude/workflows/ in the project (shared with everyone who clones the repo) or to ~/.claude/workflows/ (just you).
- Re-run a saved workflow as a slash command, and pass input through args, for example a list of issue numbers or target paths.
- Add allow rules for the tools the agents need before a long run so it doesn't stop on prompts.
Workflow, subagent, skill or agent team
Anthropic's docs separate them by who holds the plan (checked 26 Nov 2026).
| Approach | Who decides what runs next | Scale |
|---|---|---|
| Subagents | Claude, turn by turn | A few delegated tasks per turn |
| Skills | Claude, following the instructions | Same as subagents |
| Agent teams | A lead agent, turn by turn | A handful of long-running peers |
| Workflows | The script | Dozens to hundreds of agents per run |
Limits the runtime applies
- Up to 16 concurrent agents by default, fewer on a machine with fewer CPUs. A documented environment variable changes it, from 1 to 256, on v2.1.269 or later (see the workflows docs).
- At most 1,000 agents in total per run, and up to 4,096 items in a single parallel() or pipeline() call.
- No mid-run user input beyond agent permission prompts and a usage-limit wait; for sign-off between stages, run each stage as its own workflow.
- No import() in the script, and no direct filesystem or shell access from the workflow itself; the agents read, write and run commands.
Codebase Audit with Claude Code Workflows: limits and gotchas
- Cost. A single run can use meaningfully more tokens than the same task in conversation, and on a subscription plan those tokens count toward your limits. Run it on a small slice first.
- The Large workflow warning appears when a run schedules more than 25 agents or projects more than 1.5 million tokens. It is advisory and does not pause the run, and it doesn't appear while ultracode is on.
- With /effort ultracode on, Claude plans a workflow for every substantive task in the session, so each request costs more tokens and takes longer. Turn it off with /effort ultracode off when you go back to routine work.
- The ultracode keyword only starts a workflow from a prompt you type yourself. It does nothing in claude -p, a scheduled task prompt, or a webhook or pull request comment.
- Findings are cross-checked, not guaranteed. When verifier agents can't check a claim, for example after a rate limit or API error, the report lists it as unverified rather than refuted.
- Runs pause at a usage limit and continue on their own only in some session types (an interactive terminal session on a claude.ai subscription, for example); elsewhere the affected agents fail.
Codebase Audit with Claude Code Workflows compared with other tools here
- Claude Code subagents: focused workers Claude spawns turn by turn, with their own context. Pick them for a handful of delegated reviews or searches.
- Cloudflare security-audit skill: a six-phase auditor where a fresh agent tries to disprove each finding. Pick it when the job is a security sweep with a fixed method.
- Plannotator: a browser surface for reviewing agent plans and diffs. Pair it with any large run so a person reads the result.
- Claude Code: the plain agent loop. Pick a normal session when one conversation can hold the task.
When to pick Codebase Audit with Claude Code Workflows
- Pick a dynamic workflow for a codebase-wide sweep or a large migration where the same step runs across many files and results need cross-checking.
- Pick it when you want the orchestration saved as a command your team can rerun after the next big change.
- Use subagents or a normal session for a task one conversation can hold; it will cost far less.
- Don't use it for work that needs your decision between stages, unless you split it into one workflow per stage.
Copy this: Scoped audit
ultracode: audit every API endpoint under src/routes/ for missing auth checks and unvalidated input.
For each finding, have an independent agent try to refute it before it goes in the report.
Report file:line, the risk, and a suggested fix. Do not change any code.Codebase Audit with Claude Code Workflows questions
Which plans include dynamic workflows?
All paid plans, with Anthropic API access, and on Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry. On Pro, enable them from the Dynamic workflows row in /config.
What is ultracode?
A keyword that asks Claude to write a workflow for one prompt, and also a session setting (/effort ultracode) that plans a workflow for every substantive task.
How do I save a workflow?
Run /workflows, select the run and press s, then choose the project's .claude/workflows/ folder or your personal ~/.claude/workflows/.
Can I stop a run that costs too much?
Yes. In /workflows, press x to stop the run or a single agent, and p to pause. Completed work is usually kept.
How many agents can run at once?
Up to 16 by default, with a cap of 1,000 agents per run.
Related discoveries
See the newest picks →- ToolCoding & Shipping Agents
improve: shadcn's skill where a strong model plans
An agent skill (MIT) from shadcn, the creator of shadcn/ui, that uses your most capable model to audit a codebase and write self-contained implementation plans, then hands those plans to cheaper models to carry out. It never edits your source code itself.
Effort: LowPrompt#Plugin / extension#Open source
- ToolCoding & Shipping Agents
Plannotator: review agent plans and diffs in your browser
An open-source (Apache-2.0), local, browser-based review surface for coding agents. When Claude Code, Codex, Copilot CLI, OpenCode, Pi and others propose a plan or finish a change, Plannotator opens it in your browser so you can mark it up and send structured feedback straight back to the agent.
NewEffort: LowPrompt#Plugin / extension#Open source
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.