STOP - Read before ANY tool call
- Read
{{GUARDRAILS_PATH}}
- Read
{{TOOLKIT_ROOT}}/skills/_shared/sdd-artifacts/SESSION.md; load session-state for $Cwd
- If the relevant gate is not approved: STOP - ask user (pt-BR) - do NOT Write/Shell
- SDD/develop skills: after ONE step/task, STOP session - handoff only
- This skill body is English; user-facing prompts may be (pt-BR)
Step -1 - Gate check (report in chat before continuing)
Gate check:
[ ] guardrails.mdc read
[ ] SESSION.md read; session-state loaded
[ ] PIPELINE.md read (SDD skills only)
[ ] User confirmed current action (sim)
-> If any unchecked: STOP
Skill: api-standards
Trigger
Invoke when the user requests: /api-standards, api standards, REST conventions, or asks for agnostic HTTP/API design guidance (not typed client generation).
Arguments (optional):
| Input |
Meaning |
| Focus area |
rest | versioning | errors | naming | security — load only that playbook |
| Artifact path |
Existing OpenAPI / route map / controller folder to review against standards |
Outcome
Agnostic API design guidance applied to the current workspace or design discussion:
- Clear HTTP/REST shape recommendations (methods, status codes, resource URLs).
- Versioning, error envelope, pagination, and naming conventions without vendor or company branding.
- Security hygiene checklist that never embeds live secrets or proprietary contracts.
- Handoff to
api-integrate when the user needs OpenAPI → typed clients (out of scope here).
Lazy-load (only when needed)
| When |
Path (after scripts/sync-cursor.ps1) |
| Command playbook (step discovery after gates) |
{{TOOLKIT_ROOT}}/skills/api-standards/references/command.md |
| Caveman Mode (if active) |
{{TOOLKIT_ROOT}}/skills/_shared/caveman/CAVEMAN.md - Full cap |
| Selective retrieval |
{{TOOLKIT_ROOT}}/skills/_shared/sdd-artifacts/SELECTIVE-RETRIEVAL.md |
| Reference index (routing only) |
{{TOOLKIT_ROOT}}/skills/api-standards/reference.md |
| Process step detail (lazy) |
{{TOOLKIT_ROOT}}/skills/api-standards/references/<section>.md |
Never by default: do not preload all references/*.md, full OpenAPI dumps, memory-bank/, or PRD bodies. Do not load api-integrate playbooks unless handing off client generation. Load one references/<section>.md per Process step (SKILL-REFERENCE-RETRIEVAL.md).
Reference routing
| Situation |
Path |
| Step discovery after gates |
references/command.md |
| REST / HTTP shape |
references/rest-http.md |
| Versioning |
references/versioning.md |
| Errors and pagination |
references/errors-pagination.md |
| Naming and resource contracts |
references/naming-contracts.md |
| Security (agnostic) |
references/security-agnostic.md |
| Must not (full) |
references/must-not.md |
Process
After gates: Read references/command.md for ordered step discovery. Then load one references/<section>.md per step — not full reference.md.
Step -1b - Caveman Mode (Full cap)
- Read
{{SDD_ROOT}}/preferences.json (create { "caveman_mode": false, "caveman_level": "full" } if missing).
- If
caveman_mode is false: continue without compression.
- If true: load
{{TOOLKIT_ROOT}}/skills/_shared/caveman/CAVEMAN.md; apply Full participation cap + prefs caveman_level (Lite skills never escalate); show once: [Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.
- Honor
caveman on|off|status|lite|full|ultra (and stop caveman / normal mode) during the session.
- Auto-Clarity + never-compress gates/drafts/paths per
CAVEMAN.md.
-1. Re-check guardrails and session
Confirm guardrails.mdc and SESSION.md are loaded. If missing, ask (pt-BR) before continuing.
0. Scope and focus
- Confirm the ask is standards / design review, not typed client generation (that is
api-integrate).
- If the user named a focus area, load only that playbook; otherwise ask once which areas matter (max three).
- Apply selective retrieval (
SR-NO-FULL-DUMP): paths + short excerpts only.
1. Inspect current surface (optional)
- If an artifact path exists, skim routes / OpenAPI / controllers for gaps vs loaded standards.
- Do not rewrite large APIs in one pass — prefer a short gap list with severity.
2. Apply standards
- Load the matching
references/*.md section(s) one at a time.
- Produce agnostic recommendations (English identifiers; chat language for prose).
- Never invent company-specific product names, internal contract ids, or branded error codes.
3. Report and handoff
- Summarize recommendations and open questions.
- For OpenAPI → clients/DTOs: hand off to
api-integrate.
- Offer
/commit only if files were changed in the consumer repo.
Must not
- Embed company, vendor, or product-specific API contracts, naming schemes, or branding.
- Generate typed API clients / DTOs (use
api-integrate).
- Hardcode credentials, tokens, base URLs with secrets, or unretracted
.env values.
- Dump entire
memory-bank/ or paste full PRD/OpenAPI into the session (SELECTIVE-RETRIEVAL.md).
- Pretend this skill replaces stack
*-developer implementation work.
Handoff
api-integrate - <openapi-or-schema-path>
Or continue with the stack skill for implementation after standards are agreed.
1---2name: api-standards3description: Apply agnostic HTTP/API design standards (REST shape, versioning, errors, naming) without company contracts. Use when designing or reviewing APIs or invoking /api-standards.4---567## STOP - Read before ANY tool call891. Read `{{GUARDRAILS_PATH}}`102. Read `{{TOOLKIT_ROOT}}/skills/_shared/sdd-artifacts/SESSION.md`; load session-state for `$Cwd`113. If the relevant gate is not approved: **STOP** - ask user **(pt-BR)** - do **NOT** Write/Shell124. SDD/develop skills: after **ONE** step/task, **STOP** session - handoff only135. This skill body is **English**; user-facing prompts may be **(pt-BR)**1415### Step -1 - Gate check (report in chat before continuing)1617```18Gate check:19[ ] guardrails.mdc read20[ ] SESSION.md read; session-state loaded21[ ] PIPELINE.md read (SDD skills only)22[ ] User confirmed current action (sim)23-> If any unchecked: STOP24```2526---2728# Skill: api-standards2930## Trigger3132Invoke when the user requests: `/api-standards`, `api standards`, `REST conventions`, or asks for agnostic HTTP/API design guidance (not typed client generation).3334**Arguments (optional):**3536| Input | Meaning |37|-------|---------|38| Focus area | `rest` \| `versioning` \| `errors` \| `naming` \| `security` — load only that playbook |39| Artifact path | Existing OpenAPI / route map / controller folder to review against standards |4041## Outcome4243Agnostic API design guidance applied to the current workspace or design discussion:44451. Clear HTTP/REST shape recommendations (methods, status codes, resource URLs).462. Versioning, error envelope, pagination, and naming conventions without vendor or company branding.473. Security hygiene checklist that never embeds live secrets or proprietary contracts.484. Handoff to `api-integrate` when the user needs OpenAPI → typed clients (out of scope here).4950## Lazy-load (only when needed)5152| When | Path (after `scripts/sync-cursor.ps1`) |53|------|----------------------------------------|54| Command playbook (step discovery after gates) | `{{TOOLKIT_ROOT}}/skills/api-standards/references/command.md` |55| Caveman Mode (if active) | `{{TOOLKIT_ROOT}}/skills/_shared/caveman/CAVEMAN.md` - **Full cap** |56| Selective retrieval | `{{TOOLKIT_ROOT}}/skills/_shared/sdd-artifacts/SELECTIVE-RETRIEVAL.md` |57| Reference index (routing only) | `{{TOOLKIT_ROOT}}/skills/api-standards/reference.md` |58| Process step detail (lazy) | `{{TOOLKIT_ROOT}}/skills/api-standards/references/<section>.md` |5960**Never by default:** do not preload all `references/*.md`, full OpenAPI dumps, `memory-bank/`, or PRD bodies. Do not load `api-integrate` playbooks unless handing off client generation. Load **one** `references/<section>.md` per Process step (`SKILL-REFERENCE-RETRIEVAL.md`).6162## Reference routing6364| Situation | Path |65|-----------|------|66| Step discovery after gates | `references/command.md` |67| REST / HTTP shape | `references/rest-http.md` |68| Versioning | `references/versioning.md` |69| Errors and pagination | `references/errors-pagination.md` |70| Naming and resource contracts | `references/naming-contracts.md` |71| Security (agnostic) | `references/security-agnostic.md` |72| Must not (full) | `references/must-not.md` |7374## Process7576After gates: **Read `references/command.md`** for ordered step discovery. Then load **one** `references/<section>.md` per step — **not** full `reference.md`.7778### Step -1b - Caveman Mode (Full cap)791. Read `{{SDD_ROOT}}/preferences.json` (create `{ "caveman_mode": false, "caveman_level": "full" }` if missing).802. If `caveman_mode` is false: continue without compression.813. If true: load `{{TOOLKIT_ROOT}}/skills/_shared/caveman/CAVEMAN.md`; apply **Full** participation cap + prefs `caveman_level` (Lite skills never escalate); show once: `[Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.`824. Honor `caveman on|off|status|lite|full|ultra` (and `stop caveman` / `normal mode`) during the session.835. Auto-Clarity + never-compress gates/drafts/paths per `CAVEMAN.md`.8485### -1. Re-check guardrails and session8687Confirm `guardrails.mdc` and `SESSION.md` are loaded. If missing, ask **(pt-BR)** before continuing.8889### 0. Scope and focus9091* Confirm the ask is **standards / design review**, not typed client generation (that is `api-integrate`).92* If the user named a focus area, load only that playbook; otherwise ask once which areas matter (max three).93* Apply selective retrieval (`SR-NO-FULL-DUMP`): paths + short excerpts only.9495### 1. Inspect current surface (optional)9697* If an artifact path exists, skim routes / OpenAPI / controllers for gaps vs loaded standards.98* Do not rewrite large APIs in one pass — prefer a short gap list with severity.99100### 2. Apply standards101102* Load the matching `references/*.md` section(s) one at a time.103* Produce agnostic recommendations (English identifiers; chat language for prose).104* Never invent company-specific product names, internal contract ids, or branded error codes.105106### 3. Report and handoff107108* Summarize recommendations and open questions.109* For OpenAPI → clients/DTOs: hand off to `api-integrate`.110* Offer `/commit` only if files were changed in the consumer repo.111112## Must not113114* Embed company, vendor, or product-specific API contracts, naming schemes, or branding.115* Generate typed API clients / DTOs (use `api-integrate`).116* Hardcode credentials, tokens, base URLs with secrets, or unretracted `.env` values.117* Dump entire `memory-bank/` or paste full PRD/OpenAPI into the session (`SELECTIVE-RETRIEVAL.md`).118* Pretend this skill replaces stack `*-developer` implementation work.119120## Handoff121122```123api-integrate - <openapi-or-schema-path>124```125126Or continue with the stack skill for implementation after standards are agreed.