fastapi-validate
Skill0 starsChanged 8 months agoMITView on GitHub
Scan a FastAPI project for Pydantic v1 leftovers, async anti-patterns, missing response models, database session issues, and security gaps.
In this repository3 other files it gives its agents.
- fastapi-endpointSkill
- fastapi-modelSkill
- fastapi-settingsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill when auditing a FastAPI project for quality, performance, or security issues.
- Distinctive: line 14
Check for Pydantic v1 patterns:
- Distinctive: line 21
Check for async anti-patterns:
- Distinctive: line 29
Check for missing response models:
- Distinctive: line 33
Check for database issues:
- Distinctive: line 39
Check for security issues:
- Distinctive: line 47
Check for deprecated patterns:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Validate FastAPI Project
When to Use
Use this skill when auditing a FastAPI project for quality, performance, or security issues.
Instructions
- Check for Pydantic v1 patterns:
.dict(),.json(),.parse_obj(),.parse_raw(),.__fields__@validator,@root_validatorclass Config:withorm_modeconint,constr,confloatconstrained typesfrom pydantic import BaseSettings(moved topydantic-settings)
- Check for async anti-patterns:
requests.*inasync defendpointstime.sleep()inasync defendpointsopen()file I/O inasync defendpoints- Sync database drivers (psycopg2, PyMySQL) with async engine
- Missing
awaiton async calls - CPU-heavy code without
run_in_executor
- Check for missing response models:
- Endpoints without
response_modelparameter - Response models that expose sensitive fields (password, hashed_password, secret_key)
- Endpoints without
- Check for database issues:
- Sessions not using dependency injection (manual creation without cleanup)
- Missing
expire_on_commit=Falseon async sessions - Lazy loading without eager load options (causes N+1 or MissingGreenlet)
- Missing
pool_pre_ping=Trueon engine
- Check for security issues:
- Hardcoded secrets
- Missing authentication on protected endpoints
- CORS with
allow_origins=["*"]in production Exceptioncaught and details exposed to client- File uploads without size/type validation
- Missing rate limiting on public endpoints
- Check for deprecated patterns:
@app.on_event("startup"/"shutdown")(use lifespan)- Inline
Depends()instead ofAnnotated
- Produce a summary report with issue count, severity, file locations, and fixes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

