Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

FastAPI patterns: middleware and authentication v1.0.0

Use this resource to configure the middleware, dependencies and WebSockets of a FastAPI application

New

  • 596 downloads
  • 110 likes
  • 208 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install fastapi-middleware-and-auth

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent sets up FastAPI's advanced mechanisms: middleware stack, CORS, dependency chains, JWT authentication and role checks, WebSockets, background tasks and lifecycle (startup and shutdown). Basic CRUD work is covered by other skills.

Mostly picked by

Updated November 2, 2026

Card for the “FastAPI patterns: middleware and authentication” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • references/middleware-examples.md : middleware and CORS examples
  • references/dependency-injection-patterns.md : dependency chains and authentication

Good fit for

  • Your API must accept one specific front-end origin through CORS
  • You are adding JWT authentication with roles

Not for

    Tags

    • fastapi
    • middleware
    • authentication
    • websocket

    About

    You say

    “Add a JWT check and an admin role check to my FastAPI routes.”

    Card for the “FastAPI patterns: middleware and authentication” skill

    Skill published by hieutrtr under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to configure the middleware, dependencies and WebSockets of a FastAPI application
    3. Review and adjust the result

    Content preview

    Files

    • LICENSE1.3 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • references/dependency-injection-patterns.md7.9 KB
    • references/middleware-examples.md6.7 KB
    • SKILL.md13 KB

    Origin and licence

    Listed unmodified

    Author
    hieutrtr
    Source
    github.com/hieutrtr/ai1-skills/tree/d8244c1acdb4e4fac55de84dd49887e91bf7b941/skills/fastapi-patterns
    Licence
    MIT

    Notice

    « fastapi-patterns » (hieutrtr, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.