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.
npx skills add nongjun/feishu-cursor-claw --skill fastapi-commongit clone --depth 1 https://github.com/nongjun/feishu-cursor-clawWrote 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.
[](https://agentmods.dev/skills/nongjun/feishu-cursor-claw/fastapi-common)<a href="https://agentmods.dev/skills/nongjun/feishu-cursor-claw/fastapi-common"><img src="https://agentmods.dev/badge/skills/nongjun/feishu-cursor-claw/fastapi-common/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.
<a href="https://agentmods.dev/skills/nongjun/feishu-cursor-claw/fastapi-common"><img src="https://agentmods.dev/badge/skills/nongjun/feishu-cursor-claw/fastapi-common.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.00509 |
| Opus 5.5 | $0.00019 | $0.00204 |
| Sonnet 5.5 | $0.00010 | $0.00102 |
| Haiku 4.5 | $0.00005 | $0.00051 |
Grade A, and why
fastapi-common 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 1mo ago.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- FastAPI基础设施 — 97% identical, 2 lines differ
What it actually says
FastAPI 公共基础设施
模块一览
| 模块 | 导入路径 | 功能 |
|---|---|---|
| CORS | shared_backend.middleware.cors | 跨域配置(开发/生产自动切换) |
| 异常处理 | shared_backend.middleware.exception_handler | 统一错误格式 |
| 请求日志 | shared_backend.middleware.request_logging | 耗时记录、慢请求告警 |
| 响应格式 | shared_backend.middleware.response | 标准化 API 返回 |
统一响应格式
- 成功:{ code: 0, message: "success", data: ... }
- 错误:{ code: 错误码, message: "描述", data: null }
- 分页:{ code: 0, data: { list: [...], total, page, page_size } }
所有异常统一返回 HTTP 200,通过 code 字段区分错误类型。
关键函数
| 函数 | 用途 |
|---|---|
| setup_cors(app, app_env) | 配置 CORS(开发允许所有,生产限域名) |
| setup_exception_handlers(app) | 注册全局异常处理 |
| RequestLoggingMiddleware | 请求日志中间件(慢请求阈值 3s) |
| success_response() | 包装成功响应 |
| error_response() | 包装错误响应 |
| paginated_response() | 包装分页响应 |
| paginate_query() | SQLAlchemy 查询分页 |
| APIException | 自定义业务异常 |
| NotFoundException | 404 异常 |
SOP:新建后端模块
- 创建 FastAPI 应用
- 调用 setup_cors()、setup_exception_handlers()
- 添加 RequestLoggingMiddleware
- 路由中使用 success_response() / paginated_response() 返回数据
- 业务异常抛出 APIException
参考文件
- 公共模块/shared_backend/middleware/cors.py
- 公共模块/shared_backend/middleware/exception_handler.py
- 公共模块/shared_backend/middleware/request_logging.py
- 公共模块/shared_backend/middleware/response.py
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.
- 1mo ago First seen · 53 lines · 48 tokens per session scan A d244056e693a
fastapi-common is a skill published in the GitHub repository nongjun/feishu-cursor-claw (14 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 509 once invoked, about $0.0002 per session on Opus 5.5. 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-08-30.
Other skills, from other repositories
python-dev
Python backend conventions for this project. Use when implementing or modifying API endpoints, database models/migrations, services, schemas, or backend tests.
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-async-microservices
Design and develop production-grade asynchronous microservices using FastAPI, Python 3.12+, Pydantic v2 Settings and Schemas, SQLAlchemy 2.0 async sessions, dependency injection, lifespan state management, structured JSON logging, and connection pooling. Trigger when building async Python APIs, microservices, or…
django
Expert Django assistance covering ORM, models, class-based views, admin interface, migrations, and Django REST Framework. Use when developing robust, scalable Python web applications and REST APIs.
fastapi
Expert FastAPI assistance covering Pydantic models, async endpoints, dependency injection, and OpenAPI generation. Use when developing high-performance Python REST APIs and microservices.
flask
Expert Flask assistance covering Blueprints, application factories, Jinja2 templating, and SQLAlchemy extensions. Use when developing lightweight Python web services and applications.