fastapi-dev
БесплатноБез исполняемых скриптовНе проверенFastAPI engineering choices. To be used when asked to "create router", "create crud router", "add new endpoint" or similar in a fastapi codebase.
от richin13★ 15 звёзд на GitHubОб этом скилле
FastAPI development
- Always define an application factory (
create_app) in<module>/__init__.pyor<module>/main.py(prefer the former). - Import routers in app factory and register them via
app.include_router. Define a helper_register_routersfunction colocated withcreate_app. - Define a custom exceptions module at
<module>/exceptions.pywith a base application error. Then register an exception handler via@app.exception_handler(BaseAppError)to return proper JSON responses. - Ensure pydantic's
RequestValidationErrorandValidationErrorare handled too and transformed to a consistent error response format. - All responses use generic envelope schemas (
APIResponse[T],APIListResponse[T],APIErrorResponse) so the OpenAPI spec surfaces the wrapping. Seereferences/response-schemas.md.
Routers
Routers are thin HTTP boundaries. They handle authentication, authorization, query parameter parsing, and response shaping, nothing else. Business logic lives in plain functions called "operations".
- Common dependencies are declared as annotated aliases, e.g:
UseDBSession = t.Annotated[Session, Depends(get_db_session)]— SQLAlchemy sessionUseSettings = t.Annotated[Settings, Depends(get_settings)]— Pydantic settings object
- Cross-cutting request context is bundled into a single
AppContextdataclass injected viaDepends. Adding new cross-cutting concerns (e.g. request ID) means updating the dataclass and its factory, not every operation signature. - Follow the naming pattern
UseX. If routers start to have many different dependencies, refactor the most common ones to aUseAppContext.
Operations
Operations are plain functions (or coroutines) that receive:
ctx: AppContextas the first argument (orsessionandsettings)- Input data (validated Pydantic schemas) as keyword arguments
They handle business logic and external service calls.
Testing
- Override individual dependencies via
app.dependency_overrides - Operations are tested by calling them directly with a constructed
AppContext
Установить fastapi-dev в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fastapi-dev?
FastAPI engineering choices. To be used when asked to "create router", "create crud router", "add new endpoint" or similar in a fastapi codebase.
Как установить скилл fastapi-dev?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fastapi-dev запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic