How this skill is triggered — by the user, by Claude, or both
Slash command
/mokata:apiWhen to use
Engage when an approach touches a route, handler, endpoint, or public interface, when the spec's `domains` constraint names `api`, or when a change alters a request/response shape, a signature, a status code, or any contract other code calls. Do NOT engage for a purely internal refactor that changes no caller-visible contract, or for UI-only or storage-only work with no interface surface.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **mokata Agent Skill.** This is mokata's `api` domain knowledge, attached to the pipeline so
mokata Agent Skill. This is mokata's
apidomain knowledge, attached to the pipeline so Claude engages it automatically when an approach touches an interface surface. It is NOT a parallel workflow: it enriches brainstorm/develop/review, feeds the instrument that already runs there (blast-radius), and records its decisions to memory + the audit ledger. mokata's non-negotiables still hold — durable writes are human-gated, and the gate it feeds is never silently skipped.
⛭ mokata api active — gate: a contract change is walked to its callers before it lands; the decision is recorded to memory + the ledger
An API is a contract, not just code that happens to be callable. The moment another module, service, or client depends on a shape you exposed — a route, a signature, a status code, a field, an ordering, an error — that shape is a promise. This skill makes mokata treat interface work as contract work: classify the domain from the graph surface, walk the blast-radius to every caller before a change lands, and record the contract decision so the next change can see it.
Design the contract before you build behind it. Name the operation, its inputs, its outputs, its error cases, and its invariants FIRST — then implement to that contract. A contract stated up front is reviewable, testable, and mockable independently of the code behind it; a contract that emerges from implementation is whatever the code happened to do, which nobody agreed to. When a contract is written as an artifact (an OpenAPI document, a typed interface, a schema), that artifact is the source of truth both sides build against — see the OpenAPI Specification (https://spec.openapis.org/oas/latest.html) as one primary, machine-readable contract format. The precise conformance guarantees of any given tooling are UNVERIFIED here — confirm against the spec version in use before relying on generated-code behaviour.
With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviours of your system will be depended on by somebody. (Hyrum's Law, https://www.hyrumslaw.com/)
The practical consequence for mokata: the documented contract is a lower bound on what you have actually promised. Incidental behaviours — an error message string, the order of a list you never promised to sort, a timing, a default that filled an omitted field, an undocumented status code — become de-facto contract once callers rely on them. So a "safe" change is not one that keeps the documented contract; it is one whose blast-radius shows no caller relies on the observable behaviour you are altering. This is exactly why this skill's governed edge is blast-radius on callers, not a documentation diff.
For HTTP interfaces, the method and status-code semantics are standardized in RFC 9110 (HTTP Semantics, https://www.rfc-editor.org/rfc/rfc9110) — build to them rather than inventing local conventions:
Distinguish a backward-compatible change (callers keep working: a new optional field, a new endpoint, a new accepted input) from a breaking one (a caller can observe the difference: a removed/renamed field, a narrowed type, a changed status code, a new required input, a changed default). Semantic Versioning (https://semver.org/) encodes exactly this distinction — a breaking change to a public contract is a MAJOR bump; compatible additions are MINOR. Prefer extend, then deprecate over break: add the new shape, migrate callers, then remove the old one through the deprecation domain's blast-radius-on-removal path — never break a caller you did not walk to.
api in the spec's domains, so the contract concern is a first-class,
human-approved constraint, not a footnote.mokata query callers <symbol> /
blast_radius <symbol> and design the change against the REAL callers found, not assumed ones.decision through the human gate and written to the audit ledger, so it is walkable
later (P7). Record it with mokata's domain-decision path — never as loose prose.This skill feeds blast-radius (an SK.S1/S2 instrument, not a hard gate): a contract/shared-symbol change is walked to its callers before it lands. It is advisory — it informs the change, it does not block it — but the durable write recording the contract decision is human-gated (write-gate), and any behaviour change to an approved spec still routes through the deviation gate.
Decide from the code and the standard, not from assumption. Before asserting a method is idempotent,
a field optional, a status code unused, or a caller absent, VERIFY it: read the handler, run the
structural queries (callers / callees / blast_radius), and for HTTP/protocol behaviour read the
cited RFC for the version in use and CITE the URL. Prefer the primary source (the RFC, the OpenAPI
document, the standard) over memory or a blog. Flag anything you could not verify as UNVERIFIED
rather than stating it as fact.
| Excuse | Reality |
|---|---|
| "It's a small field rename — callers will adapt." | A rename is a breaking change; walk the blast-radius first — Hyrum's Law says someone already depends on the old name. |
| "The docs don't promise this behaviour, so I can change it." | Observable ≠ documented. If callers can see it, they may depend on it; the blast-radius, not the doc, decides if it's safe. |
| "I'll design the contract as I code." | Contract-first: state inputs/outputs/errors/invariants BEFORE implementing, or you ship whatever the code happened to do. |
| "Changing the status code is just a tweak." | Clients branch on status codes (RFC 9110 §15) — a code change is a contract change even with an identical body. |
Evidence, not "seems right" — check every box or say which is unmet and why:
api domain in the spec (or amended in when reached late)callers / blast_radius)references/api-contracts.md — the RFCs, Hyrum's Law, semantic versioning, and contract-first evolution in full, each with its primary-source URLCAN
decision to memory + the ledger (human-gated)MUST NOT
DEPENDS ON
api domain (classified at brainstorm; amend-in if reached late) (advisory)Grounding:
(gate: …)boundaries are enforced by that gate in code;(advisory)ones are protocol discipline this skill follows, not a hard block.
npx claudepluginhub jasgujral/mokata-ossGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.