- Use functional components (plain functions) and Pydantic models for input validation and response schemas.
- Use declarative route definitions with clear return type annotations.
- Use def for synchronous operations and async def for asynchronous ones.
- Minimize @app.on_event("startup") and @app.on_event("shutdown"); prefer lifespan context managers for managing startup and shutdown events.
- Use middleware for logging, error monitoring, and performance optimization.
Fastapi Application Rules
[Applies to: **/main.py] Specific guidelines for FastAPI application structure and setup in the main application file.
Fastapi Application Rules by Tryboy869 · b998039
npx skillmds@latest add tryboy869/fastapi-application-rules File contents
---name: fastapi-application-rulesdescription: "[Applies to: **/main.py] Specific guidelines for FastAPI application structure and setup in the main application file."---- Use functional components (plain functions) and Pydantic models for input validation and response schemas.- Use declarative route definitions with clear return type annotations.- Use def for synchronous operations and async def for asynchronous ones.- Minimize @app.on_event("startup") and @app.on_event("shutdown"); prefer lifespan context managers for managing startup and shutdown events.- Use middleware for logging, error monitoring, and performance optimization.
Tryboy869/senjutsu-coding-agent/tree/main/senjutsu/skills/fastapi-application-rules commit b9980394c3
Frequently asked questions
Run npx skillmds@latest add tryboy869/fastapi-application-rules in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
[Applies to: **/main.py] Specific guidelines for FastAPI application structure and setup in the main application file. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Tryboy869 (@tryboy869) published this skill. Their other Agent Skills are listed on their SkillMD profile.