---
name: carbon-api
description: Run focused CARBON API testing and generate a branded api report. Use when the user asks to check REST, GraphQL, RPC, webhook, or other API contracts, auth, inputs, outputs, errors, versions, consumers, or performance against a feature, flow, page, app, API, screenshot, source tree, or current project.
user-invocable: false
---

# CARBON API

Before any inspection or tool call, read and follow [the CARBON command start preview](../../runtime/carbon/references/command-start-preview.md). Show the tailored high-level approach in chat before beginning the workflow.

Use CARBON's shared runtime playbook; do not recreate a generic checklist in chat.

1. Call `carbon_set_preferences` without arguments and apply its safe execution context.
2. Follow `../../runtime/carbon/references/workspace-onboarding.md` for project-scoped work.
3. Identify the exact target and feature cut line from the request and current artifacts.
4. Call `carbon_get_testing_domains` with `domains=["api"]` and the exact scope. Apply every returned check family that is relevant, every safely available evidence channel, the named specialist perspectives, and the domain safety boundary.
5. Inspect source, requirements, existing tests, runtime configuration, contracts, regexes, validation, branches, error paths, feature flags, data constraints, and recent changes. Turn those signals into positive, negative, boundary, destructive-candidate, security, performance, recovery, and happy-path cases only where relevant.
6. Prepare CARBON Focused mode with `../../bin/carbon-runtime framework prepare`. Before execution, call `carbon_open_execution_plan`, open its live page beside chat using `codexBrowserUrl` and `codexChatLink` in Codex or the embedded artifact and `claudeChatLink` in Claude, and keep destructive, paid, public, privilege, privacy-sensitive, or notification actions gated.
7. Execute locally through negotiated CARBON adapters when a safe target is reachable. Use live black-box behavior and source-aware inspection together. Preserve planned, observed, inferred, blocked, skipped, unsupported, and not-tested states.
8. Capture the richest relevant evidence without inventing unavailable channels. Reproduce failures, cluster likely duplicates, and distinguish product defects from environment or automation failures.
9. Publish with `carbon_publish_command_report`, passing `testingDomains=["api"]`, the returned `specialistIds`, domain findings, evidence, residual uncertainty, and contextual next commands.

Follow [command result reporting](../../runtime/carbon/references/command-result-reporting.md). In the closing chat, show the relevant bundled grayscale specialist images from returned `chatMarkdown` when supported, with first name, role, and short bio. Otherwise show the same text without emoji or substitute avatars. In Claude, end with the absolute in-workspace **Open the CARBON report** link; use the returned host-specific link elsewhere.
