Agent skill · Security

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill fastapi-patterns --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/fastapi-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# FastAPI Patterns Production-oriented patterns for FastAPI services. ## When to Use - Building or reviewing a FastAPI app. - Splitting routers, schemas, dependencies, and database access. - Writing async endpoints that call a database or external service. - Adding authentication, authorization, OpenAPI docs, tests, or deployment settings. - Checking a FastAPI PR for copy-pasteable examples and production risks. ## How It Works Treat the FastAPI app as a thin HTTP layer over explicit dependencies and service code: - `main.py` owns app construction, middleware, exception handlers, and router registration. - `schemas/` owns Pydantic request and response models. - `dependencies.py` owns database, auth, pagination, and request-scoped dependencies. - `services/` or `crud/` owns business and persistence operations. - `tests/` overrides dependencies instead of opening production resources. Prefer small routers and explicit `response_model` declarations. Keep raw ORM objects, secrets, and framework globals out of response schemas. ## Project Layout ```text app/ |-- main.py |-- config.py |-- dependencies.py |-- exceptions.py |-- api/ | `-- routes/ | |-- users.py | `-- health.py |-- core/ |

What's inside
Steps it walks through
  1. When to Use
  2. How It Works
  3. Project Layout
  4. Application Factory
  5. Pydantic Schemas
  6. Dependencies
  7. Async Endpoints
  8. Error Handling
  9. OpenAPI Customization
  10. Testing
  11. Security Checklist
  12. Performance Checklist
  13. Examples
  14. See Also
More from everything-openai-codex
All skills →
About this skill
What does the fastapi-patterns skill do?

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill fastapi-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going