fastapi-init-skill

fastapi-init-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 229 tokens per session (3,245 once invoked), scanned A, original, Apache-2.0.

A tool that creates a complete FastAPI web-service starting point, including database choices, login protection, file uploads, streaming responses, API documentation, and start or restart scripts.

In plain words
What is it for?
Use it to start a FastAPI project with MySQL, PostgreSQL, MongoDB, or no database, plus JWT login, a consistent response format, Swagger documentation, uploads, and development or production startup scripts.
Why use it?
It removes much of the setup work needed before a new Python web service can run.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to start a FastAPI project with MySQL, PostgreSQL, MongoDB, or no database, plus JWT login, a consistent response format, Swagger documentation, uploads, and development or production startup scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiushiwon/wg-skills/fastapi-init-skill
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.

Any agent
npx skills add jiushiwon/wg-skills --skill fastapi-init-skill
Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills

Made for: Claude Code, Codex.

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 fastapi-init-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-init-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-init-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-init-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-init-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fastapi-init-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-init-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-init-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 229 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 133
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 145
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.1 $0.00229 $0.03245
Opus 5 $0.00114 $0.01622
Sonnet 5 $0.00046 $0.00649
Haiku 4.5 $0.00023 $0.00325

Measured 10d ago against content hash 1c0768aa96d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

fastapi-init-skill scanned grade A with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_project.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:8080/api/sse/chat
vibeCoding/backend/python/fastapi-init-skill/SKILL.md · 208 lines

How it starts

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

FastAPI Init Skill

面向完全不懂编程的小白,一键生成标准化、开箱即用的 FastAPI Web 服务骨架。

与 python-backend-skill 的区别

维度 python-backend-skill 本 skill
目标用户 后端开发者 零基础小白
环境安装 用户自己装 自动检测 + 自动安装
启动方式 pip install 后手动 uvicorn **一条命令:`./restart.sh [dev
SSE 支持 内置 SSE 流式框架
文件上传 内置文件上传接口
默认数据库 PostgreSQL MySQL(可选 PG / MongoDB / 无数据库)
脚本 只生成 restart.sh / restart.bat(dev/prod 双模式)
Swagger 有 + 增强注释 + 中文说明
交互次数 多个技术问题 最多 3 个问题
文件数 ~40 ~22

不重复造轮子:统一响应信封、错误码、JWT 规范与 backend-convention-skill 对齐,但模板已内置于本 skill(references/api-contract-template.mdreferences/project-guide-template.md),生成项目不依赖 backend-convention-skill 文件;关系型 DB 配置引用 database-skill;前端联动规范引用 frontend-request-skill。本 skill 在它们之上增加「小白友好」的完整封装。

依赖

  • backend-convention-skill:响应信封 { code, message, data }、错误码(-1001 校验 / -2000 系统)、JWT Bearer、api-contract、project-guide 规范对齐(模板已内置本 skill)
  • database-skill:MySQL / PostgreSQL / MongoDB 选型规则、表前缀 wg、连接参数
  • frontend-request-skill:前端请求层规范,确保后端生成的接口契约可直接被前端消费

核心能力清单(11 项)

# 能力 说明
1 环境探测 自动检测 Python 版本(>=3.9)、pip、操作系统类型
2 自动安装 创建 venv、安装依赖、编译检查
3 一键启动/重启 `./restart.sh [dev
4 开发模式 ./restart.sh dev 热重载,改代码自动重启,日志 logs/dev.log
5 生产模式 ./restart.sh prod 后台多 worker,日志 logs/app.log
6 SSE 流式 内置 sse-starlette,示例端点 /api/sse/chat
7 文件上传 内置 /api/upload 单文件与 /api/uploads 多文件上传
8 统一响应 EnvelopeRoute 自动包装 { code, message, data }
9 全局异常 BusinessException / -1001 校验 / -2000 兜底
10 JWT 鉴权 注册 / 登录 / 刷新令牌 / 当前用户注入
11 安全头 内置 X-Frame-Options / X-Content-Type-Options 等基础安全头

生成流程

第一步:询问用户(只问 3 个问题)

1. 项目名叫什么?(默认 my-fastapi-app)
2. 用哪个数据库?
   A. MySQL(默认,推荐)
   B. PostgreSQL
   C. MongoDB
   D. 暂时不用数据库
3. 是否需要 Redis?(默认不需要)

Read the full file on GitHub · 208 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. 10d ago First seen · 208 lines · 229 tokens per session scan A 1c0768aa96d1

Subscribe to this mod's changes

fastapi-init-skill is a skill published in the GitHub repository jiushiwon/wg-skills (98 stars, last pushed yesterday), licensed Apache-2.0. It adds 229 tokens to every session and 3,245 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens

prisma-next-queries

Write Prisma Next queries for Postgres, SQLite, or Mongo — pick a lane (Postgres/SQLite db.orm. + db.sql. ; Mongo db.orm. + db.query.from(...) pipeline builder), filter / project / sort / paginate, eager-load with .include(...), Postgres/SQLite db.transaction(...), Postgres/SQLite ORM .aggregate(...), Mongo…

prisma/prisma-next · 257 tokens

supabase-firebase

Backend-as-a-Service patterns. Supabase and Firebase for auth, database, storage, and real-time. Use when building apps with BaaS platforms.

hoangatg/ai-agent-toolkit · 36 tokens

ck:backend-development

Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability…

Bek85/claudekit-marketing · 137 tokens

backend-development

Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability…

OpenAnalystInc/10x-Team · 135 tokens

azure-postgres-ts

Connect to Azure Database for PostgreSQL Flexible Server from Node.js/TypeScript using the pg (node-postgres) package. Use for PostgreSQL queries, connection pooling, transactions, and Microsoft Entra ID (passwordless) authentication. Triggers: "PostgreSQL", "postgres", "pg client", "node-postgres", "Azure PostgreSQL…

microsoft/skills · 94 tokens