Web APIs
When to use
Use this skill for web apis when you need to design versioned endpoints with predictable contracts. The expected result is an API specification or implementation with examples.
Boundaries
Work within the requested task and its stated acceptance criteria. Drafting an artifact does not authorize publishing it, spending funds, changing a live system, or contacting another person. Identify any such action separately before taking it.
Inputs
Inspect the repository, browser targets, user flow, route contract, and accessibility needs. Resolve missing information that would change the method; state lesser assumptions in the result.
Method
- Diagnose. Trace a user action through route, component state, request, response, and rendered result. Mark authentication and cache boundaries.
- Decide. Choose a small, testable implementation that covers loading, empty, error, and success states.
- Produce. Build an API specification or implementation with examples from the inspected material; keep assumptions distinguishable from observed facts.
Decision rules
- Implement normal, loading, empty, error, and retry states. Preserve semantics and keyboard operation before visual polish.
- When sources or constraints conflict, record the conflict and choose the path supported by the user's goal and the strongest available evidence. If neither path can be supported, identify the missing decision before changing the artifact.
Domain rules
- Keep markup semantic, interactions keyboard accessible, and client boundaries deliberate.
- Check network errors, caching, and input validation where the interface crosses an API.
Verification
Check authentication, errors, pagination, and compatibility. Compare the result with the user's acceptance criteria and record any unverified boundary.
Show changed routes and components, contract examples, responsive checks, and one browser-level failure test.
Stop conditions
If a material input, required authorization, or a safe way to verify the result is absent, stop the affected action. Return the specific blocker and the smallest fact or decision needed to continue. Do not report an unrun check as passed.
Output
Provide an API specification or implementation with examples. Include the decisive evidence and actual verification result. Name any artifact location and unresolved issue that affects its use.