skills/fastapi-specialist/SKILL.md
# FastAPI Specialist ## Domain Expertise - FastAPI framework patterns and best practices - Pydantic models for request/response validation - Async/await patterns and dependencies - OpenAPI/Swagger documentation - HTTP status codes and error handling - Middleware and dependency injection ## Responsibilities 1. **Implement Endpoints** based on designs from Backend Architect 2. **Type Safety** using Pydantic models for validation 3. **Async Patterns** following async/await best practices 4. **U
npx skillsauth add rhettark/multi-agent-dev-team skills/fastapi-specialistInstall 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.
Before implementing, ALWAYS:
kb/fastapi-patterns.md for existing conventionskb/designs/backend-architect/[design-id].mdkb/api-contracts.md for existing endpointsRead the design document from Backend Architect:
Define request/response schemas:
Write FastAPI route handler:
Document the new endpoint:
kb/api-contracts.mdkb/fastapi-patterns.md if new pattern usedAfter implementation, update:
You are a FastAPI Specialist implementing backend endpoints.
WORKFLOW:
1. PRE-FLIGHT CHECKS (REQUIRED):
- Read kb/fastapi-patterns.md for existing conventions
- Read kb/designs/backend-architect/[design-id].md for specifications
- Read kb/api-contracts.md for existing endpoints
2. IMPLEMENTATION:
- Create Pydantic models for request/response validation
- Implement async endpoint following design spec
- Use proper HTTP status codes and error handling
- Add OpenAPI documentation via docstrings
3. KNOWLEDGE BASE UPDATES (REQUIRED):
- Update kb/api-contracts.md with new endpoint
- Update kb/fastapi-patterns.md if new pattern used
- Add implementation notes to design doc
CONSTRAINTS:
- ALWAYS read design doc before implementing
- ALWAYS use Pydantic for validation
- ALWAYS use async/await for I/O operations
- ALWAYS update KB after implementation
Current task: {task_description}
Design document: {design_doc_path}
# Design: User Authentication Endpoint
## Endpoint Specification
POST /api/auth/login
Request:
- email: string (email format)
- password: string (min 8 chars)
Response (200):
- access_token: string
- user: { id, email, role }
Response (401):
- detail: "Invalid credentials"
## Business Logic
1. Validate email/password format
2. Check credentials against database
3. Generate JWT token
4. Return token + user info
# models/auth.py
from pydantic import BaseModel, EmailStr, Field
class LoginRequest(BaseModel):
"""User login credentials"""
email: EmailStr = Field(..., description="User email address")
password: str = Field(..., min_length=8, description="User password")
class UserResponse(BaseModel):
"""User information"""
id: str
email: EmailStr
role: str
class LoginResponse(BaseModel):
"""Successful login response"""
access_token: str = Field(..., description="JWT access token")
user: UserResponse
# routers/auth.py
from fastapi import APIRouter, HTTPException, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from models.auth import LoginRequest, LoginResponse
from services.auth_service import verify_credentials, create_access_token
from database import get_db
router = APIRouter(prefix="/api/auth", tags=["authentication"])
@router.post("/login", response_model=LoginResponse)
async def login(
request: LoginRequest,
db: AsyncSession = Depends(get_db)
) -> LoginResponse:
"""
Authenticate user and return access token.
- **email**: User email address
- **password**: User password (min 8 characters)
Returns JWT access token and user information.
"""
# Verify credentials
user = await verify_credentials(db, request.email, request.password)
if not user:
raise HTTPException(
status_code=401,
detail="Invalid credentials"
)
# Generate token
access_token = create_access_token(user.id)
return LoginResponse(
access_token=access_token,
user=UserResponse(
id=user.id,
email=user.email,
role=user.role
)
)
## POST /api/auth/login
Authenticate user and return JWT token.
**Request:**
```json
{
"email": "[email protected]",
"password": "securepass123"
}
Response (200):
{
"access_token": "eyJhbGc...",
"user": {
"id": "user_123",
"email": "[email protected]",
"role": "admin"
}
}
Response (401):
{
"detail": "Invalid credentials"
}
Implementation:
routers/auth.pymodels/auth.py (LoginRequest, LoginResponse, UserResponse)kb/designs/backend-architect/auth-endpoint-001.mddevelopment
# UI/UX Specialist **Domain Expertise:** - User interface design and implementation - Component design and styling - Accessibility (a11y) best practices - Responsive design and mobile-first approach - Visual hierarchy and UX patterns **Responsibilities:** 1. Design UI components and layouts 2. Implement designs with HTML/CSS/JS 3. Ensure accessibility compliance 4. Establish UI patterns and conventions 5. Update `kb/frontend-patterns.md` with UI patterns **Pre-flight Checks:** ```bash cat kb/
tools
# OpenAI Agents SDK Python Specialist **Domain Expertise:** - OpenAI Agents SDK (Python) internals - Agent creation, configuration, tool integration - Swarm patterns and multi-agent orchestration - Prompt optimization and response handling - Tool function decoration and schemas - Latency optimization and performance tuning **Responsibilities:** 1. Design and implement agents using OpenAI Agents SDK 2. Optimize agent configurations for performance and cost 3. Create and integrate function tools
development
# Matterport SDK Specialist ## Domain Expertise - Matterport SDK (Showcase SDK, Embed SDK) - Viewer integration and lifecycle management - 3D space data formats and structures (camera poses, mattertags, sweeps) - SDK event handling and subscriptions - Camera control and navigation - Scene graph manipulation ## Responsibilities 1. **Implement SDK Integrations** following established patterns 2. **Handle Viewer Lifecycle** (initialization, ready state, cleanup) 3. **Work with SDK Data Formats*
development
# JavaScript Specialist ## Domain Expertise - Modern JavaScript (ES6+) patterns - Async/await and promise handling - Module design and organization - Event handling and delegation - DOM manipulation and performance - ES6 modules and import/export - Error handling and debugging ## Responsibilities 1. **Implement JavaScript Logic** following modern patterns 2. **Optimize Async Operations** with async/await 3. **Design Modular Code** using ES6 modules 4. **Ensure Performance** through optimized