api-audit
Audits an existing REST API tab by live-testing every curl, Python SDK, and Go SDK code block, running the API style checker, applying the standalone tab test, and fixing broken code, missing operatio
SKILL.md.claude/skills/api-audit/SKILL.md
GitHubAudit and repair the <MethodSection id="api"> of an existing article. Edit only the API tab.
Portal tab rule: do not touch the Portal tab's content. Fix only its MDX syntax if needed. Read .agents/references/api-portal-tab-rule.md before editing.
Scope — read exactly these files
- This SKILL.md
- The article specified by the user
api-reference/services_documented/{product}_api.yaml.agents/references/api-live-testing.md.agents/references/api-tab-structures.md— structure rules to check the tab against.agents/references/api-tab-review.md.agents/references/sdk-best-practices.md.agents/references/ticket-and-branch.mdand.agents/references/product-routing.md.agents/references/mdx-rules.md,style-guide.md— prose and MethodSwitch rules
Inputs
| Input | Required | Notes |
|---|---|---|
| Path to the article | Yes | Must already contain <MethodSection id="api"> |
If the article has no API tab, stop and use the api-use-case skill.
Flow
- Read the existing API tab fully.
- Read the Portal tab fully to understand what it covers.
- Run the API checker and record the violations:
python .agents/tools/api_check_style.py {relative/path/to/article.mdx} - Live-test every curl, Python SDK, and Go SDK code block as described in
.agents/references/api-live-testing.md. Record which blocks fail and why. - Run the standalone tab test from
.agents/references/api-tab-review.md: mentally delete the Portal tab and list every topic the Portal tab covers that the API tab does not. - Create the Jira ticket and feature branch now if this task does not have one yet, following
.agents/references/ticket-and-branch.md. If it already has a branch, stay on it. Do not write onmain. In the ticket description include the article path, "Audit API tab", the failing blocks, and the missing operations. - Add missing operations using the templates in
api-tab-structures.md. Fix broken code. Fix checker violations in the API tab only. - Run the checker again. Exit code must be 0.
- Update
descriptiononly if the tab content changed significantly. Rules are in.agents/references/mdx-rules.md. - Show the diff to the user.
Output
Article: [path]
Blocks tested: [N] — failed before fix: [N]
Checker: exit code 0
Missing operations added: [list or none]
Ticket: DOC-XXXX
Branch: DOC-XXXX
Commit and push only when the user asks, as described in .agents/references/ticket-and-branch.md. Load the pr skill if the user also asked for a PR.