claudecode-omc 5.11.0 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/bundled/manifest.json +3 -3
  2. package/bundled/upstream/anthropic-skills/.omc-source/bundle.json +2 -2
  3. package/bundled/upstream/anthropic-skills/.omc-source/provenance.json +394 -390
  4. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +60 -29
  5. package/bundled/upstream/anthropic-skills/skills/claude-api/csharp/claude-api.md +46 -1
  6. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +2 -2
  7. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +3 -1
  8. package/bundled/upstream/anthropic-skills/skills/claude-api/go/claude-api.md +23 -4
  9. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +32 -3
  10. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +27 -0
  11. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +123 -7
  12. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +13 -0
  13. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +7 -2
  14. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +18 -1
  15. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +9 -7
  16. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +27 -0
  17. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +1 -1
  18. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/anthropic-cli.md +246 -0
  19. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/claude-platform-on-aws.md +59 -0
  20. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +24 -4
  21. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +8 -0
  22. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +48 -4
  23. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +3 -1
  24. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +15 -1
  25. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +10 -6
  26. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +25 -0
  27. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +48 -18
  28. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +8 -5
  29. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md +144 -0
  30. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +2 -1
  31. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +46 -9
  32. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +259 -3
  33. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +17 -9
  34. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +55 -3
  35. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/token-counting.md +56 -0
  36. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +22 -2
  37. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +45 -6
  38. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +1 -1
  39. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +10 -12
  40. package/bundled/upstream/anthropic-skills/skills/frontend-design/SKILL.md +39 -26
  41. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -2
  42. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +2 -2
  43. package/bundled/upstream/ecc/.omc-source/provenance.json +602 -550
  44. package/bundled/upstream/ecc/agents/agent-evaluator.md +206 -0
  45. package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -9
  46. package/bundled/upstream/ecc/agents/php-reviewer.md +109 -0
  47. package/bundled/upstream/ecc/agents/spec-miner.md +217 -0
  48. package/bundled/upstream/ecc/agents/vue-reviewer.md +206 -0
  49. package/bundled/upstream/ecc/commands/cost-report.md +58 -84
  50. package/bundled/upstream/ecc/commands/epic-claim.md +26 -0
  51. package/bundled/upstream/ecc/commands/epic-decompose.md +23 -0
  52. package/bundled/upstream/ecc/commands/epic-publish.md +23 -0
  53. package/bundled/upstream/ecc/commands/epic-review.md +23 -0
  54. package/bundled/upstream/ecc/commands/epic-sync.md +23 -0
  55. package/bundled/upstream/ecc/commands/epic-unblock.md +22 -0
  56. package/bundled/upstream/ecc/commands/epic-validate.md +22 -0
  57. package/bundled/upstream/ecc/commands/instinct-status.md +8 -8
  58. package/bundled/upstream/ecc/commands/multi-backend.md +2 -0
  59. package/bundled/upstream/ecc/commands/multi-execute.md +2 -0
  60. package/bundled/upstream/ecc/commands/multi-frontend.md +2 -0
  61. package/bundled/upstream/ecc/commands/multi-plan.md +2 -0
  62. package/bundled/upstream/ecc/commands/multi-workflow.md +2 -0
  63. package/bundled/upstream/ecc/commands/orch-add-feature.md +36 -0
  64. package/bundled/upstream/ecc/commands/orch-build-mvp.md +36 -0
  65. package/bundled/upstream/ecc/commands/orch-change-feature.md +38 -0
  66. package/bundled/upstream/ecc/commands/orch-fix-defect.md +38 -0
  67. package/bundled/upstream/ecc/commands/orch-refine-code.md +39 -0
  68. package/bundled/upstream/ecc/commands/quality-gate.md +34 -16
  69. package/bundled/upstream/ecc/commands/vue-review.md +174 -0
  70. package/bundled/upstream/ecc/skills/accessibility/SKILL.md +2 -1
  71. package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +2 -1
  72. package/bundled/upstream/ecc/skills/agent-eval/SKILL.md +2 -1
  73. package/bundled/upstream/ecc/skills/agent-harness-construction/SKILL.md +2 -1
  74. package/bundled/upstream/ecc/skills/agent-introspection-debugging/SKILL.md +2 -1
  75. package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +2 -1
  76. package/bundled/upstream/ecc/skills/agent-self-evaluation/SKILL.md +182 -0
  77. package/bundled/upstream/ecc/skills/agent-self-evaluation/examples/high-score-example.md +87 -0
  78. package/bundled/upstream/ecc/skills/agent-self-evaluation/examples/low-score-example.md +86 -0
  79. package/bundled/upstream/ecc/skills/agent-self-evaluation/references/evaluation-criteria.md +71 -0
  80. package/bundled/upstream/ecc/skills/agent-self-evaluation/references/hook-integration.md +64 -0
  81. package/bundled/upstream/ecc/skills/agent-self-evaluation/scripts/evaluate.py +408 -0
  82. package/bundled/upstream/ecc/skills/agent-self-evaluation/templates/evaluation-report.md +86 -0
  83. package/bundled/upstream/ecc/skills/agent-sort/SKILL.md +2 -1
  84. package/bundled/upstream/ecc/skills/agentic-engineering/SKILL.md +2 -1
  85. package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +2 -1
  86. package/bundled/upstream/ecc/skills/ai-first-engineering/SKILL.md +2 -1
  87. package/bundled/upstream/ecc/skills/ai-regression-testing/SKILL.md +2 -1
  88. package/bundled/upstream/ecc/skills/android-clean-architecture/SKILL.md +2 -1
  89. package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +2 -1
  90. package/bundled/upstream/ecc/skills/api-connector-builder/SKILL.md +2 -1
  91. package/bundled/upstream/ecc/skills/api-design/SKILL.md +2 -1
  92. package/bundled/upstream/ecc/skills/architecture-decision-records/SKILL.md +2 -1
  93. package/bundled/upstream/ecc/skills/article-writing/SKILL.md +2 -1
  94. package/bundled/upstream/ecc/skills/automation-audit-ops/SKILL.md +2 -1
  95. package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +2 -1
  96. package/bundled/upstream/ecc/skills/autonomous-loops/SKILL.md +2 -1
  97. package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +2 -1
  98. package/bundled/upstream/ecc/skills/benchmark/SKILL.md +2 -1
  99. package/bundled/upstream/ecc/skills/benchmark-methodology/SKILL.md +190 -0
  100. package/bundled/upstream/ecc/skills/benchmark-optimization-loop/SKILL.md +2 -1
  101. package/bundled/upstream/ecc/skills/blender-motion-state-inspection/SKILL.md +2 -1
  102. package/bundled/upstream/ecc/skills/blueprint/SKILL.md +2 -1
  103. package/bundled/upstream/ecc/skills/brand-discovery/SKILL.md +145 -0
  104. package/bundled/upstream/ecc/skills/brand-discovery/references/10_purpose-why.md +40 -0
  105. package/bundled/upstream/ecc/skills/brand-discovery/references/20_positioning.md +44 -0
  106. package/bundled/upstream/ecc/skills/brand-discovery/references/30_audience-niche.md +52 -0
  107. package/bundled/upstream/ecc/skills/brand-discovery/references/40_personality-archetype.md +57 -0
  108. package/bundled/upstream/ecc/skills/brand-discovery/references/50_voice-tone.md +59 -0
  109. package/bundled/upstream/ecc/skills/brand-discovery/references/60_narrative-story.md +50 -0
  110. package/bundled/upstream/ecc/skills/brand-discovery/references/70_founder-tension.md +49 -0
  111. package/bundled/upstream/ecc/skills/brand-discovery/references/90_SYNTHESIS.md +133 -0
  112. package/bundled/upstream/ecc/skills/brand-voice/SKILL.md +2 -1
  113. package/bundled/upstream/ecc/skills/browser-qa/SKILL.md +22 -4
  114. package/bundled/upstream/ecc/skills/bun-runtime/SKILL.md +2 -1
  115. package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +2 -1
  116. package/bundled/upstream/ecc/skills/carrier-relationship-management/SKILL.md +1 -1
  117. package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +2 -1
  118. package/bundled/upstream/ecc/skills/ck/SKILL.md +2 -1
  119. package/bundled/upstream/ecc/skills/claude-devfleet/SKILL.md +11 -2
  120. package/bundled/upstream/ecc/skills/click-path-audit/SKILL.md +2 -1
  121. package/bundled/upstream/ecc/skills/clickhouse-io/SKILL.md +2 -1
  122. package/bundled/upstream/ecc/skills/code-tour/SKILL.md +2 -1
  123. package/bundled/upstream/ecc/skills/codebase-onboarding/SKILL.md +2 -1
  124. package/bundled/upstream/ecc/skills/codehealth-mcp/SKILL.md +167 -0
  125. package/bundled/upstream/ecc/skills/coding-standards/SKILL.md +4 -2
  126. package/bundled/upstream/ecc/skills/competitive-platform-analysis/SKILL.md +214 -0
  127. package/bundled/upstream/ecc/skills/competitive-report-structure/SKILL.md +162 -0
  128. package/bundled/upstream/ecc/skills/compose-multiplatform-patterns/SKILL.md +2 -1
  129. package/bundled/upstream/ecc/skills/config-gc/SKILL.md +120 -0
  130. package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +2 -1
  131. package/bundled/upstream/ecc/skills/connections-optimizer/SKILL.md +2 -1
  132. package/bundled/upstream/ecc/skills/content-engine/SKILL.md +2 -1
  133. package/bundled/upstream/ecc/skills/content-hash-cache-pattern/SKILL.md +2 -1
  134. package/bundled/upstream/ecc/skills/context-budget/SKILL.md +2 -1
  135. package/bundled/upstream/ecc/skills/continuous-agent-loop/SKILL.md +2 -1
  136. package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +2 -1
  137. package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +2 -1
  138. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +14 -1
  139. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +31 -7
  140. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +90 -2
  141. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +27 -0
  142. package/bundled/upstream/ecc/skills/cost-aware-llm-pipeline/SKILL.md +2 -1
  143. package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +58 -108
  144. package/bundled/upstream/ecc/skills/council/SKILL.md +2 -1
  145. package/bundled/upstream/ecc/skills/cpp-coding-standards/SKILL.md +2 -1
  146. package/bundled/upstream/ecc/skills/cpp-testing/SKILL.md +2 -1
  147. package/bundled/upstream/ecc/skills/crosspost/SKILL.md +2 -1
  148. package/bundled/upstream/ecc/skills/csharp-testing/SKILL.md +2 -1
  149. package/bundled/upstream/ecc/skills/customer-billing-ops/SKILL.md +2 -1
  150. package/bundled/upstream/ecc/skills/customs-trade-compliance/SKILL.md +1 -1
  151. package/bundled/upstream/ecc/skills/dart-flutter-patterns/SKILL.md +2 -1
  152. package/bundled/upstream/ecc/skills/dashboard-builder/SKILL.md +2 -1
  153. package/bundled/upstream/ecc/skills/data-scraper-agent/SKILL.md +2 -1
  154. package/bundled/upstream/ecc/skills/data-throughput-accelerator/SKILL.md +2 -1
  155. package/bundled/upstream/ecc/skills/database-migrations/SKILL.md +2 -1
  156. package/bundled/upstream/ecc/skills/deep-research/SKILL.md +2 -1
  157. package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +2 -1
  158. package/bundled/upstream/ecc/skills/deployment-patterns/SKILL.md +2 -1
  159. package/bundled/upstream/ecc/skills/design-system/SKILL.md +2 -1
  160. package/bundled/upstream/ecc/skills/django-celery/SKILL.md +3 -2
  161. package/bundled/upstream/ecc/skills/django-patterns/SKILL.md +2 -1
  162. package/bundled/upstream/ecc/skills/django-security/SKILL.md +2 -1
  163. package/bundled/upstream/ecc/skills/django-tdd/SKILL.md +2 -1
  164. package/bundled/upstream/ecc/skills/django-verification/SKILL.md +2 -1
  165. package/bundled/upstream/ecc/skills/dmux-workflows/SKILL.md +2 -1
  166. package/bundled/upstream/ecc/skills/docker-patterns/SKILL.md +2 -1
  167. package/bundled/upstream/ecc/skills/documentation-lookup/SKILL.md +2 -1
  168. package/bundled/upstream/ecc/skills/dotnet-patterns/SKILL.md +2 -1
  169. package/bundled/upstream/ecc/skills/dynamic-workflow-mode/SKILL.md +2 -1
  170. package/bundled/upstream/ecc/skills/e2e-testing/SKILL.md +2 -1
  171. package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +2 -1
  172. package/bundled/upstream/ecc/skills/ecc-tools-cost-audit/SKILL.md +2 -1
  173. package/bundled/upstream/ecc/skills/email-ops/SKILL.md +2 -1
  174. package/bundled/upstream/ecc/skills/energy-procurement/SKILL.md +1 -1
  175. package/bundled/upstream/ecc/skills/enterprise-agent-ops/SKILL.md +2 -1
  176. package/bundled/upstream/ecc/skills/error-handling/SKILL.md +2 -1
  177. package/bundled/upstream/ecc/skills/eval-harness/SKILL.md +2 -1
  178. package/bundled/upstream/ecc/skills/evm-token-decimals/SKILL.md +2 -1
  179. package/bundled/upstream/ecc/skills/exa-search/SKILL.md +2 -1
  180. package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +2 -1
  181. package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +375 -188
  182. package/bundled/upstream/ecc/skills/finance-billing-ops/SKILL.md +2 -1
  183. package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +3 -2
  184. package/bundled/upstream/ecc/skills/flutter-dart-code-review/SKILL.md +2 -1
  185. package/bundled/upstream/ecc/skills/frontend-a11y/SKILL.md +3 -3
  186. package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +2 -1
  187. package/bundled/upstream/ecc/skills/frontend-patterns/SKILL.md +23 -8
  188. package/bundled/upstream/ecc/skills/frontend-slides/SKILL.md +2 -1
  189. package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +1 -1
  190. package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +2 -1
  191. package/bundled/upstream/ecc/skills/gan-style-harness/SKILL.md +2 -1
  192. package/bundled/upstream/ecc/skills/gateguard/SKILL.md +9 -1
  193. package/bundled/upstream/ecc/skills/generating-python-installer/SKILL.md +820 -0
  194. package/bundled/upstream/ecc/skills/git-workflow/SKILL.md +2 -1
  195. package/bundled/upstream/ecc/skills/github-ops/SKILL.md +2 -1
  196. package/bundled/upstream/ecc/skills/golang-patterns/SKILL.md +2 -1
  197. package/bundled/upstream/ecc/skills/golang-testing/SKILL.md +2 -1
  198. package/bundled/upstream/ecc/skills/google-workspace-ops/SKILL.md +2 -1
  199. package/bundled/upstream/ecc/skills/healthcare-cdss-patterns/SKILL.md +2 -1
  200. package/bundled/upstream/ecc/skills/healthcare-emr-patterns/SKILL.md +2 -1
  201. package/bundled/upstream/ecc/skills/healthcare-eval-harness/SKILL.md +2 -1
  202. package/bundled/upstream/ecc/skills/healthcare-phi-compliance/SKILL.md +2 -1
  203. package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +2 -1
  204. package/bundled/upstream/ecc/skills/hexagonal-architecture/SKILL.md +2 -1
  205. package/bundled/upstream/ecc/skills/hipaa-compliance/SKILL.md +2 -1
  206. package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +2 -1
  207. package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +2 -1
  208. package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +10 -9
  209. package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +2 -1
  210. package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +4 -3
  211. package/bundled/upstream/ecc/skills/inherit-legacy-style/SKILL.md +157 -0
  212. package/bundled/upstream/ecc/skills/intent-driven-development/SKILL.md +360 -0
  213. package/bundled/upstream/ecc/skills/inventory-demand-planning/SKILL.md +1 -1
  214. package/bundled/upstream/ecc/skills/investor-materials/SKILL.md +2 -1
  215. package/bundled/upstream/ecc/skills/investor-outreach/SKILL.md +2 -1
  216. package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +2 -1
  217. package/bundled/upstream/ecc/skills/iterative-retrieval/SKILL.md +2 -1
  218. package/bundled/upstream/ecc/skills/ito-basket-compare/SKILL.md +2 -1
  219. package/bundled/upstream/ecc/skills/ito-data-atlas-agent/SKILL.md +2 -1
  220. package/bundled/upstream/ecc/skills/ito-market-intelligence/SKILL.md +2 -1
  221. package/bundled/upstream/ecc/skills/ito-trade-planner/SKILL.md +2 -1
  222. package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +2 -1
  223. package/bundled/upstream/ecc/skills/jira-integration/SKILL.md +17 -7
  224. package/bundled/upstream/ecc/skills/jpa-patterns/SKILL.md +2 -1
  225. package/bundled/upstream/ecc/skills/knowledge-ops/SKILL.md +2 -1
  226. package/bundled/upstream/ecc/skills/kotlin-coroutines-flows/SKILL.md +2 -1
  227. package/bundled/upstream/ecc/skills/kotlin-exposed-patterns/SKILL.md +2 -1
  228. package/bundled/upstream/ecc/skills/kotlin-ktor-patterns/SKILL.md +2 -1
  229. package/bundled/upstream/ecc/skills/kotlin-patterns/SKILL.md +2 -1
  230. package/bundled/upstream/ecc/skills/kotlin-testing/SKILL.md +2 -1
  231. package/bundled/upstream/ecc/skills/kubernetes-patterns/SKILL.md +756 -0
  232. package/bundled/upstream/ecc/skills/laravel-patterns/SKILL.md +2 -1
  233. package/bundled/upstream/ecc/skills/laravel-plugin-discovery/SKILL.md +2 -1
  234. package/bundled/upstream/ecc/skills/laravel-security/SKILL.md +826 -163
  235. package/bundled/upstream/ecc/skills/laravel-tdd/SKILL.md +541 -149
  236. package/bundled/upstream/ecc/skills/laravel-verification/SKILL.md +2 -1
  237. package/bundled/upstream/ecc/skills/latency-critical-systems/SKILL.md +2 -1
  238. package/bundled/upstream/ecc/skills/lead-intelligence/SKILL.md +2 -1
  239. package/bundled/upstream/ecc/skills/llm-trading-agent-security/SKILL.md +2 -1
  240. package/bundled/upstream/ecc/skills/logistics-exception-management/SKILL.md +1 -1
  241. package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +2 -1
  242. package/bundled/upstream/ecc/skills/manim-video/SKILL.md +2 -1
  243. package/bundled/upstream/ecc/skills/market-research/SKILL.md +2 -1
  244. package/bundled/upstream/ecc/skills/marketing-campaign/SKILL.md +2 -1
  245. package/bundled/upstream/ecc/skills/mcp-server-patterns/SKILL.md +2 -1
  246. package/bundled/upstream/ecc/skills/messages-ops/SKILL.md +2 -1
  247. package/bundled/upstream/ecc/skills/ml-adoption-playbook/SKILL.md +57 -0
  248. package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +2 -1
  249. package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +1 -2
  250. package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +2 -1
  251. package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +2 -1
  252. package/bundled/upstream/ecc/skills/nanoclaw-repl/SKILL.md +2 -1
  253. package/bundled/upstream/ecc/skills/nestjs-patterns/SKILL.md +2 -1
  254. package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +2 -1
  255. package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +2 -1
  256. package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +2 -1
  257. package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +2 -1
  258. package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +2 -1
  259. package/bundled/upstream/ecc/skills/nodejs-keccak256/SKILL.md +2 -1
  260. package/bundled/upstream/ecc/skills/nutrient-document-processing/SKILL.md +2 -1
  261. package/bundled/upstream/ecc/skills/nuxt4-patterns/SKILL.md +2 -1
  262. package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +2 -1
  263. package/bundled/upstream/ecc/skills/opensource-pipeline/SKILL.md +2 -1
  264. package/bundled/upstream/ecc/skills/orch-add-feature/SKILL.md +45 -0
  265. package/bundled/upstream/ecc/skills/orch-build-mvp/SKILL.md +49 -0
  266. package/bundled/upstream/ecc/skills/orch-change-feature/SKILL.md +43 -0
  267. package/bundled/upstream/ecc/skills/orch-fix-defect/SKILL.md +43 -0
  268. package/bundled/upstream/ecc/skills/orch-pipeline/SKILL.md +121 -0
  269. package/bundled/upstream/ecc/skills/orch-refine-code/SKILL.md +44 -0
  270. package/bundled/upstream/ecc/skills/parallel-execution-optimizer/SKILL.md +2 -1
  271. package/bundled/upstream/ecc/skills/perl-patterns/SKILL.md +2 -1
  272. package/bundled/upstream/ecc/skills/perl-security/SKILL.md +2 -1
  273. package/bundled/upstream/ecc/skills/perl-testing/SKILL.md +2 -1
  274. package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +2 -1
  275. package/bundled/upstream/ecc/skills/plankton-code-quality/SKILL.md +2 -1
  276. package/bundled/upstream/ecc/skills/postgres-patterns/SKILL.md +2 -1
  277. package/bundled/upstream/ecc/skills/prediction-market-oracle-research/SKILL.md +2 -1
  278. package/bundled/upstream/ecc/skills/prediction-market-risk-review/SKILL.md +2 -1
  279. package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +2 -1
  280. package/bundled/upstream/ecc/skills/product-capability/SKILL.md +2 -1
  281. package/bundled/upstream/ecc/skills/product-lens/SKILL.md +2 -1
  282. package/bundled/upstream/ecc/skills/production-audit/SKILL.md +2 -1
  283. package/bundled/upstream/ecc/skills/production-scheduling/SKILL.md +1 -1
  284. package/bundled/upstream/ecc/skills/project-flow-ops/SKILL.md +2 -1
  285. package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +1 -1
  286. package/bundled/upstream/ecc/skills/python-patterns/SKILL.md +4 -3
  287. package/bundled/upstream/ecc/skills/python-testing/SKILL.md +2 -1
  288. package/bundled/upstream/ecc/skills/pytorch-patterns/SKILL.md +2 -1
  289. package/bundled/upstream/ecc/skills/quality-nonconformance/SKILL.md +1 -1
  290. package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +51 -50
  291. package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +25 -24
  292. package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +73 -72
  293. package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +8 -7
  294. package/bundled/upstream/ecc/skills/ralphinho-rfc-pipeline/SKILL.md +2 -1
  295. package/bundled/upstream/ecc/skills/react-patterns/SKILL.md +2 -1
  296. package/bundled/upstream/ecc/skills/react-performance/SKILL.md +2 -1
  297. package/bundled/upstream/ecc/skills/react-testing/SKILL.md +2 -1
  298. package/bundled/upstream/ecc/skills/recsys-pipeline-architect/SKILL.md +2 -1
  299. package/bundled/upstream/ecc/skills/recursive-decision-ledger/SKILL.md +2 -1
  300. package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +2 -1
  301. package/bundled/upstream/ecc/skills/regex-vs-llm-structured-text/SKILL.md +2 -1
  302. package/bundled/upstream/ecc/skills/repo-scan/SKILL.md +64 -63
  303. package/bundled/upstream/ecc/skills/research-ops/SKILL.md +2 -1
  304. package/bundled/upstream/ecc/skills/returns-reverse-logistics/SKILL.md +1 -1
  305. package/bundled/upstream/ecc/skills/rules-distill/SKILL.md +2 -1
  306. package/bundled/upstream/ecc/skills/rust-patterns/SKILL.md +2 -1
  307. package/bundled/upstream/ecc/skills/rust-testing/SKILL.md +2 -1
  308. package/bundled/upstream/ecc/skills/safety-guard/SKILL.md +2 -1
  309. package/bundled/upstream/ecc/skills/santa-method/SKILL.md +2 -1
  310. package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +2 -1
  311. package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +2 -1
  312. package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +2 -1
  313. package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +2 -1
  314. package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +2 -1
  315. package/bundled/upstream/ecc/skills/search-first/SKILL.md +2 -1
  316. package/bundled/upstream/ecc/skills/security-bounty-hunter/SKILL.md +2 -1
  317. package/bundled/upstream/ecc/skills/security-review/SKILL.md +2 -1
  318. package/bundled/upstream/ecc/skills/security-scan/SKILL.md +2 -1
  319. package/bundled/upstream/ecc/skills/seo/SKILL.md +2 -1
  320. package/bundled/upstream/ecc/skills/skill-comply/SKILL.md +2 -1
  321. package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +8 -0
  322. package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +2 -1
  323. package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +2 -1
  324. package/bundled/upstream/ecc/skills/social-graph-ranker/SKILL.md +2 -1
  325. package/bundled/upstream/ecc/skills/social-publisher/SKILL.md +17 -2
  326. package/bundled/upstream/ecc/skills/springboot-patterns/SKILL.md +2 -1
  327. package/bundled/upstream/ecc/skills/springboot-security/SKILL.md +2 -1
  328. package/bundled/upstream/ecc/skills/springboot-tdd/SKILL.md +2 -1
  329. package/bundled/upstream/ecc/skills/springboot-verification/SKILL.md +2 -1
  330. package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +10 -5
  331. package/bundled/upstream/ecc/skills/swift-actor-persistence/SKILL.md +2 -1
  332. package/bundled/upstream/ecc/skills/swift-protocol-di-testing/SKILL.md +2 -1
  333. package/bundled/upstream/ecc/skills/taste/SKILL.md +264 -0
  334. package/bundled/upstream/ecc/skills/taste/references/genre-taxonomy.md +87 -0
  335. package/bundled/upstream/ecc/skills/tdd-workflow/SKILL.md +64 -1
  336. package/bundled/upstream/ecc/skills/team-agent-orchestration/SKILL.md +2 -1
  337. package/bundled/upstream/ecc/skills/team-builder/SKILL.md +2 -1
  338. package/bundled/upstream/ecc/skills/terminal-ops/SKILL.md +2 -1
  339. package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +77 -1
  340. package/bundled/upstream/ecc/skills/token-budget-advisor/SKILL.md +2 -1
  341. package/bundled/upstream/ecc/skills/ui-demo/SKILL.md +2 -1
  342. package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +2 -1
  343. package/bundled/upstream/ecc/skills/uncloud/SKILL.md +2 -1
  344. package/bundled/upstream/ecc/skills/unified-notifications-ops/SKILL.md +2 -1
  345. package/bundled/upstream/ecc/skills/verification-loop/SKILL.md +2 -1
  346. package/bundled/upstream/ecc/skills/video-editing/SKILL.md +2 -1
  347. package/bundled/upstream/ecc/skills/videodb/SKILL.md +2 -1
  348. package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +2 -1
  349. package/bundled/upstream/ecc/skills/vue-patterns/SKILL.md +471 -0
  350. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +9 -8
  351. package/bundled/upstream/ecc/skills/workspace-surface-audit/SKILL.md +2 -1
  352. package/bundled/upstream/ecc/skills/x-api/SKILL.md +2 -1
  353. package/bundled/upstream/impeccable/.omc-source/bundle.json +2 -2
  354. package/bundled/upstream/impeccable/.omc-source/provenance.json +30 -25
  355. package/bundled/upstream/impeccable/skills/impeccable/SKILL.md +2 -2
  356. package/bundled/upstream/impeccable/skills/impeccable/reference/hooks.md +10 -8
  357. package/bundled/upstream/impeccable/skills/impeccable/reference/live.md +1 -1
  358. package/bundled/upstream/impeccable/skills/impeccable/scripts/context.mjs +707 -26
  359. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/browser/injected/index.mjs +202 -0
  360. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/cli/main.mjs +57 -11
  361. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/design-system.mjs +750 -0
  362. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +231 -0
  363. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/detect-antipatterns.mjs +7 -0
  364. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +29 -4
  365. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +20 -4
  366. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +2 -0
  367. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +27 -1
  368. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/registry/antipatterns.mjs +29 -0
  369. package/bundled/upstream/impeccable/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
  370. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-admin.mjs +135 -48
  371. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-before-edit.mjs +5 -2
  372. package/bundled/upstream/impeccable/skills/impeccable/scripts/hook-lib.mjs +375 -29
  373. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/design-parser.mjs +8 -1
  374. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/impeccable-config.mjs +638 -0
  375. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/impeccable-paths.mjs +37 -35
  376. package/bundled/upstream/impeccable/skills/impeccable/scripts/lib/target-args.mjs +42 -0
  377. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-browser.js +159 -72
  378. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-poll.mjs +16 -11
  379. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-server.mjs +9 -8
  380. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-target.mjs +30 -0
  381. package/bundled/upstream/impeccable/skills/impeccable/scripts/live-wrap.mjs +1 -1
  382. package/bundled/upstream/impeccable/skills/impeccable/scripts/live.mjs +72 -21
  383. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +2 -2
  384. package/bundled/upstream/oh-my-claudecode/.omc-source/provenance.json +103 -103
  385. package/bundled/upstream/oh-my-claudecode/agents/analyst.md +6 -0
  386. package/bundled/upstream/oh-my-claudecode/agents/architect.md +6 -0
  387. package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +6 -0
  388. package/bundled/upstream/oh-my-claudecode/agents/critic.md +6 -0
  389. package/bundled/upstream/oh-my-claudecode/agents/debugger.md +6 -0
  390. package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +6 -0
  391. package/bundled/upstream/oh-my-claudecode/agents/tracer.md +6 -0
  392. package/bundled/upstream/oh-my-claudecode/agents/verifier.md +7 -0
  393. package/bundled/upstream/oh-my-claudecode/hooks/hooks.json +9 -2
  394. package/bundled/upstream/oh-my-claudecode/skills/ask/SKILL.md +15 -4
  395. package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +30 -1
  396. package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +29 -35
  397. package/bundled/upstream/oh-my-claudecode/skills/ccg/SKILL.md +20 -9
  398. package/bundled/upstream/oh-my-claudecode/skills/configure-notifications/SKILL.md +2 -2
  399. package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +6 -4
  400. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +1 -1
  401. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +2 -1
  402. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +2 -2
  403. package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +29 -18
  404. package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +127 -165
  405. package/bundled/upstream/superpowers/.omc-source/bundle.json +2 -2
  406. package/bundled/upstream/superpowers/.omc-source/provenance.json +59 -52
  407. package/bundled/upstream/superpowers/hooks/hooks-codex.json +16 -0
  408. package/bundled/upstream/superpowers/hooks/session-start +4 -12
  409. package/bundled/upstream/superpowers/hooks/session-start-codex +26 -0
  410. package/bundled/upstream/superpowers/skills/brainstorming/SKILL.md +5 -10
  411. package/bundled/upstream/superpowers/skills/brainstorming/scripts/frame-template.html +25 -26
  412. package/bundled/upstream/superpowers/skills/brainstorming/scripts/helper.js +101 -22
  413. package/bundled/upstream/superpowers/skills/brainstorming/scripts/server.cjs +399 -30
  414. package/bundled/upstream/superpowers/skills/brainstorming/scripts/start-server.sh +70 -9
  415. package/bundled/upstream/superpowers/skills/brainstorming/scripts/stop-server.sh +66 -2
  416. package/bundled/upstream/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +1 -1
  417. package/bundled/upstream/superpowers/skills/brainstorming/visual-companion.md +33 -22
  418. package/bundled/upstream/superpowers/skills/dispatching-parallel-agents/SKILL.md +9 -6
  419. package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +2 -2
  420. package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +2 -12
  421. package/bundled/upstream/superpowers/skills/receiving-code-review/SKILL.md +2 -2
  422. package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +2 -2
  423. package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +15 -11
  424. package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +206 -67
  425. package/bundled/upstream/superpowers/skills/subagent-driven-development/implementer-prompt.md +30 -4
  426. package/bundled/upstream/superpowers/skills/subagent-driven-development/scripts/review-package +44 -0
  427. package/bundled/upstream/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
  428. package/bundled/upstream/superpowers/skills/subagent-driven-development/scripts/task-brief +40 -0
  429. package/bundled/upstream/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  430. package/bundled/upstream/superpowers/skills/systematic-debugging/SKILL.md +1 -1
  431. package/bundled/upstream/superpowers/skills/test-driven-development/SKILL.md +1 -1
  432. package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +9 -22
  433. package/bundled/upstream/superpowers/skills/using-superpowers/SKILL.md +19 -15
  434. package/bundled/upstream/superpowers/skills/using-superpowers/references/antigravity-tools.md +96 -0
  435. package/bundled/upstream/superpowers/skills/using-superpowers/references/claude-code-tools.md +50 -0
  436. package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +25 -12
  437. package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +27 -20
  438. package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +44 -32
  439. package/bundled/upstream/superpowers/skills/using-superpowers/references/pi-tools.md +28 -0
  440. package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +22 -0
  441. package/bundled/upstream/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +1 -1
  442. package/bundled/upstream/superpowers/skills/writing-skills/SKILL.md +52 -18
  443. package/bundled/upstream/superpowers/skills/writing-skills/anthropic-best-practices.md +88 -88
  444. package/bundled/upstream/superpowers/skills/writing-skills/persuasion-principles.md +3 -3
  445. package/package.json +1 -1
  446. package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -25
  447. package/bundled/upstream/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
@@ -11,10 +11,12 @@ pip install anthropic
11
11
  ```python
12
12
  import anthropic
13
13
 
14
- # Default (uses ANTHROPIC_API_KEY env var)
14
+ # Default resolves credentials from the environment:
15
+ # ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN, or an `ant auth login` profile.
16
+ # Prefer this for local dev; don't hardcode a key.
15
17
  client = anthropic.Anthropic()
16
18
 
17
- # Explicit API key
19
+ # Explicit API key (only when you must inject a specific key)
18
20
  client = anthropic.Anthropic(api_key="your-api-key")
19
21
 
20
22
  # Async client
@@ -23,6 +25,67 @@ async_client = anthropic.AsyncAnthropic()
23
25
 
24
26
  ---
25
27
 
28
+ ## Client Configuration
29
+
30
+ ### Per-request overrides
31
+
32
+ Use `with_options()` to override client settings for a single call without mutating the client:
33
+
34
+ ```python
35
+ client.with_options(timeout=5.0, max_retries=5).messages.create(
36
+ model="claude-opus-4-8",
37
+ max_tokens=1024,
38
+ messages=[{"role": "user", "content": "Hello"}],
39
+ )
40
+ ```
41
+
42
+ ### Timeouts
43
+
44
+ Default request timeout is 10 minutes. Pass a float (seconds) or an `httpx.Timeout` for granular control. On timeout the SDK raises `anthropic.APITimeoutError` (and retries per `max_retries`).
45
+
46
+ ```python
47
+ import httpx
48
+
49
+ client = anthropic.Anthropic(timeout=20.0)
50
+ client = anthropic.Anthropic(
51
+ timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
52
+ )
53
+ ```
54
+
55
+ ### Retries
56
+
57
+ The SDK auto-retries connection errors, 408, 409, 429, and ≥500 with exponential backoff (default 2 retries). Set `max_retries` on the client or via `with_options()`; `max_retries=0` disables.
58
+
59
+ ### Async performance (aiohttp backend)
60
+
61
+ For high-concurrency async workloads, install `anthropic[aiohttp]` and pass `DefaultAioHttpClient` instead of the default httpx backend:
62
+
63
+ ```python
64
+ from anthropic import AsyncAnthropic, DefaultAioHttpClient
65
+
66
+ async with AsyncAnthropic(http_client=DefaultAioHttpClient()) as client:
67
+ ...
68
+ ```
69
+
70
+ ### Custom HTTP client (proxy, base URL)
71
+
72
+ Use `DefaultHttpxClient` / `DefaultAsyncHttpxClient` — not raw `httpx.Client` — so the SDK's default timeouts and connection limits are preserved:
73
+
74
+ ```python
75
+ from anthropic import Anthropic, DefaultHttpxClient
76
+
77
+ client = Anthropic(
78
+ base_url="http://my.test.server.example.com:8083", # or ANTHROPIC_BASE_URL env var
79
+ http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com"),
80
+ )
81
+ ```
82
+
83
+ ### Logging
84
+
85
+ Set `ANTHROPIC_LOG=debug` (or `info`) to enable SDK logging via the standard `logging` module.
86
+
87
+ ---
88
+
26
89
  ## Basic Message Request
27
90
 
28
91
  ```python
@@ -53,6 +116,23 @@ response = client.messages.create(
53
116
  )
54
117
  ```
55
118
 
119
+ ### Mid-conversation system messages (beta, model-gated)
120
+
121
+ For operator instructions that arrive mid-conversation (mode switches, injected state), append `{"role": "system", ...}` to `messages` instead of editing top-level `system` — this preserves the cached prefix and carries operator authority. Must follow a user message; cannot be `messages[0]`. Unsupported models return a 400 (`role 'system' is not supported on this model`). See `shared/prompt-caching.md` for when to use this vs. top-level `system`.
122
+
123
+ ```python
124
+ response = client.messages.create(
125
+ model=MODEL_ID, # must support mid-conversation system messages
126
+ max_tokens=16000,
127
+ system=[{"type": "text", "text": STABLE_SYSTEM, "cache_control": {"type": "ephemeral"}}],
128
+ messages=history + [
129
+ {"role": "user", "content": user_message},
130
+ {"role": "system", "content": "Terse mode enabled — keep responses under 40 words."},
131
+ ],
132
+ extra_headers={"anthropic-beta": "mid-conversation-system-2026-04-07"},
133
+ )
134
+ ```
135
+
56
136
  ---
57
137
 
58
138
  ## Vision (Images)
@@ -170,11 +250,11 @@ If `cache_read_input_tokens` is zero across repeated identical-prefix requests,
170
250
 
171
251
  ## Extended Thinking
172
252
 
173
- > **Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.8 and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
253
+ > **Fable 5, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Fable 5, Opus 4.8, and 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
174
254
  > **Older models:** Use `thinking: {type: "enabled", budget_tokens: N}` (must be < `max_tokens`, min 1024).
175
255
 
176
256
  ```python
177
- # Opus 4.8 / 4.7 / 4.6: adaptive thinking (recommended)
257
+ # Fable 5 / Opus 4.8 / 4.7 / 4.6: adaptive thinking (recommended)
178
258
  response = client.messages.create(
179
259
  model="claude-opus-4-8",
180
260
  max_tokens=16000,
@@ -222,6 +302,31 @@ except anthropic.APIConnectionError:
222
302
 
223
303
  ---
224
304
 
305
+ ## Response Helpers
306
+
307
+ Every response object exposes `_request_id` (populated from the `request-id` header) — log it when reporting failures to Anthropic. Despite the underscore prefix, this property is public.
308
+
309
+ ```python
310
+ message = client.messages.create(...)
311
+ print(message._request_id) # req_018EeWyXxfu5pfWkrYcMdjWG
312
+ print(message.to_json()) # serialize the Pydantic model
313
+ print(message.to_dict()) # plain dict
314
+ ```
315
+
316
+ To access raw headers or other response metadata, use `.with_raw_response`:
317
+
318
+ ```python
319
+ raw = client.messages.with_raw_response.create(
320
+ model="claude-opus-4-8",
321
+ max_tokens=1024,
322
+ messages=[{"role": "user", "content": "Hello"}],
323
+ )
324
+ print(raw.headers.get("request-id"))
325
+ message = raw.parse() # the Message object messages.create() would have returned
326
+ ```
327
+
328
+ ---
329
+
225
330
  ## Multi-Turn Conversations
226
331
 
227
332
  The API is stateless — send the full conversation history each time.
@@ -268,14 +373,15 @@ response2 = conversation.send("What's my name?") # Claude remembers "Alice"
268
373
 
269
374
  **Rules:**
270
375
 
271
- - Messages must alternate between `user` and `assistant`
376
+ - Consecutive same-role messages are allowed the API combines them into a single turn
272
377
  - First message must be `user`
378
+ - `role: "system"` messages are allowed mid-conversation under the `mid-conversation-system-2026-04-07` beta on supporting models — see § Mid-conversation system messages above
273
379
 
274
380
  ---
275
381
 
276
382
  ### Compaction (long conversations)
277
383
 
278
- > **Beta, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
384
+ > **Beta, Fable 5, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
279
385
 
280
386
  ```python
281
387
  import anthropic
@@ -320,7 +426,17 @@ The `stop_reason` field in the response indicates why the model stopped generati
320
426
  | `stop_sequence` | Hit a custom stop sequence |
321
427
  | `tool_use` | Claude wants to call a tool — execute it and continue |
322
428
  | `pause_turn` | Model paused and can be resumed (agentic flows) |
323
- | `refusal` | Claude refused for safety reasons — output may not match your schema |
429
+ | `refusal` | Claude refused for safety reasons — check `stop_details` |
430
+
431
+ ### Structured Stop Details
432
+
433
+ When `stop_reason` is `"refusal"`, the response includes a `stop_details` object with structured information about the refusal:
434
+
435
+ ```python
436
+ if response.stop_reason == "refusal" and response.stop_details:
437
+ print(f"Category: {response.stop_details.category}") # "cyber" | "bio" | None
438
+ print(f"Explanation: {response.stop_details.explanation}")
439
+ ```
324
440
 
325
441
  ---
326
442
 
@@ -100,6 +100,19 @@ print(f"Status: {cancelled.processing_status}") # "canceling"
100
100
 
101
101
  ---
102
102
 
103
+ ## List Batches (auto-pagination)
104
+
105
+ Iterating the return value of any `list()` call auto-paginates across all pages — do not index into `.data` if you want the full set:
106
+
107
+ ```python
108
+ for batch in client.messages.batches.list(limit=20):
109
+ print(batch.id, batch.processing_status)
110
+ ```
111
+
112
+ For manual control, use `first_page.has_next_page()` / `first_page.get_next_page()` / `first_page.next_page_info()`; `first_page.data` holds the current page's items and `first_page.last_id` is the cursor.
113
+
114
+ ---
115
+
103
116
  ## Batch with Prompt Caching
104
117
 
105
118
  ```python
@@ -16,14 +16,18 @@ The Files API uploads files for use in Messages API requests. Reference files vi
16
16
 
17
17
  ## Upload a File
18
18
 
19
+ The `file` argument accepts a `(filename, content, content_type)` tuple, a `pathlib.Path` (or any `PathLike` — read for you, async-safe with `AsyncAnthropic`), or an open binary file object.
20
+
19
21
  ```python
20
22
  import anthropic
23
+ from pathlib import Path
21
24
 
22
25
  client = anthropic.Anthropic()
23
26
 
24
27
  uploaded = client.beta.files.upload(
25
28
  file=("report.pdf", open("report.pdf", "rb"), "application/pdf"),
26
29
  )
30
+ # or: client.beta.files.upload(file=Path("report.pdf"))
27
31
  print(f"File ID: {uploaded.id}")
28
32
  print(f"Size: {uploaded.size_bytes} bytes")
29
33
  ```
@@ -87,9 +91,10 @@ response = client.beta.messages.create(
87
91
 
88
92
  ### List Files
89
93
 
94
+ Iterate the list result directly — the SDK auto-paginates across all pages. Only use `.data` if you want the first page only.
95
+
90
96
  ```python
91
- files = client.beta.files.list()
92
- for f in files.data:
97
+ for f in client.beta.files.list():
93
98
  print(f"{f.id}: {f.filename} ({f.size_bytes} bytes)")
94
99
  ```
95
100
 
@@ -24,13 +24,29 @@ async with async_client.messages.stream(
24
24
  print(text, end="", flush=True)
25
25
  ```
26
26
 
27
+ ### Low-level: `stream=True`
28
+
29
+ `messages.stream()` (above) is the recommended helper — it accumulates state and exposes `text_stream` / `get_final_message()`. If you only need the raw event iterator and want lower memory use, pass `stream=True` to `messages.create()` instead:
30
+
31
+ ```python
32
+ for event in client.messages.create(
33
+ model="claude-opus-4-8",
34
+ max_tokens=64000,
35
+ messages=[{"role": "user", "content": "Write a story"}],
36
+ stream=True,
37
+ ):
38
+ print(event.type)
39
+ ```
40
+
41
+ No final-message accumulation is done for you in this form.
42
+
27
43
  ---
28
44
 
29
45
  ## Handling Different Content Types
30
46
 
31
47
  Claude may return text, thinking blocks, or tool use. Handle each appropriately:
32
48
 
33
- > **Opus 4.8 / Opus 4.7 / Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
49
+ > **Fable 5 / Opus 4.8 / Opus 4.7 / Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
34
50
 
35
51
  ```python
36
52
  with client.messages.stream(
@@ -160,3 +176,4 @@ except anthropic.APIStatusError as e:
160
176
  3. **Track token usage** — The `message_delta` event contains usage information
161
177
  4. **Use timeouts** — Set appropriate timeouts for your application
162
178
  5. **Default to streaming** — Use `.get_final_message()` to get the complete response even when streaming, giving you timeout protection without needing to handle individual events
179
+ 6. **Large `max_tokens` without streaming raises `ValueError`** — The SDK refuses non-streaming requests it estimates will exceed ~10 minutes (idle connections drop). Pass `stream=True` / use `messages.stream()`, or explicitly override `timeout`, to suppress the guard.
@@ -15,10 +15,12 @@ pip install anthropic
15
15
  ```python
16
16
  import anthropic
17
17
 
18
- # Default (uses ANTHROPIC_API_KEY env var)
18
+ # Default resolves credentials from the environment:
19
+ # ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN, or an `ant auth login` profile.
20
+ # Prefer this for local dev; don't hardcode a key.
19
21
  client = anthropic.Anthropic()
20
22
 
21
- # Explicit API key
23
+ # Explicit API key (only when you must inject a specific key)
22
24
  client = anthropic.Anthropic(api_key="your-api-key")
23
25
  ```
24
26
 
@@ -129,7 +131,7 @@ client.beta.sessions.events.send(
129
131
  import json
130
132
 
131
133
  # Stream-first: open stream, then send while stream is live
132
- with client.beta.sessions.stream(
134
+ with client.beta.sessions.events.stream(
133
135
  session_id=session.id,
134
136
  ) as stream:
135
137
  client.beta.sessions.events.send(
@@ -140,7 +142,7 @@ with client.beta.sessions.stream(
140
142
  ... # process events
141
143
 
142
144
  # Standalone stream iteration:
143
- with client.beta.sessions.stream(
145
+ with client.beta.sessions.events.stream(
144
146
  session_id=session.id,
145
147
  ) as stream:
146
148
  for event in stream:
@@ -150,7 +152,7 @@ with client.beta.sessions.stream(
150
152
  print(block.text, end="", flush=True)
151
153
  elif event.type == "agent.custom_tool_use":
152
154
  # Custom tool invocation — session is now idle
153
- print(f"\nCustom tool call: {event.tool_name}")
155
+ print(f"\nCustom tool call: {event.name}")
154
156
  print(f"Input: {json.dumps(event.input)}")
155
157
  # Send result back (see below)
156
158
  elif event.type == "session.status_idle":
@@ -210,7 +212,7 @@ def run_custom_tool(tool_name: str, tool_input: dict) -> str:
210
212
  def run_session(client, session_id: str):
211
213
  """Stream events and handle custom tool calls."""
212
214
  while True:
213
- with client.beta.sessions.stream(
215
+ with client.beta.sessions.events.stream(
214
216
  session_id=session_id,
215
217
  ) as stream:
216
218
  tool_calls = []
@@ -232,7 +234,7 @@ def run_session(client, session_id: str):
232
234
  # Process custom tool calls
233
235
  results = []
234
236
  for call in tool_calls:
235
- result = run_custom_tool(call.tool_name, call.input)
237
+ result = run_custom_tool(call.name, call.input)
236
238
  results.append({
237
239
  "type": "user.custom_tool_result",
238
240
  "custom_tool_use_id": call.id,
@@ -111,3 +111,30 @@ message = client.messages.create(
111
111
  For 1-hour TTL: `cache_control: { type: "ephemeral", ttl: "1h" }`. There's also a top-level `cache_control:` on `messages.create` that auto-places on the last cacheable block.
112
112
 
113
113
  Verify hits via `message.usage.cache_creation_input_tokens` / `message.usage.cache_read_input_tokens`.
114
+
115
+ ---
116
+
117
+ ## Stop Details
118
+
119
+ When `stop_reason` is `:refusal`, the response includes structured `stop_details`:
120
+
121
+ ```ruby
122
+ if message.stop_reason == :refusal && message.stop_details
123
+ puts "Category: #{message.stop_details.category}" # :cyber, :bio, or nil
124
+ puts "Explanation: #{message.stop_details.explanation}"
125
+ end
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Error Type
131
+
132
+ `APIStatusError` exposes a `.type` field for programmatic error classification:
133
+
134
+ ```ruby
135
+ begin
136
+ client.messages.create(...)
137
+ rescue Anthropic::APIStatusError => e
138
+ puts e.type # :rate_limit_error, :overloaded_error, etc.
139
+ end
140
+ ```
@@ -90,7 +90,7 @@ Both patterns keep the fixed context small and load detail on demand.
90
90
 
91
91
  | Constraint (from `prompt-caching.md`) | Agent-specific workaround |
92
92
  | --- | --- |
93
- | Editing the system prompt mid-session invalidates the cache. | Append a `<system-reminder>` block in the `messages` array instead. The cached prefix stays intact. Claude Code uses this for time updates and mode transitions. |
93
+ | Editing the system prompt mid-session invalidates the cache. | Append a `{"role": "system", ...}` message to `messages[]` instead (beta, on supporting models — see `prompt-caching.md` § Mid-conversation system messages). The cached prefix stays intact, and the model treats it as an operator-authority instruction rather than user text. On models that don't support it, fall back to a `<system-reminder>` text block in the user turn. |
94
94
  | Switching models mid-session invalidates the cache. | Spawn a **subagent** with the cheaper model for the sub-task; keep the main loop on one model. Claude Code's Explore subagents use Haiku this way. |
95
95
  | Adding/removing tools mid-session invalidates the cache. | Use **tool search** for dynamic discovery — it appends tool schemas rather than swapping them, so the existing prefix is preserved. |
96
96
 
@@ -0,0 +1,246 @@
1
+ # Anthropic CLI (`ant`)
2
+
3
+ The `ant` CLI exposes every Claude API resource as a shell subcommand. Compared to `curl`: request bodies are built from typed flags or piped YAML instead of hand-written JSON, `@path` inlines file contents into any string field, `--transform` extracts fields with a GJSON path (no `jq`), list endpoints auto-paginate (cap total results with `--max-items N`; `--limit` only sets the server page size), and the `beta:` prefix auto-sets the right `anthropic-beta` header.
4
+
5
+ ## When to use the CLI vs the SDK
6
+
7
+ **CLI for the control plane, SDK for the data plane.** Agents and environments are relatively static resources you define, configure, and debug with `ant` — check the YAML into your repo, apply from CI, inspect from a terminal. Sessions are dynamic and driven by your application through the SDK — create per task, stream events, react to tool calls, integrate into your product. Both hit the same API; the split is about where the call lives, not what's possible.
8
+
9
+ | | Control plane → `ant` | Data plane → SDK |
10
+ |---|---|---|
11
+ | Resources | agents, environments, skills, vaults, files | sessions, events |
12
+ | Cadence | Once per deploy / ad-hoc | Every task / every turn |
13
+ | Lives in | `*.yaml` in your repo + CI + terminal | Application code |
14
+ | Typical calls | `create < agent.yaml`, `update --version N`, `list`, `retrieve`, `archive`, `--debug` | `sessions.create()`, `events.stream()`, `events.send()` |
15
+
16
+ ## Install and auth
17
+
18
+ ```sh
19
+ # macOS
20
+ brew install anthropics/tap/ant
21
+ xattr -d com.apple.quarantine "$(brew --prefix)/bin/ant"
22
+
23
+ # Linux / WSL — pick the release from github.com/anthropics/anthropic-cli/releases
24
+ curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${VERSION}/ant_${VERSION}_$(uname -s | tr A-Z a-z)_$(uname -m | sed -e s/x86_64/amd64/ -e s/aarch64/arm64/).tar.gz" \
25
+ | sudo tar -xz -C /usr/local/bin ant
26
+
27
+ # Or from source (Go 1.22+)
28
+ go install github.com/anthropics/anthropic-cli/cmd/ant@latest
29
+ ```
30
+
31
+ **Auth** — the CLI resolves credentials the same way the SDKs do (first match wins): explicit flags, then `ANTHROPIC_API_KEY`, then `ANTHROPIC_AUTH_TOKEN`, then the `ANTHROPIC_PROFILE`-selected or active profile, then Workload Identity Federation env vars, then the default profile on disk. Override the host with `ANTHROPIC_BASE_URL` or `--base-url`.
32
+
33
+ - **API key**: set `ANTHROPIC_API_KEY` in the environment.
34
+ - **OAuth profile** (no static key to manage): `ant auth login` opens a browser, exchanges for a short-lived token, and stores a profile under `$ANTHROPIC_CONFIG_DIR` (default `~/.config/anthropic/` on Linux/macOS, `%APPDATA%\Anthropic` on Windows — `configs/<profile>.json` for settings, `credentials/<profile>.json` for tokens). Subsequent `ant` (and SDK) calls pick it up automatically — a bare `Anthropic()` client works after login, but scripts that read `ANTHROPIC_API_KEY` directly do not. Claude Code and the Claude Agent SDK honor the same profile resolution. `ant auth status` shows which credential source and profile won (it reports status only — don't script against its exit code as a health check); `ant auth logout` clears the active profile (`--all` for every profile). On a remote host without a browser, `ant auth login --no-browser` prints the authorize URL and accepts the code back in the terminal.
35
+ - **Non-interactive workloads** (CI, servers, containers): interactive login is for development on your own machine — use Workload Identity Federation instead (see the authentication docs via `shared/live-sources.md`).
36
+
37
+ > **The #1 auth trap:** profiles are only consulted when no API key is set. A stale exported `ANTHROPIC_API_KEY` silently overrides every profile — requests hit whatever org/workspace that key is scoped to. `ant auth status` shows which source won; unset the key (or per-command: `env -u ANTHROPIC_API_KEY ant …`) before relying on a profile. Truly **unset** it — an empty `ANTHROPIC_API_KEY=""` still wins its precedence slot and authenticates with an empty key. The same shadowing applies in reverse to Claude Code: after `ant auth login`, Claude Code may warn about an auth conflict between the profile and its own `/login` credential — keep one (use the profile and `/logout` in Claude Code, or `ant auth logout` to keep Claude Code's own login).
38
+
39
+ **Named profiles** — an interactive-login token is bound to a single org+workspace, and the API only shows resources belonging to that workspace. If an agent, session, or file you created "disappears", the usual cause is a token scoped to a different workspace than the one that created it (`ant auth status` shows the active workspace). Multi-workspace work means one profile per workspace:
40
+
41
+ ```sh
42
+ ant auth login --profile <name> # creates the profile if it doesn't exist; org/workspace picker in browser
43
+ ant auth login --profile <name> --workspace-id wrkspc_01... # bind directly, skip the picker
44
+ ant profile activate <name> # switch the default profile
45
+ ant --profile <name> models list # one-off; equivalent: ANTHROPIC_PROFILE=<name> ant models list
46
+ ant profile list # inspect
47
+ ant profile set workspace_id wrkspc_01... --profile <name> # edit config keys (workspace_id, base_url, organization_id, …)
48
+ ```
49
+
50
+ `ant profile set` edits an existing profile's config — it never creates one, and it does **not** rebind already-issued credentials; run `ant auth login` again under that profile to mint a token for the new target. Pointing `ANTHROPIC_PROFILE` at a profile that doesn't exist is an error, not a fall-through. Refresh tokens eventually hard-expire (they don't slide with use) — when a previously working profile starts failing auth, re-run `ant auth login` before debugging anything else.
51
+
52
+ **Scopes** — a profile's OAuth scope set is requested at login (`--scope`) and persists on the profile (`scope` is also a `profile set` config key; like other config edits, changing it requires a fresh `ant auth login` to take effect). Privileged scopes — e.g. `org:admin` for organization-administration endpoints — are **not** in the default scope set: pass the full set you want explicitly (`ant auth login --profile admin --scope "... org:admin"`), and the server grants a privileged scope only if your role actually has it. Because the scope set rides on every token the profile mints, keep privileged work on a dedicated profile (`admin` vs `default`) and do day-to-day inference on the unprivileged one, switching with `--profile`/`ANTHROPIC_PROFILE`. Check `ant auth login --help` for the current scope list, and `ant auth status` to see what the active token carries.
53
+
54
+ To hand the active credential to a subprocess or raw-HTTP script:
55
+
56
+ ```sh
57
+ # Bare access token — for curl's Authorization header
58
+ curl https://api.anthropic.com/v1/messages \
59
+ -H "Authorization: Bearer $(ant auth print-credentials --access-token)" \
60
+ -H "anthropic-version: 2023-06-01" \
61
+ -H "anthropic-beta: oauth-2025-04-20" \
62
+ -H "content-type: application/json" \
63
+ -d '{"model": "claude-opus-4-8", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'
64
+
65
+ # .env format — sets ANTHROPIC_AUTH_TOKEN (and ANTHROPIC_BASE_URL if the profile has one).
66
+ # Output is bare KEY=value (no `export`), so use `set -a` to auto-export for child processes:
67
+ set -a; eval "$(ant auth print-credentials --env)"; set +a
68
+ python my_script.py # SDK picks up ANTHROPIC_AUTH_TOKEN
69
+ ```
70
+
71
+ OAuth tokens go on `Authorization: Bearer` (not `x-api-key:`) **plus the `anthropic-beta: oauth-2025-04-20` header** — converting a raw curl/httpx script from an API key is a header change, not a key swap. The beta header requirement is endpoint-dependent (some endpoints happen to work without it; `/v1/messages` does not) — always send it so requests don't break when you switch endpoints. The token is short-lived and not auto-refreshed when passed via env var, so re-run `print-credentials` before it expires for long-running scripts (`print-credentials` itself refreshes the token if needed). If both `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN` are set, the SDKs send both and the API rejects the request — unset `ANTHROPIC_API_KEY` before `eval`ing the `--env` output.
72
+
73
+ **Foot-gun:** `ant auth print-credentials` with **no flags** prints the entire credentials JSON, not the bare token — putting that in an `Authorization` header yields an empty response or HTTP/2 protocol error. Always use `--access-token` for headers (it always reads the named/active profile; a set `ANTHROPIC_API_KEY` doesn't override credential printing).
74
+
75
+ ## Command structure
76
+
77
+ ```
78
+ ant <resource>[:<subresource>] <action> [flags]
79
+ ```
80
+
81
+ Beta resources (agents, sessions, environments, deployments, skills, vaults, memory stores) live under `beta:` — the CLI auto-sends the right `anthropic-beta` header, so don't pass it yourself unless overriding with `--beta <header>`. For self-hosted environments, `ant beta:worker poll/run` and `ant beta:environments:work stats/stop` drive and monitor the work queue — see `shared/managed-agents-self-hosted-sandboxes.md`.
82
+
83
+ ```sh
84
+ ant models list
85
+ ant messages create --model claude-opus-4-8 --max-tokens 1024 --message '{role: user, content: "Hello"}'
86
+ ant beta:agents retrieve --agent-id agent_01...
87
+ ant beta:sessions:events list --session-id session_01...
88
+ ```
89
+
90
+ `ant --help` lists resources; append `--help` to any subcommand for its flags.
91
+
92
+ ## Global flags
93
+
94
+ | Flag | Purpose |
95
+ | --- | --- |
96
+ | `--format` | `auto` (default: pretty if TTY, compact if piped), `json`, `jsonl`, `yaml`, `pretty`, `raw`, `explore` (interactive TUI) |
97
+ | `--transform` | GJSON path applied to the response (per-item on list endpoints). Not applied when `--format raw`. |
98
+ | `-r`, `--raw-output` | If the transformed result is a string, print it without quotes (jq semantics). Pair with `--transform` for scalar capture. |
99
+ | `--max-items` | Cap total results returned from auto-paginating list endpoints (distinct from `--limit`, which is the server page size). |
100
+ | `--format-error` / `--transform-error` | Same as `--format`/`--transform`, applied to error responses. `-r` does not apply to the error path — use `--format-error yaml` for unquoted error scalars. |
101
+ | `--base-url` | Override API host |
102
+ | `--debug` | Print full HTTP request + response to stderr (API key redacted) |
103
+
104
+ ## Output — `--transform` + `--format`
105
+
106
+ `--transform` takes a [GJSON path](https://github.com/tidwall/gjson/blob/master/SYNTAX.md). On list endpoints it runs **per item**, not on the envelope.
107
+
108
+ ```sh
109
+ ant beta:agents list --transform '{id,name,model}' --format jsonl
110
+ ```
111
+
112
+ **Extract a scalar for shell use:** pair `--transform` with `-r` (`--raw-output` — prints strings unquoted, jq-style):
113
+
114
+ ```sh
115
+ AGENT_ID=$(ant beta:agents create --name "My Agent" --model '{id: claude-sonnet-4-6}' \
116
+ --transform id -r)
117
+ ```
118
+
119
+ ## Input — flags, stdin, `@file`
120
+
121
+ **Flags** — scalar fields map directly. Structured fields accept relaxed-YAML syntax (unquoted keys) or strict JSON. Repeatable flags build arrays (each `--tool`, `--event`, `--message` appends one element):
122
+
123
+ ```sh
124
+ ant beta:agents create \
125
+ --name "Research Agent" \
126
+ --model '{id: claude-opus-4-8}' \
127
+ --tool '{type: agent_toolset_20260401}' \
128
+ --tool '{type: custom, name: search_docs, input_schema: {type: object, properties: {query: {type: string}}}}'
129
+ ```
130
+
131
+ **Stdin** — pipe a full JSON or YAML body. Merged with flags; flags win on conflict (for array fields, any flag **replaces** the stdin array entirely — it does not append). Quote the heredoc delimiter (`<<'YAML'`) to disable shell expansion inside the body:
132
+
133
+ ```sh
134
+ ant beta:agents create <<'YAML'
135
+ name: Research Agent
136
+ model: claude-opus-4-8
137
+ system: |
138
+ You are a research assistant. Cite sources for every claim.
139
+ tools:
140
+ - type: agent_toolset_20260401
141
+ YAML
142
+ ```
143
+
144
+ **`@file` references** — inline a file's contents into any string-valued field. Inside structured flag values, quote the path. Binary files are auto-base64'd; force with `@file://` (text) or `@data://` (base64). Escape a literal leading `@` as `\@`.
145
+
146
+ ```sh
147
+ ant beta:agents create --name "Researcher" --model '{id: claude-sonnet-4-6}' --system @./prompts/researcher.txt
148
+
149
+ ant messages create --model claude-opus-4-8 --max-tokens 1024 \
150
+ --message '{role: user, content: [
151
+ {type: document, source: {type: base64, media_type: application/pdf, data: "@./scan.pdf"}},
152
+ {type: text, text: "Extract the text from this scanned document."}
153
+ ]}' \
154
+ --transform 'content.0.text' -r
155
+ ```
156
+
157
+ Flags that natively take a file path (e.g. `--file` on `beta:files upload`) accept a bare path without `@`.
158
+
159
+ ## Version-controlled Managed Agents resources
160
+
161
+ This is the recommended flow for defining agents and environments — check the YAML into your repo and sync via `create` (first time) / `update` (thereafter). See `shared/managed-agents-core.md` for the field reference.
162
+
163
+ ```yaml
164
+ # summarizer.agent.yaml
165
+ name: Summarizer
166
+ model: claude-sonnet-4-6
167
+ system: |
168
+ You are a helpful assistant that writes concise summaries.
169
+ tools:
170
+ - type: agent_toolset_20260401
171
+ ```
172
+
173
+ ```sh
174
+ # Create (once) — capture the ID
175
+ AGENT_ID=$(ant beta:agents create < summarizer.agent.yaml --transform id -r)
176
+
177
+ # Update (CI) — needs ID + current version (optimistic lock)
178
+ ant beta:agents update --agent-id "$AGENT_ID" --version 1 < summarizer.agent.yaml
179
+ ```
180
+
181
+ Same pattern for environments (`ant beta:environments create|update < env.yaml`), then start a session with both IDs:
182
+
183
+ ```sh
184
+ ant beta:sessions create --agent "$AGENT_ID" --environment-id "$ENV_ID" --title "Task"
185
+ ant beta:sessions:events send --session-id "$SID" \
186
+ --event '{type: user.message, content: [{type: text, text: "Summarize X"}]}'
187
+ ant beta:sessions:events list --session-id "$SID" --transform 'content.0.text' -r
188
+ ant beta:sessions:events stream --session-id "$SID" # live event stream
189
+ ```
190
+
191
+ ### Interactive session loop (stream-before-send)
192
+
193
+ `ant beta:sessions:events stream` only delivers events emitted *after* the stream opens — so open it **before** sending the kickoff to avoid missing early events. Use process substitution to hold the stream on a file descriptor, send, then read:
194
+
195
+ ```sh
196
+ exec {stream}< <(ant beta:sessions:events stream --session-id "$SID" \
197
+ --transform '{type,text:content.#(type=="text").text,err:error.message}' --format yaml)
198
+
199
+ ant beta:sessions:events send --session-id "$SID" > /dev/null <<'YAML'
200
+ events:
201
+ - type: user.message
202
+ content:
203
+ - type: text
204
+ text: Summarize the repo README
205
+ YAML
206
+
207
+ type=
208
+ while IFS= read -r -u "$stream" line; do
209
+ case "$line" in
210
+ type:\ session.status_idle) break ;;
211
+ type:\ session.error)
212
+ IFS= read -r -u "$stream" next || next=
213
+ case "$next" in err:\ *) msg=${next#err: } ;; *) msg=unknown ;; esac
214
+ printf '\n[Error: %s]\n' "$msg"; break ;;
215
+ type:\ *) type=${line#type: } ;;
216
+ text:*)
217
+ [[ $type == agent.message ]] || continue
218
+ val=${line#text: }
219
+ case "$val" in '|-'|'|') ;; *) printf '%s' "$val" ;; esac ;;
220
+ \ \ *)
221
+ if [[ $type == agent.message ]]; then printf '%s\n' "${line# }"; fi ;;
222
+ esac
223
+ done
224
+ exec {stream}<&-
225
+ ```
226
+
227
+ This works for interactive exploration and demos. For application code that needs to react to `agent.tool_use` / `agent.custom_tool_use` events, reconnect after drops, or dedup against `events.list`, use the SDK — see `shared/managed-agents-client-patterns.md`.
228
+
229
+ ## Scripting patterns
230
+
231
+ `--transform id -r` on a list endpoint emits one bare ID per line — compose with `xargs`, or use `--max-items N` to bound the result set without piping through `head`:
232
+
233
+ ```sh
234
+ FIRST=$(ant beta:agents list --transform id -r --max-items 1)
235
+ ant beta:agents:versions list --agent-id "$FIRST" --transform '{version,created_at}' --format jsonl
236
+ ```
237
+
238
+ Error shaping mirrors the success path (note: `-r` does not apply to error output — use `--format-error yaml` for an unquoted scalar here):
239
+
240
+ ```sh
241
+ ant beta:agents retrieve --agent-id bogus --transform-error error.message --format-error yaml 2>&1
242
+ ```
243
+
244
+ Shell completion: `ant @completion {zsh|bash|fish|powershell}`.
245
+
246
+ For the full, always-current reference (including per-endpoint flags), WebFetch the **Anthropic CLI** URL in `shared/live-sources.md`.