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 jiushiwon/wg-skills --skill go-auth-module-skillgit clone --depth 1 https://github.com/jiushiwon/wg-skillsWrote 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/jiushiwon/wg-skills/go-auth-module-skill)<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/go-auth-module-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/go-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.
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/go-auth-module-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/go-auth-module-skill.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.00189 | $0.04259 |
| Opus 5.5 | $0.00076 | $0.01704 |
| Sonnet 5.5 | $0.00038 | $0.00852 |
| Haiku 4.5 | $0.00019 | $0.00426 |
Grade A, and why
go-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 24d 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.
How it starts
The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Auth Module Skill
在 go-gin-init-skill 生成的项目上叠加权限底座:RBAC + 组织架构 + 通用登录。
契约与 Java springboot-auth-module-skill / vue-admin-skill 逐字对齐,因此同一套前端可以
在「Java 后端」和「Go 后端」之间零改动切换——前端不用动一行代码,直接桥接。
已验证的落地实现见
go-auth-admin仓库(Go 复刻 java-vue-admin 后台,21 项端到端冒烟全绿)。
依赖
- go-gin-init-skill:基础骨架(响应信封 / 错误码 / JWT / 启动脚本),本 skill 在其之上叠加
- database-design-skill:表前缀
wg、字段与索引规范 - frontend-request-skill:响应信封、错误码、Token 与前端消费契约
- crypto-scenario-skill:密码创建、校验、修改或迁移必须遵循其密码存储规范;不得自行选择或实现密码哈希算法
核心能力清单(9 项)
| # | 能力 | 说明 |
|---|---|---|
| 1 | RBAC | 用户 / 角色 / 菜单(目录 M、页面 C、按钮 F)/ 组织 / 岗位 / 租户 |
| 2 | 三段式权限码 | 模块:资源:动作,39 个常量唯一源(34 个有菜单 + 5 个无菜单),DB permission 列与前端 v-permission 逐字一致 |
| 3 | super_admin 双路径 | 鉴权短路全量常量(39),me() 走 DB 派生(34)—— 见红线 1 |
| 4 | 四档数据权限 | ALL / DEPT_AND_BELOW / DEPT_ONLY / SELF_ONLY,多角色取最宽 |
| 5 | 菜单树 | 单表树形 parent_id 递归,含按钮级权限节点 |
| 6 | 通用登录(universal-login) | 第三方应用 App + 密钥 AppKey + 绑定 AppBinding + 绑定码 BindCode |
| 7 | 开放接口应用签名 | /api/open/** 用 HmacSHA256 鉴权,300s 时间偏差、常量时间比较 |
| 8 | 绑定双向流程 | 应用发起(app_initiated)/ 宿主发起(user_initiated),绑定码一次性消费 |
| 9 | 零环境依赖 | 默认 glebarez/sqlite(纯 Go,CGO_ENABLED=0),无需安装数据库 |
★ 契约红线(本 skill 最值钱的部分,全是踩过的坑)
1. 两个权限解析路径故意不同,别合并
| 场景 | 数据来源 | super_admin 结果 |
|---|---|---|
GET /api/auth/me(前端权限数组) |
DB 派生:role_menu → menu.permission |
34(真实菜单权限:8 页面级 + 26 按钮级) |
鉴权中间件 RequirePerm(等价 @PreAuthorize) |
DB 派生 ∪ 全量常量(super_admin 短路) | 39(34 + 5 个无菜单的:4 个 system:tenant:* + system:api:view) |
对应 Java 的 AuthorityLoader.permissions() 与 JwtAuthenticationFilter 反射短路两条路径。
不要把 me() 也短路成 39——否则前端拿到的权限数组就和 Java 不一致了。
⚠️ 数量会变:39 里有 5 个「无菜单权限」(4 个
system:tenant:*+system:api:view)。 新增无菜单权限时常量集会增长,但me()的 34 只跟种子菜单走,不受影响。 别把这两个数字写死在文档里不复核 —— 曾因新增system:api:view后技能仍写 38 而产生偏差。
2. 目录菜单的 permission 必须存 NULL,不能存 ""
- 装载权限的 SQL 是
permission IS NOT NULL,而空串不是 NULL,会被当成有效权限带进权限数组 - 实测后果:super_admin 的
me()返回 37(34 真实 + 3 个空串),且菜单树里目录的permission是""而不是null(与 Java 不一致) - 修法:模型字段用
*string,落库前把空串转nil(strPtr辅助函数)
What ships with it
5 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.
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.
- 24d ago Changed · +1 lines 99dd492392c2
- 1mo ago Changed · +4 lines dd5d6dced950
- 1mo ago Changed · +62 lines a9a0c87d8077
- 1mo ago First seen · 170 lines · 189 tokens per session scan A 369c27475184
go-auth-module-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 189 tokens to every session and 4,259 once invoked, about $0.0008 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-10-05.
go-auth-module-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-auth-module-skilljiushiwon/wg-skills | Skill | 154 | 7d ago | Apache-2.0 | A | 189 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 4d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 691 | 6d ago | MIT | A | 105 | Claude Code, Codex |