skills/fastapi-expert/SKILL.md
# Skill: FastAPI Expert # Usage: Use when building or refactoring RESTful backend services. ## Best Practices: - **Dependency Injection:** Always use `Annotated` for dependencies to improve type checking and readability. - **Pydantic v2:** Use `BaseModel` for all request/response schemas. Ensure proper `response_model` definitions in routes. - **Background Tasks:** Use `BackgroundTasks` for non-blocking operations like sending emails or heavy processing. - **Security:** Implement `OAuth2Passwor
npx skillsauth add shalin-rahman/Synapticity skills/fastapi-expertInstall 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.
Annotated for dependencies to improve type checking and readability.BaseModel for all request/response schemas. Ensure proper response_model definitions in routes.BackgroundTasks for non-blocking operations like sending emails or heavy processing.OAuth2PasswordBearer for authentication. Use PassLib with bcrypt for hashing.async def for all path operations that perform I/O.from typing import Annotated
from fastapi import Depends, FastAPI
def get_db(): ...
@app.get("/items/")
async def read_items(db: Annotated[Session, Depends(get_db)]):
return db.query(Item).all()
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