XNews

Anthropic Introduces /claude-api Skill and Prompt Anti-patterns Guide

Anthropic introduced an open-source /claude-api skill built into Claude Code. - Skill optimizes Claude API calls for agent/Claude API development; not needed for Claude Code users; can have reduced effect for non-Claude models. - Code on GitHub; triggered when project imports Anthropic SDK or user types /claude-api. - Loads API docs for Python, TypeScript, Java, Go, Ruby, C#, PHP, cURL. - Covers Messages API and Managed Agents. - cost-optimize: analyzes actual API usage, prioritized savings; checks cache config, token redundancy, batch opportunities, effort levels, model selection. - prompt-audit: scans prompts/skills for outdated/problematic patterns; outputs audit report with file/line and diff. - migrate: migrates API code to newer models; handles breaking changes; examples Fable 5 to 5.1, Opus 4.6 to 4.8. - managed-agents-onboard: interactive setup for Managed Agent. - Context: Fable 5.1 prompt caching price dropped 75%; low effort reaches previous high effort. - Anti-patterns: verification rituals; thoroughness/emphasis boosters; mandatory procedures/scratchpad scaffolds; stale few-shot examples; contradictory rules; dated configuration. - Anti-patterns accumulate and hurt when upgrading; Opus 4.8 to Opus 5 case: verification rituals caused repeated work; emphasis boosters triggered dozens of unnecessary system searches. - Prompt audits improve performance and reduce cost. - Writing guidance: remove mannered prose; use literal statements instead of metaphor, flourish, writer posture.

Key insights

/claude-api skill targets API developers

The open-source skill is built into Claude Code for developers building on Claude API or agents. It is not required for Claude Code users and has reduced effect for non-Claude models. It triggers when a project imports the Anthropic SDK or when the user types /claude-api, and loads API documentation for Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL. It covers Messages API and Managed Agents, the latter being Anthropic-managed stateful agents with sandbox environments.

cost-optimize and migrate support model upgrades

/claude-api cost-optimize analyzes actual API usage and produces prioritized savings suggestions that can be approved or skipped individually. It checks cache configuration, token redundancy, batch processing opportunities, effort levels, and model selection. /claude-api migrate moves existing API code to newer models by confirming scope, classifying files, and applying breaking changes. Examples include migrating from Fable 5 to Fable 5.1 or Opus 4.6 to 4.8.

prompt-audit identifies six anti-patterns

/claude-api prompt-audit scans prompt and skill files for outdated or problematic patterns. The six anti-patterns are verification rituals, thoroughness and emphasis boosters, mandatory procedures and scratchpad scaffolds, stale few-shot examples, contradictory rules, and dated configuration. The audit produces a report with specific files, line numbers, and issue patterns, plus a diff with suggested fixes.

Anti-patterns harm frontier models

For frontier models, 'double-check your work' can be taken literally and waste tokens; emphasis phrases like 'as detailed as possible' lead to verbosity and unnecessary tool calls; forced step-by-step scratchpads overlap native reasoning; stale few-shot examples can induce long reasoning on simple tasks; contradictory rules are followed literally; outdated thinking budgets can be rejected by the Claude platform. These patterns accumulate over time and silently drag performance when upgrading models.

Real benchmark case shows prompt audit impact

In an internal customer service benchmark migrating from Opus 4.8 to Opus 5, verification rituals such as 'check twice' caused repeated work and wasted tokens, while emphasis boosters triggered dozens of unnecessary system searches. Prompt audits significantly improved LLM performance and reduced cost in that setting. The /claude-api skill is positioned against the background of Fable 5.1, where prompt caching price dropped 75% and low effort can match previous high effort, so cleaning old prompts is necessary.

Anthropic guide asks for literal, non-mannered language

Anthropic guidance says to remove all mannered prose. When a literal statement is available, it should be used instead of metaphor, flourish, or language that performs the writer rather than conveys meaning.

Source posts