Cmd. /claude-api
Claude API reference, migration, cost optimization, and evaluation workflows
Written and reviewed by Eric Han · Co-founder & CTO, reopt
Key takeaways
- Claude API and Managed Agents support skill.
- Check the input surface and availability before using the examples below.
Purpose
Claude API and Managed Agents support skill.
/claude-api [migrate|upgrade|api-version|managed-agents-onboard|managed-agents-secure|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]Availability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Bundled skill |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-10-23 · Claude Code 2.1.308 |
Subcommands have separate version requirements; build-eval and hillclimb are available in v2.1.259+, and preserved-thinking-migration in v2.1.282+. From v2.1.285 it cannot be run from Remote Control clients. managed-agents-secure requires v2.1.304+; api-version requires v2.1.307+.
Examples
/claude-api api-version
/claude-api managed-agents-secure| Subcommand | Use | Documented minimum |
|---|---|---|
migrate | Update API code for a newer model. | Not specified in Commands |
upgrade | Migrate the Python Anthropic SDK from 0.x to 1.x. | v2.1.236 |
managed-agents-onboard | Create a Managed Agent with guided setup. | Not specified in Commands |
prompt-audit | Review outdated model instructions and propose a diff. | v2.1.221 |
cost-optimize | Measure API spend and apply one measurable optimization at a time. | v2.1.247 |
build-eval | Build an evaluation set for a Claude-powered app. | v2.1.259 |
hillclimb | Improve an app against an existing evaluation. | v2.1.259 |
preserved-thinking-migration | Find edits to earlier turns, the system prompt, or the tool list that invalidate preserved thinking blocks, measure the reasoning each one drops, and propose fixes one at a time. | v2.1.282 |
/claude-api build-eval
/claude-api hillclimbChoose the evaluation target and success criteria first. Review code changes and run the evaluation after each change. All eight subcommands above are now in the official signature; the earlier note that cost-optimize was changelog-only is obsolete. From v2.1.290, managed-agents-onboard also takes a URL, setting up the Managed Agents pattern that page describes as ant apply files, or a Console quickstart name such as deep-researcher, building that template with the ant CLI.
Effects and persistence
Loads API guidance for the project's language or performs the selected subtask. Review file diffs from migration and optimization work.
/claude-api api-version(v2.1.307+) helps migrate code to API version2026-10-21; distinguish it from model migration (migrate) and SDK migration (upgrade)./claude-api managed-agents-secure(v2.1.304+) compares agent configuration with Anthropic's security guide without modifying settings.
Cautions
Subcommands have separate version requirements; build-eval and hillclimb are available in v2.1.259+. From v2.1.285 the skill cannot be run from Remote Control clients.