Api First Product Strategy
Skill Profile
(Select at least one profile to enable specific modules)
Overview
API-First Product Strategy treats APIs as first-class citizens in product design, enabling better integration, developer experience, and ecosystem growth. This approach is essential for modern SaaS products, platform businesses, and any product requiring third-party integration.
Why This Matters
Strategic Necessity:
- Developer Experience: Improve DX for API consumers with clear, consistent APIs
- Integration: Enable seamless third-party integration through well-documented contracts
- Ecosystem Growth: Foster partner and developer ecosystem growth
- Time-to-Market: Accelerate development through parallel API and UI work
- Flexibility: Support multiple client types (web, mobile, IoT) from single API
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- <e.g., env vars, request payload, file paths, schema>
- Entry Conditions:
- <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>
- Outputs:
- <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>
- Artifacts Required (Deliverables):
- <e.g., Code Diff, Unit Tests, Migration Script, API Docs>
- Acceptance Evidence:
- <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>
- Success Criteria:
- <e.g., p95 < 300ms, coverage ≥ 80%>
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions
- Product requirements are well-defined before API design
- Development team has API design expertise
- Target audience includes developers or partners
- Sufficient resources for documentation and SDK development
- API gateway infrastructure available
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix
| Scenario |
Description |
Expected Outcome |
| API Design |
Design API from product requirements |
Complete endpoint definitions with schemas |
| Documentation Generation |
Generate OpenAPI specification |
Valid OpenAPI 3.0 spec with all endpoints |
| SDK Generation |
Generate client SDKs |
Working SDKs for JavaScript, Python, Java |
| Validation |
Validate API design |
No errors, minimal warnings |
| Developer Portal |
Deploy interactive documentation |
Working Swagger UI and Redoc |
| Versioning |
Apply versioning strategy |
Versioned endpoints with clear paths |
| Security |
Apply authentication and rate limiting |
All endpoints secured and rate-limited |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives
- Design Phase: Always design API before implementation
- Documentation First: Generate OpenAPI spec before coding
- Validation: Validate API design before proceeding
- Security: Apply security best practices to all endpoints
- Developer Experience: Prioritize developer experience in all decisions
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: api-first-product-strategy3description: API-First Product Strategy treats APIs as first-class citizens in product Use when this capability is needed.4---56# Api First Product Strategy78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17API-First Product Strategy treats APIs as first-class citizens in product design, enabling better integration, developer experience, and ecosystem growth. This approach is essential for modern SaaS products, platform businesses, and any product requiring third-party integration.1819## Why This Matters20**Strategic Necessity:**2122- **Developer Experience**: Improve DX for API consumers with clear, consistent APIs23- **Integration**: Enable seamless third-party integration through well-documented contracts24- **Ecosystem Growth**: Foster partner and developer ecosystem growth25- **Time-to-Market**: Accelerate development through parallel API and UI work26- **Flexibility**: Support multiple client types (web, mobile, IoT) from single API2728---2930## Core Concepts & Rules3132### 1. Core Principles33- Follow established patterns and conventions34- Maintain consistency across codebase35- Document decisions and trade-offs3637### 2. Implementation Guidelines38- Start with the simplest viable solution39- Iterate based on feedback and requirements40- Test thoroughly before deployment414243## Inputs / Outputs / Contracts44* **Inputs**:45 - <e.g., env vars, request payload, file paths, schema>46* **Entry Conditions**:47 - <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>48* **Outputs**:49 - <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>50* **Artifacts Required (Deliverables)**:51 - <e.g., Code Diff, Unit Tests, Migration Script, API Docs>52* **Acceptance Evidence**:53 - <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>54* **Success Criteria**:55 - <e.g., p95 < 300ms, coverage ≥ 80%>5657## Skill Composition58* **Depends on**: None59* **Compatible with**: None60* **Conflicts with**: None61* **Related Skills**: None6263## Quick Start / Implementation Example64651. Review requirements and constraints662. Set up development environment673. Implement core functionality following patterns684. Write tests for critical paths695. Run tests and fix issues706. Document any deviations or decisions7172```python73# Example implementation following best practices74def example_function():75 # Your implementation here76 pass77```787980## Assumptions81- Product requirements are well-defined before API design82- Development team has API design expertise83- Target audience includes developers or partners84- Sufficient resources for documentation and SDK development85- API gateway infrastructure available8687## Compatibility & Prerequisites8889* **Supported Versions**:90 - Python 3.8+91 - Node.js 16+92 - Modern browsers (Chrome, Firefox, Safari, Edge)93* **Required AI Tools**:94 - Code editor (VS Code recommended)95 - Testing framework appropriate for language96 - Version control (Git)97* **Dependencies**:98 - Language-specific package manager99 - Build tools100 - Testing libraries101* **Environment Setup**:102 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)103104105## Test Scenario Matrix106| Scenario | Description | Expected Outcome |107|----------|-------------|------------------|108| API Design | Design API from product requirements | Complete endpoint definitions with schemas |109| Documentation Generation | Generate OpenAPI specification | Valid OpenAPI 3.0 spec with all endpoints |110| SDK Generation | Generate client SDKs | Working SDKs for JavaScript, Python, Java |111| Validation | Validate API design | No errors, minimal warnings |112| Developer Portal | Deploy interactive documentation | Working Swagger UI and Redoc |113| Versioning | Apply versioning strategy | Versioned endpoints with clear paths |114| Security | Apply authentication and rate limiting | All endpoints secured and rate-limited |115116---117118## Technical Guardrails & Security Threat Model119120### 1. Security & Privacy (Threat Model)121* **Top Threats**: Injection attacks, authentication bypass, data exposure122- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII123- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager124- [ ] **Authorization**: Validate user permissions before state changes125126### 2. Performance & Resources127- [ ] **Execution Efficiency**: Consider time complexity for algorithms128- [ ] **Memory Management**: Use streams/pagination for large data129- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks130131### 3. Architecture & Scalability132- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection133- [ ] **Modularity**: Decouple logic from UI/Frameworks134135### 4. Observability & Reliability136- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`137- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`138- [ ] **Error Handling**: Standardized error codes, no bare except139- [ ] **Observability Artifacts**:140 - **Log Fields**: timestamp, level, message, request_id141 - **Metrics**: request_count, error_count, response_time142 - **Dashboards/Alerts**: High Error Rate > 5%143144145## Agent Directives1461. **Design Phase**: Always design API before implementation1472. **Documentation First**: Generate OpenAPI spec before coding1483. **Validation**: Validate API design before proceeding1494. **Security**: Apply security best practices to all endpoints1505. **Developer Experience**: Prioritize developer experience in all decisions151152## Definition of Done (DoD) Checklist153154- [ ] Tests passed + coverage met155- [ ] Lint/Typecheck passed156- [ ] Logging/Metrics/Trace implemented157- [ ] Security checks passed158- [ ] Documentation/Changelog updated159- [ ] Accessibility/Performance requirements met (if frontend)160161162## Anti-patterns / Pitfalls163164* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries165* ⚠️ **Watch out for**: Common symptoms and quick fixes166* 💡 **Instead**: Use proper error handling, pagination, and logging167168169## Reference Links & Examples170171* Internal documentation and examples172* Official documentation and best practices173* Community resources and discussions174175176## Versioning & Changelog177178* **Version**: 1.0.0179* **Changelog**:180 - 2026-02-22: Initial version with complete template structure181182---183> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.184<!-- tomevault:4.0:skill_md:2026-04-13 -->