phase-4-api
Skill70 starsChanged 9 months agoApache-2.0View on GitHub
Phase 4: API Design and REST Endpoint Planning. Design RESTful APIs, define endpoints, request/response schemas. Includes Zero Script QA integration for API testing. Next: $phase-5-design-system. Triggers: API design, REST, endpoint, API schema, request response, API 설계, 엔드포인트, REST API, API設計, エンドポイント, API设计, 端点, diseno de API, conception API, API-Design, progettazione API Do NOT use for: data modeling (use $phase-1-schema), frontend (use $phase-6-ui-integration).
- Sends data out
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ww-w-ai/bkit-claude-codetheir own version, first seen Aug 14, 2026
- ww-w-ai/bkit-geminitheir own version, first seen Apr 9, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ww-w-ai/bkit-claude-code★ 600same name
- ww-w-ai/bkit-gemini★ 66same name
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.
- AGENTS.mdAGENTS.md
- bkend-authSkill
- bkend-cookbookSkill
- bkend-dataSkill
- bkend-quickstartSkill
- bkend-storageSkill
- bkit-rulesSkill
- bkit-templatesSkill
- code-reviewSkill
- codex-learningSkill
- desktop-appSkill
- development-pipelineSkill
- dynamicSkill
- enterpriseSkill
- mobile-appSkill
- pdcaSkill
- phase-1-schemaSkill
- phase-2-conventionSkill
- phase-3-mockupSkill
- phase-5-design-systemSkill
- phase-6-ui-integrationSkill
- phase-7-seo-securitySkill
- phase-8-reviewSkill
- phase-9-deploymentSkill
- plan-plusSkill
- starterSkill
- zero-script-qaSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
API Endpoint List: - All routes with methods
- Distinctive: line 103
Use Docker logs and curl for testing without test scripts:
- Distinctive: line 130
When API design is complete, proceed to $phase-5-design-system for component library.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Phase 4: API Design
Design your API contracts before implementation.
Purpose
Phase 4 defines the communication layer between frontend and backend. Well-designed APIs reduce integration friction and enable parallel development.
Actions
| Action | Description | Example |
start | Begin Phase 4 | $phase-4-api start |
endpoints | List all endpoints | $phase-4-api endpoints |
test | Generate API test plan | $phase-4-api test |
Deliverables
- API Endpoint List - All routes with methods
- Request/Response Schemas - Per-endpoint data contracts
- Authentication Spec - Auth flow and token handling
- Error Response Format - Standardized error structure
- API Document -
docs/02-design/api.md
Process
Step 1: Resource Identification
Map entities from Phase 1 to API resources:
| Entity | Resource Path | Methods |
|--------|--------------|---------|
| User | /api/users | GET, POST |
| User (single) | /api/users/:id | GET, PUT, DELETE |
| Post | /api/posts | GET, POST |
| Post (single) | /api/posts/:id | GET, PUT, DELETE |
| Comment | /api/posts/:id/comments | GET, POST |Step 2: Endpoint Specifications
For each endpoint:
### POST /api/users
- **Description**: Create new user
- **Auth**: None (public)
- **Request Body**:
```json
{ "email": "string", "name": "string", "password": "string" }- Response 201:
{ "id": "uuid", "email": "string", "name": "string", "created_at": "datetime" } - Errors: 400 (validation), 409 (email exists)
### Step 3: Authentication Design
```markdown
## Auth Flow
1. POST /api/auth/login -> Returns { access_token, refresh_token }
2. Include `Authorization: Bearer <token>` in subsequent requests
3. POST /api/auth/refresh -> Renew expired access token
4. POST /api/auth/logout -> Invalidate tokens
## Token Specs
- Access token: JWT, 15min expiry
- Refresh token: opaque, 7d expiry, stored in httpOnly cookieStep 4: Error Response Standard
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Email is required",
"details": [
{ "field": "email", "message": "Must be a valid email address" }
]
}
}Step 5: API Testing with Zero Script QA
Use Docker logs and curl for testing without test scripts:
# Test user creation
curl -X POST http://localhost:3000/api/users \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","name":"Test","password":"pass123"}'
# Check docker logs for errors
docker logs app-container --tail 50API Patterns
See references/api-patterns.md for REST conventions, pagination, filtering, and versioning patterns.
Output Location
docs/02-design/
├── api.md # Full API specification
├── auth-flow.md # Authentication design
└── error-codes.md # Error code referenceNext Phase
When API design is complete, proceed to $phase-5-design-system for component library.
Common Mistakes
| Mistake | Solution |
| Inconsistent naming | Use plural nouns for resources |
| No pagination | Always paginate list endpoints |
| Missing error codes | Define all error responses upfront |
| No versioning plan | Use URL prefix /api/v1/ from start |
| Tight coupling | Design for frontend/backend independence |
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.

