skills/api-design/SKILL.md
# Skill: RESTful API Design & Best Practices # Usage: Use when building robust, scalable, and consumer-friendly web APIs. ## 📡 REST Core Principles - **Statelessness**: Every request from client to server must contain all of the information necessary to understand the request. - **Resource-Based**: APIs should represent entities (resources) using URLs. Nouns, not verbs. - **Standard Methods**: Use HTTP verbs correctly: - `GET`: Retrieve a resource (Safe, Idempotent). - `POST`: Create a new
npx skillsauth add shalin-rahman/Synapticity skills/api-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
GET: Retrieve a resource (Safe, Idempotent).POST: Create a new resource.PUT: Update a resource entirely (Idempotent).PATCH: Partially update a resource.DELETE: Remove a resource (Idempotent).GET /users/123/orders (Get orders for user 123)GET /get_orders_for_user?id=123/users, /products, /orders.application/json.total, next_page_url).GET /users?sort=-created_at&fields=id,name200 OK, 201 Created, 204 No Content400 Bad Request (Client error/Validation failed)401 Unauthorized (Authentication missing/invalid)403 Forbidden (Authenticated, but lacks permissions)404 Not Found (Resource doesn't exist)409 Conflict (State violation, duplicate entry)500 Internal Server Error (Server crashed - shouldn't happen){"error": {"code": "VALIDATION_FAILED", "message": "Email is required", "details": [...]}}api.example.com/v1/users). header-based versioning is also an accepted standard.tools
# Skill: Zero-Defect Software Engineering # Focus: Writing immortal, self-documenting, and resilient source code. ## Playbook Strategy: 1. **SOLID Foundations**: - **Single Responsibility**: Every class/function does ONE thing perfectly. - **Open/Closed**: Design for extension without modification. 2. **DRY (Don't Repeat Yourself)**: If logic appears twice, abstract it into a utility or base class. 3. **Defensive Programming**: - Validate every input. - Handle every exception specif
development
# Skill: TypeScript Clean Code (Staff Engineer) # Usage: Use for any TypeScript-based project to ensure enterprise-grade type safety and readability. ## Core Rules: - **Strict Typing:** Never use `any`. Use `unknown` with type guards if the type is truly uncertain. - **Interfaces vs Types:** Use `interface` for public APIs (extendability) and `type` for unions, intersections, and primitives. - **Functional Patterns:** Prioritize immutability. Use `readonly` for arrays and objects where possible
development
# Skill: Advanced Testing Strategies (TDD / BDD) # Usage: Use to enforce high code quality, prevent regressions, and ensure requirements are met implicitly. ## 🧪 The Testing Pyramid - **Unit Tests (70%)**: Fast, isolated tests for individual functions and classes. Mock all external dependencies. - **Integration Tests (20%)**: Test the interaction between several units or external systems (e.g., Database, APIs). - **End-to-End (E2E) Tests (10%)**: Slow, brittle tests that verify the system as a
development
# Skill: Technical Hand-off & Clarity # Focus: Professional documentation for human and machine consumption. ## Playbook Strategy: 1. **The "ReadMe First" Rule**: Use structured, hierarchical markdown. High-level summary first, deep-dive implementation second. 2. **Contextual Grounding**: Explain the "Why" and the "How" for every project. 3. **Semantic Clarity**: Use industry-standard terminology. Avoid jargon where simple language suffices. 4. **Machine-Readable Annotations**: Include clear co