AdYour product here, seen by people installing AI tools every day

fastapi-templates

Skill by wshobson · updated · ★ 42k

Score 94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects. fastapi-templates is published by wshobson on GitHub.

Yours? Claim it
Works withClaude CodeClaude apps Antigravity CLI

Install fastapi-templates

Built from the published package, never by AI
git clone --depth 1 https://github.com/wshobson/agents /tmp/agents && mkdir -p ~/.claude/skills && cp -r /tmp/agents/plugins/api-scaffolding/skills/fastapi-templates ~/.claude/skills/fastapi-templates

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install fastapi-templates in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

Maintenance

Last commit in the past day

Licence

MIT: permissive, fine for commercial use

Quality

Clear description, installs from GitHub, 41,623 stars, original repository

Security

No risky patterns in the files we checked

About fastapi-templates

This skill gives an AI assistant guidance for building new FastAPI projects. It proposes a recommended layout with separate folders for API routes, core configuration, models, Pydantic schemas, services, and repositories. It also covers FastAPI's built-in dependency injection through Depends, along with async route handlers, async database operations, and async background tasks.

The skill lists the packages its examples use, including fastapi, uvicorn, pydantic-settings, SQLAlchemy with asyncio, asyncpg for PostgreSQL, and PyJWT. It includes a pytest setup that uses pytest-asyncio, httpx, and an in-memory SQLite test database with dependency overrides. It is aimed at developers who want a structured starting point for async Python web APIs.

Written from the project's SKILL.md and checked against it.

What fastapi-templates can do

  • Project structureSuggests a recommended folder layout for a FastAPI app with routes, services, and repositories.
  • Dependency injectionUses FastAPI's Depends for database sessions, authentication, and shared logic.
  • Async patternsCovers async route handlers, async database operations, background tasks, and middleware.
  • Dependency listLists the pip packages used in the examples, with notes on PostgreSQL and login support.
  • Async test setupProvides pytest fixtures with an async client and a dependency override for the database.

What you need

  • Python with pip
  • Packages from requirements.txt and requirements-dev.txt
  • PostgreSQL, if using the asyncpg driver example

Weekly newsletter

Like fastapi-templates? Get the best new skills every week

The best new tools, security warnings before you install something risky, and one practical tip. Free, three minute read.

No spam. Unsubscribe in one click. Privacy

Try asking

  • Set up a new FastAPI project with async SQLAlchemy and a users router
  • Show me how to inject a database session into FastAPI routes with Depends
  • Create pytest-asyncio tests for a FastAPI endpoint using httpx

Good to know

  • Detailed worked examples are in references/details.md, which is not included in the text shown here
  • The test example uses an in-memory SQLite database rather than PostgreSQL

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/api-scaffolding/skills/fastapi-templates/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md4 KB
  • references/details.md13 KB

Alternatives to fastapi-templates

All alternatives →

fastapi-templates: common questions

What does the FastAPI templates skill set up?

It describes a recommended FastAPI project layout with routes, core config, models, schemas, services, and repositories. It also gives requirements files and a sample async test setup.

Which database drivers does it use in its examples?

The examples use asyncpg for PostgreSQL with a postgresql+asyncpg URL, and aiosqlite for an in-memory SQLite test database.

How does it handle testing of async endpoints?

It uses pytest-asyncio fixtures, an httpx AsyncClient with an ASGI transport, and app.dependency_overrides to swap in a test database session.

How do I install fastapi-templates?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is fastapi-templates free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is fastapi-templates safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to fastapi-templates?

Similar skills: openclaw-github-repo-commander, gradio, replica-launch, e2e-testing-patterns.

Add to stack

Loading.