design-doc
Skill3 starsChanged 4 months agoMITView on GitHub
Generate a complete DESIGN.md file for any software project. Use whenever the user asks to create, write, generate, or draft a DESIGN.md — a technical design document that explains HOW a system will be built. Also use when the user says they want a "system design doc", "technical design spec", "implementation plan", or "how are we building this".
25 other projects use a version of this.
Adopted by
Most recently taken up by
- mustafarslan/skillstheir own version, first seen Nov 8, 2026
- mahdy-gribkov/arcanatheir own version, first seen Nov 8, 2026
- medy-gribkov/arcanatheir own version, first seen Nov 1, 2026
- thatjuan/agent-skillstheir own version, first seen Oct 20, 2026
- alabenkhlifa/dayjobtheir own version, first seen Oct 20, 2026
- gigio1023/agent-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use testing, release-notes and 2 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.
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
Microsoft AzureSkillrelease-notes
Author and update release notes for Azure App Configuration libraries and providers. USE FOR: write release notes, add release note entry, update release notes, draft release notes, new version release notes, format release notes. DO NOT USE FOR: generating changelogs from git history, writing internal engineering notes.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 4 projects that use this
GoogleSkillgrill-me
A relentless interview to sharpen a plan or design.
Also in 3 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- maragudk/skills★ 49same name
- na0fu3y/ochakai★ 21same name
- akash-joshi/agent-skills★ 8same name
- e2bgateway/e2bgateway★ 8same name
- taniwhaai/arai★ 7same name
- kelesmert/turnlens★ 4same name
- dfrysinger/skills★ 3same name
- gigio1023/agent-skills★ 2same name
- gigio1023/gigio-skills★ 2same name
- mustafarslan/skills★ 2same name
15 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 repository5 other files it gives its agents.
- architecture-docSkill
- prd-docSkill
- readme-docSkill
- roadmap-docSkill
- security-docSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 19 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
19
Distinctive
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 43
Before writing, gather context.
- Distinctive: line 57
If sparse answers, make reasonable assumptions (note them in doc) and proceed.
- Distinctive: line 61
Create the file with this exact structure:
- Distinctive: line 213
CREATE INDEX idx_users_email ON users(email).
- Distinctive: line 546
Use tables for comparisons
- Distinctive: line 551
Update as implementation reveals new details
- Distinctive: line 559
When the user asks for a DESIGN.md, follow this flow:
- Distinctive: line 562
Ask: "Do you have a PRD or requirements doc for this?
- Distinctive: line 572
Ask: "Should this design cover [specific component] or the full end-to-end system?"
- Distinctive: line 575
Start with Overview and System Context
- Distinctive: line 577
Add Data Model and API Design
- Distinctive: line 580
Add sections for Security, Testing, Monitoring
- Distinctive: line 626
Always explain why you chose approach A over approach B
- Distinctive: line 629
If you're storing data, show the schema
- Distinctive: line 648
When generating a DESIGN.md:
- Distinctive: line 663
After creating a DESIGN.md, suggest:
- Distinctive: line 664
Architecture.md: - If cross-cutting concerns need documentation
- Distinctive: line 665
API.md: - If API needs more detailed documentation
- Distinctive: line 667
Roadmap.md: - If phased rollout needs tracking
“Common” is measured: kept by at least 6 in 10 of the 21 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
DESIGN.md Author Skill
You are a technical design writer. Your job is to create a DESIGN.md file that explains the technical approach for implementing a feature or system.
Philosophy
A DESIGN.md is the bridge between "what we're building" (PRD) and "the code itself" (implementation). It answers:
- What components/modules will we build?
- How do they interact? (data flow, APIs, events)
- What technologies are we using and why?
- What are the trade-offs in our approach?
The audience is engineers on your team who need to understand the system before writing code. It should be detailed enough that someone could implement it, but not prescriptive about every line of code.
Structure
A DESIGN.md has 8 core sections:
- Overview - High-level summary
- Goals & Non-Goals - What this design achieves and what it doesn't
- System Context - Where this fits in the larger system
- Proposed Design - The core technical approach
- Data Model - Schema, structures, storage
- API Design - Endpoints, contracts, interfaces
- Implementation Plan - Phasing and order of operations
- Alternatives Considered - What we rejected and why
Workflow: Interview → Draft → Validate
Step 1: Interview the User
Before writing, gather context. Ask naturally (don't make it feel like a form):
Required context:
- What are we building? (feature/system name and purpose)
- Is there a PRD? (if yes, read it first for context)
- What's the tech stack? (languages, frameworks, databases)
- What exists already? (are we adding to an existing system or greenfield?)
- Any constraints? (performance, security, backwards compatibility)
Optional but helpful:
- Who's the user? (helps understand flows)
- Scale requirements? (affects design choices)
- Timeline pressure? (affects MVP vs full solution)
If sparse answers, make reasonable assumptions (note them in doc) and proceed.
Step 2: Build the Document Structure
Create the file with this exact structure:
# [Feature/System Name] - Technical Design
**Author:** [Name]
**Created:** [Date]
**Status:** [Draft | In Review | Approved | Implemented]
**Related Docs:** [Link to PRD, Architecture docs, etc.]
---
## 1. Overview
### What Are We Building?
[2-3 paragraphs explaining the technical challenge and solution approach at a high level]
### Summary
[TL;DR: One paragraph with the core technical decisions]
**Key Technical Decisions:**
- Decision 1 (e.g., "Use PostgreSQL for transactional data")
- Decision 2 (e.g., "Event-driven architecture with message queue")
- Decision 3
---
## 2. Goals & Non-Goals
### Goals (What This Design Achieves)
1. [Technical goal 1 - e.g., "Support 10,000 concurrent users"]
2. [Technical goal 2 - e.g., "Maintain <200ms API response time"]
3. [Technical goal 3 - e.g., "Enable horizontal scaling"]
### Non-Goals (Explicitly Out of Scope)
1. [What we're NOT doing - e.g., "Real-time collaboration (Phase 2)"]
2. [Deferred complexity - e.g., "Multi-region deployment"]
3. [Clarify boundaries]
### Success Criteria
- [ ] Measurable criterion 1
- [ ] Measurable criterion 2
- [ ] Measurable criterion 3
---
## 3. System Context
### Current State
[Describe the existing system/architecture this will integrate with or modify]
### Where This Fits
[Diagram or description showing how this new component relates to existing systems]
[User Request] → [API Gateway] → [NEW: Feature Service] → [Database] ↓ [Message Queue] → [Background Jobs]
### External Dependencies
- **Dependency 1:** [System/service we depend on, with fallback plan if it fails]
- **Dependency 2:** [Third-party API, rate limits, SLA]
### Assumptions
1. [Assumption 1 - e.g., "Users have stable internet connection"]
2. [Assumption 2 - e.g., "Existing auth service handles all authentication"]
---
## 4. Proposed Design
### High-Level Architecture
[Diagram showing major components and data flow]
┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │ Client │─────▶│ API Layer │─────▶│ Service │ │ (React) │◀─────│ (REST/GQL) │◀─────│ Layer │ └─────────────┘ └──────────────┘ └──────┬───────┘ │ ▼ ┌──────────────┐ │ Database │ └──────────────┘
### Component Breakdown
#### Component 1: [Name]
**Responsibility:** [What this component does]
**Technology:** [Language/framework/library]
**Key Interfaces:**
- `methodName(params): returnType` - [description]
- `methodName2(params): returnType` - [description]
**Internal Logic:**
1. [Step 1 of what this component does]
2. [Step 2]
3. [Step 3]
**Why This Approach:** [Justify the technical choice]
---
#### Component 2: [Name]
[Same structure as Component 1]
---
### Data Flow
**Happy Path: [User Action]**
1. User clicks [action] → sends `POST /api/endpoint`
2. API layer validates request, checks auth
3. Service layer processes business logic
4. Database transaction updates records
5. Response returns to client with status
6. [Optional] Background job triggered for async work
**Edge Cases:**
- **If [condition]:** [How system handles it]
- **If [error]:** [Fallback behavior]
### Technology Choices
| Decision | Choice | Alternatives Considered | Rationale |
|----------|--------|------------------------|-----------|
| Database | PostgreSQL | MongoDB, MySQL | Need ACID transactions, complex queries, team expertise |
| API Style | REST | GraphQL, gRPC | Simpler for mobile clients, caching easier, less overhead |
| Frontend State | Redux | Zustand, Context | Large state tree, time-travel debugging needed |
| Hosting | AWS ECS | Kubernetes, Lambda | Balance of control and simplicity, team familiarity |
---
## 5. Data Model
### Database Schema
#### Table: `users`
```sql
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) UNIQUE NOT NULL,
hashed_password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX idx_users_email ON users(email);Design Notes:
- UUID for public-facing IDs (security)
- Email is unique constraint
- Passwords hashed with bcrypt (not stored plain)
Table: [table_name]
[Same structure for each table]
Data Relationships
users (1) ───< (many) projects
projects (1) ───< (many) tasks
tasks (many) >───< (many) tags [join table: task_tags]Data Access Patterns
Common Queries:
- Get user with all projects:
SELECT * FROM users JOIN projects WHERE user_id = ? - Get project tasks:
SELECT * FROM tasks WHERE project_id = ? ORDER BY created_at DESC
Performance Considerations:
- Index on
project_idfor tasks table (frequent filtering) - Consider denormalization for task_count on projects (avoid N+1)
6. API Design
REST Endpoints
POST /api/v1/projects
Description: Create a new project
Request:
{
"name": "string (required, max 100 chars)",
"description": "string (optional)",
"status": "enum: active|archived (default: active)"
}Response (201 Created):
{
"id": "uuid",
"name": "string",
"description": "string",
"status": "string",
"created_at": "ISO8601 timestamp",
"updated_at": "ISO8601 timestamp"
}Errors:
400 Bad Request- Invalid input (missing name, too long, etc.)401 Unauthorized- Missing/invalid auth token429 Too Many Requests- Rate limit exceeded
Rate Limit: 100 requests per minute per user
GET /api/v1/projects/:id
[Same structure for each endpoint]
GraphQL Schema (if applicable)
type Project {
id: ID!
name: String!
description: String
status: ProjectStatus!
tasks: [Task!]!
createdAt: DateTime!
updatedAt: DateTime!
}
enum ProjectStatus {
ACTIVE
ARCHIVED
}
type Query {
project(id: ID!): Project
projects(status: ProjectStatus, limit: Int = 20): [Project!]!
}
type Mutation {
createProject(input: CreateProjectInput!): Project!
updateProject(id: ID!, input: UpdateProjectInput!): Project!
}Internal Service Interfaces (if microservices)
ProjectService
interface ProjectService {
createProject(userId: string, data: CreateProjectDTO): Promise<Project>;
getProject(projectId: string, userId: string): Promise<Project | null>;
updateProject(projectId: string, userId: string, data: UpdateProjectDTO): Promise<Project>;
deleteProject(projectId: string, userId: string): Promise<void>;
}7. Implementation Plan
Phase 1: Foundation (Week 1-2)
Goal: Basic CRUD operations working
Tasks:
- Set up database schema and migrations
- Implement core data models
- Build basic API endpoints (create, read)
- Add authentication middleware
- Write unit tests for service layer
Success Criteria: Can create and fetch projects via API
Phase 2: Core Features (Week 3-4)
Goal: Complete feature functionality
Tasks:
- Implement remaining endpoints (update, delete)
- Add validation and error handling
- Build frontend components
- Integrate frontend with API
- Add integration tests
Success Criteria: End-to-end user flow works
Phase 3: Polish & Performance (Week 5)
Goal: Production-ready
Tasks:
- Add caching layer (Redis)
- Implement rate limiting
- Performance testing and optimization
- Security audit
- Documentation
Success Criteria: Meets performance/security requirements
Dependencies & Blockers
Must Complete Before Starting:
- Database provisioning approved
- API gateway configured
- Auth service integration tested
Potential Blockers:
- Third-party API approval process (2 weeks)
- Security review timeline (1 week)
8. Alternatives Considered
Alternative 1: [Approach Name]
Description: [What this alternative was]
Pros:
- Pro 1
- Pro 2
Cons:
- Con 1 (deal-breaker)
- Con 2
Why Rejected: [The key reason we didn't choose this]
Alternative 2: [Approach Name]
[Same structure]
9. Security Considerations
Authentication & Authorization
- [How users authenticate]
- [How permissions are checked]
- [Token expiry and refresh strategy]
Data Protection
- [Encryption at rest and in transit]
- [PII handling]
- [Secrets management]
Input Validation
- [SQL injection prevention]
- [XSS prevention]
- [CSRF tokens]
Rate Limiting & DDoS
- [Rate limit strategy]
- [Abuse prevention]
10. Testing Strategy
Unit Tests
- All service layer methods
- Validation logic
- Edge cases and error handling
Integration Tests
- API endpoint contracts
- Database transactions
- External service mocks
Performance Tests
- Load testing (target: 10,000 concurrent users)
- API response time benchmarks
- Database query performance
Security Tests
- Penetration testing checklist
- OWASP Top 10 coverage
11. Observability & Monitoring
Metrics to Track
- API response times (p50, p95, p99)
- Error rates by endpoint
- Database query performance
- Cache hit/miss ratios
Logging
- Structured JSON logs
- Log levels: ERROR, WARN, INFO, DEBUG
- Request IDs for tracing
Alerting
- Alert if error rate > 5%
- Alert if p95 response time > 500ms
- Alert if database connections exhausted
12. Open Questions
- Question 1: [Decision needed before implementation]
- Question 2: [Clarification needed from stakeholder]
- Question 3: [Technical unknowns to investigate]
13. Appendix
Glossary
- Term 1: Definition
- Term 2: Definition
References
- [Link to PRD]
- [Link to Architecture docs]
- [Link to API style guide]
- [Link to related design docs]
Feedback & Approvals
| Reviewer | Role | Status | Comments |
| [Name] | Tech Lead | ✅ Approved | [Optional notes] |
| [Name] | Security | 🔄 In Review | [Feedback] |
| [Name] | Frontend Lead | ⏳ Pending |
---
## Best Practices
### 1. **Start with "Why" Before "How"**
- Explain the problem being solved
- Justify technical choices
- Show you considered alternatives
### 2. **Use Diagrams**
- ASCII art diagrams are fine
- Show data flow and component relationships
- Visuals help engineers understand quickly
### 3. **Be Specific About Data**
- Include actual schema definitions
- Show example API requests/responses
- Define interfaces and contracts
### 4. **Address Non-Functional Requirements**
- Performance targets
- Security considerations
- Scalability approach
- Error handling strategy
### 5. **Show Your Work**
- Document alternatives considered
- Explain trade-offs
- Show why you rejected other approaches
### 6. **Plan for Failure**
- What happens when external APIs fail?
- How do we handle database outages?
- What are the fallback strategies?
### 7. **Make It Reviewable**
- Use tables for comparisons
- Break complex sections into subsections
- Add acceptance criteria
### 8. **Keep It Living**
- Update as implementation reveals new details
- Track decisions made during development
- Version history shows evolution
---
## Conversation Flow
When the user asks for a DESIGN.md, follow this flow:
**1. Check for PRD First**
Ask: "Do you have a PRD or requirements doc for this? I'll read it to understand the context."
**2. Gather Technical Context**
Ask naturally:
- "What's the tech stack for this project?"
- "Is this adding to an existing system or starting fresh?"
- "Any performance or scale requirements I should know about?"
- "Are there security or compliance considerations?"
**3. Clarify Scope**
Ask: "Should this design cover [specific component] or the full end-to-end system?"
**4. Generate the DESIGN.md**
- Start with Overview and System Context
- Build out Proposed Design with components
- Add Data Model and API Design
- Include Implementation Plan
- Document Alternatives Considered
- Add sections for Security, Testing, Monitoring
**5. Use Placeholders for Unknowns**
Mark uncertain sections with `[TBD: reason]` or `[Decision needed: question]`
**6. Save and Suggest Next Steps**
Save as `DESIGN.md` and suggest: "Next up: Architecture.md for system-wide decisions, or jump into implementation?"
---
## Tips by Project Type
### For New Features
- Focus on integration with existing systems
- Show data flow through current architecture
- Emphasize backwards compatibility
### For Greenfield Projects
- More detail on foundational choices
- Explain tech stack selection rationale
- Include infrastructure setup
### For Refactoring
- Show before/after architecture
- Migration strategy section
- Rollback plan
### For Microservices
- Service boundaries and responsibilities
- Inter-service communication patterns
- Data consistency strategy
### For APIs
- Extensive endpoint documentation
- Versioning strategy
- Rate limiting and quotas
---
## Common Mistakes to Avoid
❌ **Too Abstract**
- Wrong: "We'll use a service-oriented approach"
- Right: "ProjectService handles CRUD ops, EventService manages async notifications"
❌ **Missing Trade-offs**
- Always explain why you chose approach A over approach B
❌ **No Data Model**
- If you're storing data, show the schema
❌ **Vague Performance Goals**
- Wrong: "Should be fast"
- Right: "API must respond in <200ms for p95"
❌ **Ignoring Failure Modes**
- What happens when things break?
❌ **Skipping Alternatives**
- Show you evaluated multiple approaches
❌ **Copy-Paste Schema Without Context**
- Explain why fields exist and what indexes are for
---
## Output Instructions
When generating a DESIGN.md:
1. **Read the PRD first** (if available) to understand requirements
2. **Ask clarifying questions** about tech stack and constraints
3. **Generate the complete DESIGN.md** using the template
4. **Customize complexity** based on project size (omit sections for simple features)
5. **Use placeholders** like `[TBD]` for unknowns
6. **Save as `DESIGN.md`** in the working directory
7. **Include diagrams** using ASCII art
8. **Be opinionated** - make technical recommendations, don't just list options
---
## Follow-Up Documents
After creating a DESIGN.md, suggest:
- **Architecture.md** - If cross-cutting concerns need documentation
- **API.md** - If API needs more detailed documentation
- **README.md** - For setup and running instructions
- **Roadmap.md** - If phased rollout needs trackingDoes 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.

