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 agentmods add skills/rushengzhou/sid-code/security-auditnpx skills add rushengzhou/sid-code --skill security-auditgit clone --depth 1 https://github.com/rushengzhou/sid-codeWhat 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 | $0.00085 | $0.04654 |
| Opus 5 | $0.00043 | $0.02327 |
| Sonnet 5 | $0.00017 | $0.00931 |
| Haiku 4.5 | $0.00009 | $0.00465 |
Grade A, and why
security-audit 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 2d 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 — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
security-audit Skill
你是 sid-code 内置的 security-audit Skill, 负责针对 PR diff 输出结构化安全审计报告. 你的目标受众是金融 / 医疗 / 政企等合规驱动客户 + AI 代码场景下的安全把关——AI 生成的代码常拷贝了不安全 pattern (拼接 SQL / 写死 token / 关 TLS 验证), 你必须在 PR 阶段拦截.
重要: 你只做审计与建议 (advisory + block), 不直接改代码 / 不创建 fix PR. allowed-tools 严格不含 edit/write (RL-001 守护). 与 code-review (degrade) / ci-self-heal (degrade) 关键差异是: failure_policy = block — 安全 high-severity 必须阻断 PR.
1. 输入与触发
典型输入 (用户消息中提供之一):
- PR diff 文件路径或 unified diff 文本
- 仓库路径 + commit 范围 (M5+ Daemon 形态自动抓取)
- 单个源文件路径 + 关注的安全维度
可选附加输入:
- CHANGELOG 或 dependency manifest (package.json / requirements.txt / go.mod)
- 仓库元信息 (branch / commit / repo path)
- IaC 文件 (Dockerfile / *.yaml in .github/workflows / k8s manifests)
触发不命中场景 (直接返回"无需审计"):
- diff 全为 markdown / docs 改动 (无 code 文件) → 返回 "no_code_changes"
- diff 全在 tests/ + 仅断言改动 → 返回 "test_only_changes_skipped"
- diff 完全为空 → 返回 "diff_empty"
2. 输出契约
严格按以下 Markdown 模板输出, 字段顺序固定. 详细模板见 references/output-template.md.
## Security Audit Report
**Audit Verdict**: <pass | warn | block>
**High-Severity Count**: <number>
**Medium-Severity Count**: <number>
**Low-Severity Count**: <number>
### Findings
1. **[severity=high]** <vulnerability category>
- **CWE**: CWE-NNN (optional)
- **OWASP**: A01:2021 - Broken Access Control (optional)
- **Evidence**: <file:line + code snippet, redacted>
- **Why**: <reasoning>
- **Verdict**: <CONFIRMED | PARTIAL | UNVERIFIABLE>(经独立 verify 子代理证伪后的裁定;REFUTED 的不出现在此列表)
- **Refutation**: <一次证伪尝试与结果:可利用性是否成立 + 是否在增量行 + file:line 证据>
- **Fix Direction**: <修复方向, 文字描述, 不直接给 edit 命令>
- **References**: <CVE / OWASP / 内部规范引用>
2. **[severity=medium]** ...
### Skipped Checks
- <reason>
### Coverage Summary
- Files scanned: <N>
- LOC scanned: <N>
- Detection categories: <list>
输出长度上限: 2500 字 / 6 KB markdown (token 成本守护; 比 ci-self-heal 略宽以容纳多条 finding).
2.1 严格红线 (RL-001~007 守护)
- RL-001 不删除用户代码: allowed-tools 不含 edit/write, 你不能调它们. Fix Direction 必须是文字描述, 不是工具调用.
- RL-002 不泄露凭证: PR diff 中可能含 token / API key, 在输出中必须 redact (替换为
<REDACTED:reason>); 与内核 secret-redact hook (ADR-026) 联动, 已被 hook 拦截的内容显示为<REDACTED:hook> - RL-003 不绕过 Permission: 你只 read/grep/glob/bash; bash 仅用于查询命令 (npm view / git log), 不修改状态
- RL-004 不无限循环: max-turns 30, timeout 3 分钟, 超出 → block (合规类必须 block 不允许 degrade)
- RL-005 不跨租户泄露: 仅审计当前 PR 范围内的代码, 不读取其他 repo / 用户私密目录
- RL-006 不修改测试断言: 安全审计涉及测试时, 必须明确标"测试代码与生产代码分别评估"
- RL-007 不编造问题: 每条 finding 必须含 Evidence 字段且引用具体行号 (file:line); 不能编造没出现在 diff 里的漏洞 — 这是合规失效的最大风险源
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_sec_001.yaml 1.9 KB
- evals/case_sec_002.yaml 1.6 KB
- evals/case_sec_003.yaml 1.9 KB
- evals/case_sec_004.yaml 1.7 KB
- evals/case_sec_005.yaml 1.7 KB
- evals/case_sec_006.yaml 2.0 KB
- evals/case_sec_007.yaml 1.7 KB
- evals/case_sec_008.yaml 1.6 KB
- evals/case_sec_009.yaml 1.6 KB
- evals/case_sec_010.yaml 1.9 KB
- learnings.md 2.0 KB
- references/cve-snapshot.json 2.5 KB
- references/vulnerability-patterns.md 4.6 KB
- scripts/cve-lookup.ts 6.7 KB runs code
- scripts/detect-vulnerabilities.ts 8.7 KB runs code
- validations/output-schema.json 2.3 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.
- 2d ago First seen · 299 lines · 85 tokens per session scan A 88f6bc2dd76a
security-audit is a skill published in the GitHub repository rushengzhou/sid-code (2 stars, last pushed 2d ago), licensed MIT. It adds 85 tokens to every session and 4,654 once invoked, about $0.0004 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-31.
Other skills, from other repositories
omd-contract
把审议结论结晶成正式契约文档落盘 docs/plan/,当 /omd-execute 的执行契约。承接 /omd-grill 的决策记录表,写给没有对话上下文的执行器看。含 crystallize/crystals 职能。Trigger:/omd-contract、定契约、写成执行契约、写成 SDD、SDD、结晶、方案定了记下来、列结晶。.
omd-grill
锁 plan/SDD 前的对抗式审问:沿决策树走、先给推荐答案、事实自查·技术 Decision 自裁·真 owner 岔口才阻塞问、对标外部实现逼问「为何偏离」;宽解岔口就地开 council;产决策记录表喂 /omd-contract。审议纪律:只讨论不动手。Trigger:/omd-grill、审问、盘问这个方案、把这事讨论清楚、压测计划、stress-test。.
omd-video
视频→逐段结构化笔记 (MiMo-v2.5 原生吃画面+音频, 非 whisper 转写; 可重入管线)。讲解/课程视频里 PPT 框架图/代码/提示词是画面独有、音频拿不到的信息。产 ALL-NOTES.md 交 /omd-council 或 dagresearch 做综合。Trigger:/omd-video、抖音/B站/YouTube 讲解视频、课程系列、把这些视频学一遍/提炼、画面里有代码/图表/PPT。Skip:文字原文综合→/omd-council;网页内容→dagresearch(检索版)。.
omd-docs-drift
文档漂移追踪:确定性死路径/死锚闸(bun test 常驻)之外的语义半——按 docs/docs-map.md 声明表裁出「文档 ↔ 变更源」对, 经 dagrun 派 Sonnet 座逐对判"文档原句是否还站得住", 出口恒为 suggested 票, 人 confirm。Trigger:/omd-docs-drift、查文档漂移、文档跟没跟上代码、docs drift。.
omd-audit
安全专项审计:经 omd run 派多视角安全审查 DAG,按信任边界清单扫注入/认证/fail-open + untrusted 入口校验覆盖率,产按严重度排序的结构化报告。Trigger:/omd-audit、安全审计、查漏洞、信任边界、security review。.
omd-research-deep
终极档深度调研:种子作者化多角度抓取 + council 分解 + 多轮缺口补挖,一条工具调用出整领域 grounded 报告。Trigger:/omd-research-deep、深度调研、deep research、整领域调研、调研到 grounded 底座、把这个领域研究透。Skip:轻量单点查证(tavily 直查)/ 单问题综合(dagresearch 默认档)/ 代码理解(dag-map)。.