.agent-os/skills/fastapi/SKILL.md
# FastAPI Skill > Loaded by: Backend Division agents | Version: 1.0 ## Project Structure ``` src/ api/v1/routes/, schemas/, dependencies/ core/config.py, security.py models/ services/ utils/ ``` ## Best Practices ### Routes ```python from fastapi import APIRouter, Depends, HTTPException, status router = APIRouter(prefix="/users", tags=["users"]) @router.post("/", response_model=UserResponse, status_code=status.HTTP_201_CREATED) async def create_user(user: UserCreate, db: Sessio
npx skillsauth add ab-aswini/agent-kit-p1 .agent-os/skills/fastapiInstall 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.
Loaded by: Backend Division agents | Version: 1.0
src/
api/v1/routes/, schemas/, dependencies/
core/config.py, security.py
models/
services/
utils/
from fastapi import APIRouter, Depends, HTTPException, status
router = APIRouter(prefix="/users", tags=["users"])
@router.post("/", response_model=UserResponse, status_code=status.HTTP_201_CREATED)
async def create_user(user: UserCreate, db: Session = Depends(get_db)):
return await UserService(db).create(user)
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail={"error": "user_not_found", "message": "User with this ID does not exist"}
)
development
Web application testing principles. E2E, Playwright, deep audit strategies.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
testing
Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.
development
# Testing Skill > Loaded by: QA Division agents | Version: 1.0 ## Test Pyramid ``` / E2E \ <- Few, slow, expensive / Integr. \ <- Some, moderate / Unit \ <- Many, fast, cheap ``` ## Unit Test Pattern (Arrange, Act, Assert) ```python def test_user_creation(): # Arrange user_data = {"name": "Alice", "email": "[email protected]"} # Act user = UserService.create(user_data) # Assert assert user.name == "Alice" assert user.id is