fastapi-auth-module-skill

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

A FastAPI add-on for company organization structures and access control. It includes tenants, departments, positions, users, roles, menus, and data permissions; RBAC means access is assigned through roles.

In plain words
What is it for?
Use it to add departments and positions, connect users to roles, control menus and API actions, isolate tenant data, and limit records to all data, a department, subordinate departments, or the current user.
Why use it?
It avoids separately implementing multi-organization access rules, role assignments, and limits on which records each user can view.

Skill for Claude CodeCodex

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

Good fit Use it to add departments and positions, connect users to roles, control menus and API actions, isolate tenant data, and limit records to all data, a department, subordinate departments, or the current user.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-auth-module-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-auth-module-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,058 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00114 $0.02058
Opus 5 $0.00057 $0.01029
Sonnet 5 $0.00023 $0.00412
Haiku 4.5 $0.00011 $0.00206

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

Security

Grade A, and why

fastapi-auth-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 9d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (references/dependencies.py, references/routers/menus.py, references/routers/orgs.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.

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.

vibeCoding/backend/python/fastapi-module/fastapi-auth-module-skill/SKILL.md · 162 lines

How it starts

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

FastAPI Auth Module Skill

为 FastAPI 项目叠加一套企业级授权与组织架构能力,不是重新生成新项目。

定位

  • 目标:在已有 fastapi-init-skill 骨架上,添加可运行的 RBAC + 组织架构模块。
  • 不替代:不重复生成 fastapi-init-skill 已经提供的 JWT、统一响应、SQLModel 等基础设施。
  • 输出:模型、仓储、服务、路由、数据库迁移、接口契约、接入指南。

骨架依赖(子模块)

本模块是 fastapi-init-skill 的子模块,必须在骨架基础上使用。

使用前必须满足以下条件:

  1. ✅ 已安装 fastapi-init-skill(项目骨架)
  2. ✅ 骨架包含:JWT、统一响应、SQLModel、分页、目录结构
  3. ✅ 遵循骨架的表前缀、字段命名、软删除规范

检测逻辑:

  1. 读取用户项目根目录 SKILL.mdREADME.md
  2. 检测是否包含 fastapi-init-skill 相关内容
  3. 如未检测到骨架,提示:"本模块需要先安装 fastapi-init-skill 骨架"
  4. 如用户拒绝安装骨架,则终止并提示无法使用

用户问题(最多 3 个)

1. 现有项目的包名是什么?(默认从 fastapi-init-skill 推断,如 app)
2. 表前缀是什么?(默认 wg)
3. 是否需要数据权限(全部 / 本部门 / 本部门及以下 / 仅本人)?(默认需要)

核心能力清单

# 能力 说明
1 租户(Tenant) 多租户数据隔离,支持独立组织架构
2 组织架构(Org) 树形部门,支持 parent_id 递归
3 岗位(Post) 用户可绑定一个或多个岗位
4 用户(SysUser) 扩展基础 User,关联租户、部门、岗位、角色
5 角色(Role) RBAC 核心,支持数据权限范围
6 菜单/权限(Menu) 树形菜单 + 权限标识(permission),用于前端路由与按钮级鉴权
7 角色-菜单绑定 多对多,控制角色可见菜单与接口权限
8 用户-角色绑定 多对多,一个用户可拥有多个角色
9 数据权限 按角色数据范围过滤:全部、本部门、本部门及以下、仅本人
10 个人鉴权 登录 / 登出 / 修改密码 / 当前用户详情 / 获取菜单树
11 接口契约 生成 api-contract-auth.md,与前端对齐

生成的模块结构

src/
├── auth/
│   ├── __init__.py
│   ├── constants.py              # 权限常量
│   ├── enums.py                 # 数据权限枚举
│   ├── dependencies.py          # 权限校验依赖
│   ├── schemas.py               # Pydantic schemas
│   ├── models.py                # SQLModel 模型
│   ├── routers/
│   │   ├── __init__.py
│   │   ├── auth.py              # 登录 / 登出 / 当前用户 / 菜单树
│   │   ├── users.py             # 用户 CRUD + 绑定角色/岗位
│   │   ├── roles.py             # 角色 CRUD + 绑定菜单
│   │   ├── menus.py             # 菜单树 CRUD
│   │   ├── orgs.py              # 组织架构树 CRUD
│   │   ├── posts.py             # 岗位 CRUD
│   │   └── tenants.py           # 租户 CRUD
│   └── services/
│       ├── __init__.py
│       ├── auth_service.py       # 认证服务
│       ├── user_service.py       # 用户服务
│       ├── role_service.py       # 角色服务
│       ├── menu_service.py       # 菜单服务
│       ├── org_service.py       # 组织架构服务
│       ├── post_service.py      # 岗位服务
│       ├── tenant_service.py    # 租户服务
│       └── data_scope.py        # 数据权限过滤

alembic/versions/auth_module.py   # 迁移文件

api-contract-auth.md              # 接口契约
docs/auth-module-guide.md         # 接入与扩展指南

Read the full file on GitHub · 162 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. 9d ago First seen · 162 lines · 114 tokens per session scan A 324abdb6c353

Subscribe to this mod's changes

fastapi-auth-module-skill is a skill published in the GitHub repository jiushiwon/wg-skills (97 stars, last pushed 2d ago), licensed Apache-2.0. It adds 114 tokens to every session and 2,058 once invoked, about $0.0006 per session on Opus 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.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

fastapi-router-py

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

microsoft/skills · 46 tokens

migrate-segw-to-rap

Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…

arc-mcp/arc-1 · 106 tokens

telnyx-messaging-hosted-curl

Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.

team-telnyx/ai · 45 tokens