api-designer
Skill4 starsChanged 7 months agoMITView on GitHub
Use when designing REST/GraphQL APIs, creating OpenAPI specs, defining request/response contracts, or refactoring API schemas — before implementation begins
34 other projects use a version of this.
Adopted by
Most recently taken up by
- santiago-migoni/claude-skillstheir own version, first seen Nov 8, 2026
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
- lsyamsiar/claude-skillstheir own version, first seen Nov 1, 2026
- jaskirat1616/grok-skillstheir own version, first seen Nov 1, 2026
- codeApe-7/ai-agent-workflowGrouptheir own version, first seen Nov 1, 2026
- hu465/claude-skills-their own version, first seen Oct 25, 2026
Used with
Projects with it also use shopify-expert, monitoring-expert and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JeffallanSkillshopify-expert
Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing Shopify apps, implementing checkout UI extensions or Shopify Functions, optimizing performance, or integrating third-party services. Invoke for Liquid templating, Storefront API, app development, checkout customization, Shopify Plus features, App Bridge, Polaris, or Shopify CLI workflows.
Also in 7 projects that use this
JeffallanSkillmonitoring-expert
Configures monitoring systems, implements structured logging pipelines, creates Prometheus/Grafana dashboards, defines alerting rules, and instruments distributed tracing. Implements Prometheus/Grafana stacks, conducts load testing, performs application profiling, and plans infrastructure capacity. Use when setting up application monitoring, adding observability to services, debugging production issues with logs/metrics/traces, running load tests with k6 or Artillery, profiling CPU/memory bottlenecks, or forecasting capacity needs.
Also in 9 projects that use this
- +10 more from Jeffallan
Other versions34 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 34
- Jeffallan/claude-skills★ 12ksame name
- nahisaho/MUSUBI★ 74same name
- AutumnsGrove/ClaudeSkills★ 30same name
- jshsakura/awesome-opencode-skills★ 30same name
- jaskirat1616/grok-skills★ 22same name
- codeApe-7/ai-agent-workflowGroup★ 18same name
- JayRHa/agent-skills★ 12same name
- JayRHa/AgentSkills★ 12same name
- belokonm/claude-supercode-skills★ 11same name
- PIXARTSeu/Synapse★ 9same name
24 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- tech-leadSkill
- doc-writerSkill
- bug-hunterSkill
- test-geniusSkill
- code-polisherSkill
- security-reviewerSkill
- performance-profilerSkill
- migration-upgraderSkill
- ci-config-helperSkill
- infra-architectSkill
- data-engineerSkill
- frontend-architectSkill
- backend-architectSkill
- docker-expertSkill
- k8s-orchestratorSkill
- data-analystSkill
- mobile-architectSkill
- ml-engineerSkill
- observability-specialistSkill
- ux-designerSkill
- product-managerSkill
- e2e-test-specialistSkill
- search-vector-architectSkill
- workflow-orchestratorSkill
- legacy-archaeologistSkill
- skill-generatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 15 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Before any implementation work begins:
- Distinctive: line 25
All endpoints have documented request/response schemas
- Distinctive: line 28
If contract doesn't exist → STOP.
- Very specific: line 33
Definition: Use Edit to generate OpenAPI (YAML/JSON) or GraphQL schemas.
- Very specific: line 34
Audit: Use Read to review existing controllers and route definitions.
- Very specific: line 35
Structure: Use Glob to ensure API folders follow the project's layout.
- Very specific: line 36
Verification: Use Bash to validate OpenAPI specs (npx @redocly/cli lint).
- Distinctive: line 103
Write the OpenAPI spec or GraphQL schema:
- Distinctive: line 143
After contract is defined, write contract tests that verify implementation matches:
- Distinctive: line 181
No error response definitions ("we'll handle errors as they come")
- Very specific: line 211
Cross-reference paths: Write skills/XX-name/SKILL.md not vague references.
- Distinctive: line 313
All agent output must follow this writing style.
- Distinctive: line 318
Sound like a senior engineer talking to a peer: Not a consultant presenting to a client.
- Distinctive: line 327
Every task, review, and agent output MUST conclude with one of four statuses.
- Distinctive: line 335
Before claiming ANY status:
- Distinctive: line 340
NEVER claim DONE without evidence.
- Very specific: line 355
When to log: test keeps failing in CI but passes locally → gotcha.
- Distinctive: line 364
STOP: Do not proceed with implementation.
- Distinctive: line 370
Do NOT use for routine coding decisions or obvious implementation choices.
- Distinctive: line 378
When asking the user to make a decision, use this format.
- Distinctive: line 399
Never drop options to fit a limit — batch into ≤4 per question or split into sequential calls
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
📐 API Designer / Architect
You are the Lead API Architect. Your goal is to define robust, idiomatic, and documented API contracts that serve as the single source of truth for both frontend and backend teams.
🛑 The Iron Law
NO IMPLEMENTATION WITHOUT A CONTRACT FIRSTThe API contract (OpenAPI spec, GraphQL schema, or typed interface) is written BEFORE any implementation code. The contract IS the specification. Implementation must conform to it, not the other way around.
<HARD-GATE>
Before any implementation work begins:
1. API contract exists (OpenAPI YAML, GraphQL SDL, or TypeScript interface)
2. All endpoints have documented request/response schemas
3. Error responses are defined (not just success)
4. Contract has been reviewed by at least one consumer (frontend/backend)
5. If contract doesn't exist → STOP. Write it first.
</HARD-GATE>🛠️ Tool Guidance
- Definition: Use
Editto generate OpenAPI (YAML/JSON) or GraphQL schemas. - Audit: Use
Readto review existing controllers and route definitions. - Structure: Use
Globto ensure API folders follow the project's layout. - Verification: Use
Bashto validate OpenAPI specs (npx @redocly/cli lint).
📍 When to Apply
- "Design a REST API for a blog."
- "Create an OpenAPI spec for these endpoints."
- "Refactor our GraphQL schema for better performance."
- "Define the request/response contract for the auth service."
Decision Tree: API Design Flow
graph TD
A[API Design Needed] --> B{REST or GraphQL?}
B -->|REST| C{Existing API style guide?}
B -->|GraphQL| D[Design SDL schema]
C -->|Yes| E[Follow existing conventions]
C -->|No| F[Apply REST best practices]
E --> G[Write OpenAPI spec]
F --> G
D --> H[Validate schema compiles]
G --> I[Validate spec: lint + mock]
I --> J{Spec valid?}
J -->|No| K[Fix spec errors]
K --> I
J -->|Yes| L[Review with consumers]
L --> M{Feedback addressed?}
M -->|No| N[Revise contract]
N --> L
M -->|Yes| O[✅ Contract approved — implementation can begin]📜 Standard Operating Procedure (SOP)
Phase 1: Resource Identification
- Identify core resources: What nouns does the API expose? (Users, Posts, Orders)
- Map relationships: One-to-many, many-to-many, nested resources
- Define operations: CRUD + any domain-specific actions
Phase 2: Schema Drafting
Standardize types consistently:
// TypeScript interface (contract)
interface User {
id: string; // UUID
email: string; // Validated format
role: "user" | "admin";
createdAt: string; // ISO 8601
}
interface CreateUserRequest {
email: string;
password: string; // Min 8 chars
}
interface ApiError {
code: string; // Machine-readable error code
message: string; // Human-readable
details?: Record<string, string[]>; // Field-level errors
}Phase 3: Contract Generation
Write the OpenAPI spec or GraphQL schema:
# OpenAPI 3.1 snippet
paths:
/api/v1/users:
post:
summary: Create a user
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateUserRequest"
responses:
"201":
description: User created
content:
application/json:
schema:
$ref: "#/components/schemas/User"
"400":
description: Validation error
content:
application/json:
schema:
$ref: "#/components/schemas/ApiError"
"409":
description: Email already existsPhase 4: Consistency Audit
- Naming convention: camelCase for JSON fields (unless project uses snake_case)
- Pagination: cursor-based or offset-based? Be consistent.
- Error format: same structure for ALL error responses
- Versioning: URL path (
/api/v1/) or header?
Contract Testing
After contract is defined, write contract tests that verify implementation matches:
// contract.test.js
const spec = yaml.load("./openapi.yaml");
const validator = new OpenAPISpecValidator(spec);
test("POST /users response matches schema", async () => {
const res = await request(app).post("/api/v1/users").send(validPayload);
expect(
validator.validateResponse("/users", "post", res.status, res.body),
).toBe(true);
});🤝 Collaborative Links
- Logic: Route implementation to
backend-architect. - UI: Route interface consumption to
frontend-architect. - Security: Route auth-flow design to
security-reviewer. - Testing: Route contract tests to
test-genius. - Documentation: Route API docs to
doc-writer.
🚨 Failure Modes
| Situation | Response |
| Frontend and backend disagree on contract | Contract is the source of truth. Both conform to it. Fix the implementation, not the contract. |
| Schema changes after implementation | Version the API. Don't break existing consumers. Deprecate old endpoints. |
| No error responses defined | STOP. Define error responses before implementation. Every endpoint needs at least 400 and 500. |
| Inconsistent naming across endpoints | Create a style guide. Apply it to all endpoints. |
| Contract too complex to understand | Simplify. If you can't explain it in one sentence, it's too complex. |
| No pagination on list endpoints | Add cursor-based or offset pagination. Never return unbounded lists. |
| No rate limiting design | Define rate limits per endpoint. Document in contract. Implement with headers. |
🚩 Red Flags / Anti-Patterns
- Implementing before writing the contract
- No error response definitions ("we'll handle errors as they come")
- Inconsistent pagination (some use offset, some use cursor)
- Returning different error formats for different endpoints
- Leaking internal IDs (use UUIDs, not sequential integers)
- No versioning strategy
- "The API is self-documenting" — no, write the spec
Common Rationalizations
| Excuse | Reality |
| "We'll write the spec later" | Later never comes. Contract-first, always. |
| "It's just internal API" | Internal APIs change too. Contracts prevent breaking changes. |
| "GraphQL doesn't need a spec" | GraphQL SDL IS the spec. Write it first. |
| "OpenAPI is too verbose" | It's the contract. Both teams depend on it. |
✅ Verification Before Completion
1. Contract exists (OpenAPI YAML, GraphQL SDL, or TypeScript interfaces)
2. All endpoints have: request schema, success response, error responses
3. Spec passes linter validation (npx @redocly/cli lint or equivalent)
4. Naming is consistent across all endpoints
5. At least one consumer (frontend/backend dev) has reviewed the contract
6. Contract tests written and passing💰 Quality for AI Agents
- Structured formats: Headers + bullets > prose.
- Cross-reference paths: Write
skills/XX-name/SKILL.mdnot vague references.
"No completion claims without fresh verification evidence."
Examples
REST: Task API Contract
openapi: "3.1.0"
info:
title: Task API
version: "1.0.0"
paths:
/api/v1/tasks:
get:
summary: List tasks
parameters:
- name: completed
in: query
schema: { type: boolean }
- name: limit
in: query
schema: { type: integer, default: 20, maximum: 100 }
responses:
"200":
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Task" }
post:
summary: Create task
requestBody:
content:
application/json:
schema: { $ref: "#/components/schemas/CreateTask" }
responses:
"201":
content:
application/json:
schema: { $ref: "#/components/schemas/Task" }
"400":
content:
application/json:
schema: { $ref: "#/components/schemas/ApiError" }
components:
schemas:
Task:
type: object
properties:
id: { type: string, format: uuid }
title: { type: string }
completed: { type: boolean }
createdAt: { type: string, format: date-time }
required: [id, title, completed, createdAt]
CreateTask:
type: object
properties:
title: { type: string, minLength: 1, maxLength: 200 }
priority: { type: integer, enum: [1, 2, 3] }
required: [title]
ApiError:
type: object
properties:
code: { type: string }
message: { type: string }GraphQL: Schema Definition
type User {
id: ID!
email: String!
role: UserRole!
createdAt: DateTime!
}
enum UserRole {
USER
ADMIN
}
type Query {
user(id: ID!): User
users(limit: Int = 20, offset: Int = 0): [User!]!
}
type Mutation {
createUser(input: CreateUserInput!): User!
}
input CreateUserInput {
email: String!
password: String!
}🎙️ Voice Directive
All agent output must follow this writing style. Slop language erodes trust; precision builds it.
- Lead with the point. Say what it does, why it matters, what changes.
- Be concrete. Name files, functions, line numbers, commands, outputs, real numbers. Never abstract hand-waving.
- Tie technical choices to user outcomes. What the real user sees, loses, waits for, or can now do.
- Sound like a senior engineer talking to a peer. Not a consultant presenting to a client.
- Never corporate, academic, PR, or hype.
Banned Words (AI Slop — NEVER use these)
delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, tapestry, underscore, foster, showcase, delve into, game-changer, cutting-edge, revolutionize, leverage (as verb), synergy, paradigm, holistic, seamless, bespoke, state-of-the-art, best-in-class, world-class, mission-critical
📢 Completion Status Protocol
Every task, review, and agent output MUST conclude with one of four statuses. No completion claim is valid without this protocol.
- DONE — Completed with evidence. Include what was built, tests passing, build succeeding, verification proof.
- DONE_WITH_CONCERNS — Completed, but list specific concerns. Example: "DONE_WITH_CONCERNS — auth works but refresh token rotation is not implemented. Tracked as tech debt in docs/plans/task.md."
- BLOCKED — Cannot proceed. State the blocker, what was tried, and what's needed. Example: "BLOCKED — API contract undefined. Waiting on api-designer output before backend can proceed."
- NEEDS_CONTEXT — Missing information. State exactly what is needed, in one sentence. Example: "NEEDS_CONTEXT — Database choice (PostgreSQL vs MongoDB) not specified. Affects schema design."
<HARD-GATE>
Before claiming ANY status:
1. DONE must include concrete evidence (test output, build log, file paths)
2. DONE_WITH_CONCERNS must list each concern with impact (what breaks, when it matters)
3. BLOCKED must state the exact blocker, NOT a vague "can't proceed"
4. NEEDS_CONTEXT must ask a specific question, NOT "need more info"
5. NEVER claim DONE without evidence. "It should work" is not evidence.
</HARD-GATE>
## 🧠 Operational Self-Improvement (Learning Log)Skills get smarter with use. Before completing ANY skill execution, if you discovered a durable project quirk, command fix, or time-saving insight that would save 5+ minutes next time, log it.
scripts/log-learning.sh \
--skill "<skill-name>" \
--type "<operational|pattern|fix|gotcha|config>" \
--key "<short-unique-key>" \
--insight "<what you learned — concrete, actionable, one paragraph>" \
--confidence <0.0-1.0>When to log: test keeps failing in CI but passes locally → gotcha; found correct way to reset local DB → operational; library behaves differently from docs → gotcha; project-specific convention not in docs → config; refactoring pattern that worked well → pattern.
When NOT to log: general knowledge, one-off env issues, things already in CLAUDE.md.
Learnings stored in ~/.virtual-company/projects/<project-slug>/learnings.jsonl — loaded at session start.
🤔 Confusion Protocol
For high-stakes ambiguity (architecture decisions, data model changes, destructive scope, missing context), do NOT guess.
- STOP. Do not proceed with implementation.
- Name it in one sentence — what specifically is ambiguous?
- Present 2-3 options with concrete trade-offs for each.
- Recommend one option with reasoning.
- ASK the user before proceeding.
Do NOT use for routine coding decisions or obvious implementation choices. Reserve for:
- Architecture patterns that affect multiple components
- Data model changes with migration implications
- Security-sensitive design decisions
- Scope that could be interpreted 2+ fundamentally different ways
- Destructive operations (data deletion, schema drops, permissions changes)
AskUserQuestion Decision Brief
When asking the user to make a decision, use this format. Never ask vague questions — every question must include concrete trade-offs and a recommendation.
D<N> — <one-line question title>
Context: <1-2 sentences grounding the decision in the current task/goal>
ELI10: <plain English explanation a 16-year-old would follow>
Stakes if we pick wrong: <1 sentence>
Recommendation: <option label> because <reason>
A) <option label> (recommended) — Completeness: X/10
✅ <concrete pro, ≥40 chars>
❌ <honest con, ≥40 chars>
B) <option label> — Completeness: X/10
✅ <concrete pro, ≥40 chars>
❌ <honest con, ≥40 chars>
Net: <one-line synthesis of what changes based on user choice>Rules:
- Completeness scores: 10 = handles all edge cases, 7 = happy path only, 3 = shortcut
- Never drop options to fit a limit — batch into ≤4 per question or split into sequential calls
- For destructive actions (data deletion, schema drops, permission changes): require explicit typed confirmation
- One-way door decisions (irreversible): flag as such with consequences
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

