PlugWiki

fastapi-templates Skill (wshobson): Start a FastAPI Project the Standard Way

Gives Claude a ready layout and patterns for new FastAPI projects: async routes, dependency injection, a repository and service layer, and tests.

Installs
26.2K
on skills.sh
Stars
42.1K
on GitHub
Files
1
besides SKILL.md
Updated
Oct 2026
last repo commit

fastapi-templates helps Claude set up a FastAPI project the same way each time. It recommends an app/ layout with api, core, models, schemas, services and repositories folders. It also covers dependency injection with Depends, async route handlers and database calls, and middleware.

SKILL.md is a short summary. The worked code lives in references/details.md, which Claude reads when it needs it. That file has five patterns: a full app, a CRUD repository, a service layer, endpoints with dependencies, and authentication. It triggers when you ask for a new FastAPI application or backend API project.

Good for

  • Python developers starting a new FastAPI service who want a sensible folder layout
  • Teams standardizing on async SQLAlchemy and PostgreSQL for a REST backend
  • Developers who want pytest fixtures and token auth patterns for FastAPI in one place

Install fastapi-templates

Claude Code

  1. 1

    Copy this prompt.

    Install the fastapi-templates skill in Claude Code. Run this command:
    
    npx skills add https://github.com/wshobson/agents --skill fastapi-templates
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

Sections in SKILL.md

  1. When to Use This Skill
  2. Core Concepts
  3. 1. Project Structure
  4. 2. Dependency Injection
  5. 3. Async Patterns
  6. 4. Dependencies
  7. Detailed worked examples and patterns
  8. Testing

Key facts

Installs on skills.sh
26,178 (Nov 2, 2026)
Last commit
2026-10-30

What it includes

  • An app/ layout with api, core, models, schemas, services, repositories

    Versioned routes under api/v1, shared settings, security and database code in core, and one main.py entry point.

    Write · Project structure

  • Uses Depends for sessions, auth, shared logic and config

    Uses the dependency system built into FastAPI.

    Dependency injection

  • Async handlers, database calls, background tasks and middleware

    Keeps the whole request path async.

    Async patterns

  • The packages the examples import, with a dev set for tests

    Claude uses this list to write a requirements.txt and requirements-dev.txt. Installing them is a pip step on your machine.

    Runs code · Dependencies list

  • Full app, CRUD repository, service layer, endpoints and auth

    Pattern 5 uses PyJWT and pwdlib with argon2 for password hashing and tokens.

    Write · Worked patterns in details.md

  • pytest-asyncio fixtures with an in-memory SQLite test database

    Overrides the database dependency and calls the app through httpx with an ASGI transport.

    Write · Testing setup

From the official docs

Permissions

Low risk

The skill writes Python source and lists packages to install, which run third-party code on your machine once you install them. Review the generated requirements before you run pip.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It lists packages to install

    SKILL.md has a Dependencies section and details.md has a pip install comment. Pin versions and install them in a virtual environment. github.com

Technical details
Sign-in and keysThe auth pattern generates JWT and password hashing code. Keep real secrets out of source files.
Scopes
  • Writes project files such as app/ modules and tests

  • Lists packages for pip, including fastapi, SQLAlchemy, asyncpg, PyJWT and pwdlib

Questions

What does fastapi-templates do?

It gives Claude a standard layout and code patterns for a new FastAPI service. That includes async routes, dependency injection, repository and service layers, token auth and tests.

How do I install fastapi-templates?

Use the install box above, which installs only this skill. The wshobson/agents README also offers plugin routes, but it says the skills-only installers add a skill without the plugin's agents, commands or hooks.

Which database does it assume?

PostgreSQL through SQLAlchemy 2 async with asyncpg. SKILL.md also mentions MongoDB for async applications, and the tests use in-memory SQLite.

Does it include login and authentication?

Yes. details.md has an authentication and authorization pattern using PyJWT and pwdlib with argon2.

Does it need an API key?

No. SKILL.md lists only Python packages. Your app will need a database URL and its own secrets.

Is it safe?

It is text guidance and a short reference file with no scripts. It leads Claude to write code and a requirements list, so check the packages and versions before you install them.

Information

updated Nov 2, 2026

Repository
wshobson/agents
Folder
plugins/api-scaffolding/skills/fastapi-templates

wshobson/agentsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. fastapi-templates SKILL.md · github.com
  2. fastapi-templates on skills.sh · skills.sh
  3. references/details.md · github.com
  4. github.com · github.com

Updated Nov 2, 2026.