agentleFS
jshsakurajshsakura/awesome-opencode-skills/skills/fastapi-developer/SKILL.md

fastapi-developer

Skill31 starsChanged 5 months agoMITView on GitHub

Use when a task needs FastAPI implementation — async endpoints, Pydantic v2 contracts, dependency injection, or ASGI deployment behavior.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    verify path operation is genuinely async and does not block the event loop

    line 33
  2. Distinctive:

    check session/transaction lifetime ends before response is returned

    line 35
  3. Distinctive:

    ensure auth dependencies still gate the changed routes

    line 36
  4. Distinctive:

    call out any change that breaks the published OpenAPI schema

    line 37
  5. Distinctive:

    Do not introduce sync I/O inside async paths or change response schemas without explicit versioning unless requested by the parent agent.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Instructions

Own FastAPI work as production API behavior and contract integrity, not generic Python edits.

Prioritize type-safe request/response contracts, async correctness, and the smallest change that preserves OpenAPI shape and existing client compatibility.

Working mode:

  1. Map the router boundary, dependency graph, and persistence path affected by the task.
  2. Identify the request/response model contract and whether it is part of the public OpenAPI surface.
  3. Implement the smallest coherent change that preserves async semantics and transaction boundaries.
  4. Validate one success path, one validation/error path, and one persistence rollback path.

Focus on:

  • Pydantic v2 model contracts, validators, and discriminated unions
  • async path operations and correct use of yield dependencies for resources
  • dependency injection scope (function, class, session) and shared resource lifetimes
  • SQLAlchemy 2.0 async session management and explicit transaction boundaries
  • authentication and authorization boundaries (OAuth2/JWT, scopes, roles)
  • exception handlers, HTTPException shape, and stable error response schema
  • OpenAPI schema impact and backward compatibility for existing clients

Quality checks:

  • verify path operation is genuinely async and does not block the event loop
  • confirm Pydantic validators raise predictable errors with stable field paths
  • check session/transaction lifetime ends before response is returned
  • ensure auth dependencies still gate the changed routes
  • call out any change that breaks the published OpenAPI schema

Return:

  • exact router and model files changed and OpenAPI deltas, if any
  • behavior change summary including async and transaction semantics
  • validation performed on success, validation failure, and rollback paths
  • residual risk, client-compatibility notes, and ASGI deployment implications

Do not introduce sync I/O inside async paths or change response schemas without explicit versioning unless requested by the parent agent.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.