fastapi-log-module-skill

fastapi-log-module-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 76 tokens per session (532 once invoked), scanned A, original, Apache-2.0.

A FastAPI add-on for recording user and system activity. It keeps operation logs, login and logout logs, sensitive-action audit trails, and searchable log records.

In plain words
What is it for?
Use it to record user operations and login events, audit sensitive actions, and query or export logs with pagination.
Why use it?
It provides a structured history of who did what and when, rather than leaving activity scattered across application output. This helps investigate actions and review sensitive changes.

Skill for Claude CodeCodex

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

Good fit Use it to record user operations and login events, audit sensitive actions, and query or export logs with pagination.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-log-module-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-log-module-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-log-module-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-log-module-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-log-module-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-log-module-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-log-module-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 532 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00076 $0.00532
Opus 5.5 $0.00030 $0.00213
Sonnet 5.5 $0.00015 $0.00106
Haiku 4.5 $0.00008 $0.00053

Measured 2mo ago against content hash 179e00b166da, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fastapi-log-module-skill 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 2mo 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.

backend/python/fastapi-module/fastapi-log-module-skill/SKILL.md · 64 lines

What it actually says

FastAPI Log Module Skill

面向已有 FastAPI 项目的开发者,快速集成日志和审计能力。

能力清单

能力 说明
操作日志 记录用户操作
登录日志 记录登录登出
审计追踪 敏感操作审计
日志查询 分页查询、导出

数据模型

class OperationLog(Base):
    __tablename__ = "wg_operation_log"
    
    id = Column(BigInteger, primary_key=True)
    user_id = Column(BigInteger)
    username = Column(String(50))
    module = Column(String(50))  # 模块
    operation = Column(String(50))  # 操作
    method = Column(String(10))  # 请求方法
    path = Column(String(255))  # 请求路径
    params = Column(Text)  # 请求参数
    result = Column(Text)  # 返回结果
    ip = Column(String(50))  # IP 地址
    location = Column(String(255))  # 地理位置
    duration = Column(Integer)  # 耗时 ms
    created_at = Column(DateTime)

class LoginLog(Base):
    __tablename__ = "wg_login_log"
    
    id = Column(BigInteger, primary_key=True)
    user_id = Column(BigInteger)
    username = Column(String(50))
    status = Column(Integer)  # 1成功 0失败
    ip = Column(String(50))
    location = Column(String(255))
    user_agent = Column(String(500))
    message = Column(String(255))
    created_at = Column(DateTime)

API 接口

方法 路径 说明
GET /api/log/operation/list 操作日志列表
GET /api/log/login/list 登录日志列表

不做

  • 不负责日志存储(业务层自行选择)
  • 不处理日志分析(ELK 等专门工具)
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 64 lines · 76 tokens per session scan A 179e00b166da

Subscribe to this mod's changes

fastapi-log-module-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 6d ago), licensed Apache-2.0. It adds 76 tokens to every session and 532 once invoked, about $0.0003 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-09-15.

Related

fastapi-log-module-skill compared with skills from other repositories

fastapi-log-module-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fastapi-log-module-skilljiushiwon/wg-skillsSkill1546d agoApache-2.0A76Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70k3d agoApache-2.0A217Claude Code, Codex
tao-run-inference-serviceNVIDIA/skillsSkill4.2ktodayApache-2.0A92Claude Code
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.3kyesterdayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.3kyesterdayMITA46Claude Code
dev-runtimelangwatch/langwatchSkill5.1ktodayApache-2.0A172Claude Code
api-designericrisco/rsc-harnessSkill6915d agoMITA105Claude Code, Codex