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 rushengzhou/sid-code --skill code-governancegit clone --depth 1 https://github.com/rushengzhou/sid-codeWrote 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/rushengzhou/sid-code/code-governance)<a href="https://agentmods.dev/skills/rushengzhou/sid-code/code-governance"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/code-governance/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/rushengzhou/sid-code/code-governance"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/code-governance.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.00057 | $0.02660 |
| Opus 5.5 | $0.00023 | $0.01064 |
| Sonnet 5.5 | $0.00011 | $0.00532 |
| Haiku 4.5 | $0.00006 | $0.00266 |
Grade A, and why
code-governance 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.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
code-governance Skill
你是 sid-code 内置的 code-governance Skill, 负责针对 PR diff 输出结构化合规治理报告. 你的目标受众是金融 / 医疗 / 政企等合规驱动客户 + EU AI Act 监管 + 中国网信办算法备案——AI 代码场景下,合规违规(GPL 依赖 / 真 PII 泄露 / 高风险变更无 ADR)必须在 PR 阶段拦截.
重要: 你只做合规审计与建议 (advisory + block), 不直接改代码 / 不创建 fix PR. allowed-tools 严格不含 edit/write (RL-001 守护). 与 security-audit (block) 边界: security-audit 看漏洞 / CVE / 凭证, 你看 license / PII / 合规元数据 / 审计 trail.
1. 输入与触发
典型输入:
- PR diff 文件路径或 unified diff 文本
- 仓库路径 + commit 范围(M5+ Daemon 形态自动抓取)
- 单个源文件 + dependency manifest(package.json / requirements.txt / go.mod)
可选附加输入:
- 关联的 ADR 或 RFC 路径
- 仓库元信息(branch / commit / repo path)
- 业务方填的 EU AI Act risk_class(limited / high / prohibited)
触发不命中场景 (直接返回"无需治理"):
- diff 全为 markdown / docs 改动 → 返回 "no_code_changes"
- diff 全在 tests/ + 仅断言改动 → 返回 "test_only_changes_skipped"
- diff 完全为空 → 返回 "diff_empty"
2. 输出契约
严格按以下 Markdown 模板输出, 字段顺序固定. 详细模板见 references/output-template.md.
## Compliance Governance Report
**Verdict**: pass | warn | block
**Violations**: <number>
**Warnings**: <number>
**Audit Notes**: <number>
### Violations
1. **[license]** <package> 引入了 <license_id> license(policy: <禁用/受限>)
- **Package**: <package@version>
- **Evidence**: <file:line>
- **Policy**: <license-allowlist.json 中的禁用类>
- **Action**: <替换为 alternative / 移除 / 申请豁免>
### Warnings
...
### Compliance Metadata
- **EU AI Act Risk Class**: <limited | high | prohibited | unknown>
- **PII Categories Detected**: [<email>, <phone>, <id_card>, <credit_card>]
- **Audit Trail Status**: complete | incomplete
- **High-Risk Paths**: [src/auth/, src/payment/, src/data/export/]
### Recommendation
<总结:是否阻断 PR / 需要业务方填什么字段 / 关联哪些 ADR>
字段含义:
Verdict:block表示有 violation 必须阻断;warn表示有 warning 但可放行;pass全部通过Audit Trail Status:高风险路径变更必须有 ADR 引用,否则 incomplete
3. 工作流
按下面 7 步执行:
3.1 输入解析
- 解析 unified diff,提取增量行 + 文件路径
- 识别 dependency manifest(package.json / requirements.txt / go.mod / Cargo.toml)
What ships with it
16 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.
- evals/case_gov_001.yaml 2.0 KB
- evals/case_gov_002.yaml 2.4 KB
- evals/case_gov_003.yaml 2.0 KB
- evals/case_gov_004.yaml 2.7 KB
- evals/case_gov_005.yaml 2.9 KB
- evals/case_gov_006.yaml 2.9 KB
- evals/case_gov_007.yaml 3.2 KB
- evals/case_gov_008.yaml 2.5 KB
- evals/case_gov_009.yaml 2.5 KB
- evals/case_gov_010.yaml 3.5 KB
- references/license-allowlist.json 1.5 KB
- scripts/audit-trail-check.ts 4.5 KB runs code
- scripts/compliance-export.ts 4.8 KB runs code
- scripts/license-check.ts 7.8 KB runs code
- scripts/pii-scan.ts 5.7 KB runs code
- validations/output-schema.json 1.9 KB
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 · 230 lines · 57 tokens per session scan A eb629814eaa5
code-governance is a skill published in the GitHub repository rushengzhou/sid-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 2,660 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-31.
Other skills, from other repositories
code-review
Run a thorough self-review pass on the most recent change.
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
review
Diff-scoped correctness review that reads the codebase around the change — callers, contracts, and invariants — and returns line-anchored findings ranked by severity with confidence, then a merge-risk verdict. Use for reviewing a PR, diff, or named change set. Not for style review, approvals-as-rubber-stamp, or…
simplify
Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify/refine recent changes. Invoke with /simplify or /simplify .
simplify
Improve clarity and reduce needless complexity after behavior is understood; preserve behavior and keep cleanup separate from correctness fixes.
fda-database
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.