skill-fastapi-api

skill-fastapi-api is a command for Claude Code from dewtech-technologies/dare-method. It costs 0 tokens per session (1,406 once invoked), scanned A, original, MIT.

A set of coding patterns for building REST APIs in Python with FastAPI, Pydantic, and asynchronous SQLAlchemy. It includes common structures for routes, services, database access, authentication, rate limits, tests, and API documentation.

In plain words
What is it for?
Use it to review a FastAPI project or scaffold features such as user routes, services, repositories, schemas, validation, and database migrations.
Why use it?
It gives an agent a consistent way to audit or scaffold FastAPI code instead of assembling the project structure from scratch.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dewtech-technologies/dare-method/skill-fastapi-api
Clone the repo
git clone --depth 1 https://github.com/dewtech-technologies/dare-method

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for skill-fastapi-api

README.md
[![agentmods](https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/skill-fastapi-api.svg)](https://agentmods.dev/commands/dewtech-technologies/dare-method/skill-fastapi-api)
Your own site
<a href="https://agentmods.dev/commands/dewtech-technologies/dare-method/skill-fastapi-api"><img src="https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/skill-fastapi-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01406
Opus 5 $0.00000 $0.00703
Sonnet 5 $0.00000 $0.00281
Haiku 4.5 $0.00000 $0.00141

Measured yesterday against content hash fb65677e3fea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-fastapi-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

implementations/claude/.claude/commands/skill-fastapi-api.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/skill-fastapi-api

Padrões DARE para APIs REST em Python + FastAPI + Pydantic v2 + SQLAlchemy 2.0 async. Routers, dependency injection, schemas Pydantic, OAuth2+JWT, slowapi rate limit, pytest+httpx, OpenAPI auto-gerado.

Como usar

/skill-fastapi-api                          # audita projeto FastAPI
/skill-fastapi-api scaffold users           # gera router + service + repo + schemas
/skill-fastapi-api migrate-validation       # extrai validação manual para Pydantic

Stack canônica

  • Python 3.11+ com type hints obrigatórios
  • FastAPI 0.115+ (async/await)
  • Pydantic v2
  • SQLAlchemy 2.0 async + asyncpg
  • alembic (migrations)
  • passlib + argon2
  • python-jose ou PyJWT
  • slowapi (rate limit)
  • pytest + pytest-asyncio + httpx
  • ruff + mypy

Estrutura

app/
├── main.py
├── core/{config.py, security.py}
├── api/{deps.py, v1/{users.py, auth.py}}
├── services/
├── repositories/
├── models/        ← SQLAlchemy ORM
├── schemas/       ← Pydantic DTOs
└── tests/

Router (Handler)

@router.post("/users", response_model=UserOut, status_code=201)
async def create_user(
    payload: UserCreate,
    service: RegisterUser = Depends(),
    _current: User = Depends(get_current_user),
):
    try:
        return await service.execute(payload)
    except UserAlreadyExistsError:
        raise HTTPException(409, "User already exists")

Schemas (Pydantic v2)

class UserCreate(BaseModel):
    email: EmailStr
    name: str = Field(min_length=1, max_length=255)
    password: str = Field(min_length=12)

class UserOut(BaseModel):
    id: int
    email: EmailStr
    name: str
    created_at: datetime
    model_config = {"from_attributes": True}

Service

class RegisterUser:
    def __init__(self, repo: UsersRepository = Depends()):
        self.repo = repo

    async def execute(self, payload: UserCreate) -> User:
        if await self.repo.exists_by_email(payload.email):
            raise UserAlreadyExistsError()
        return await self.repo.create(
            email=payload.email,
            name=payload.name,
            password_hash=hash_password(payload.password),
        )

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 206 lines · 0 tokens per session scan A fb65677e3fea

Subscribe to this mod's changes

skill-fastapi-api is a command published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,406 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.