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 commands/modelengine-group/fit-framework/close-codescangit clone --depth 1 https://github.com/ModelEngine-Group/fit-frameworkWhat 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.00018 | $0.01734 |
| Opus 5 | $0.00009 | $0.00867 |
| Sonnet 5 | $0.00004 | $0.00347 |
| Haiku 4.5 | $0.00002 | $0.00173 |
Grade A, and why
close-codescan 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 — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Close Code Scanning Command
功能说明
关闭指定的 Code Scanning(CodeQL)告警。在关闭前会要求用户确认并提供合理的理由,确保不会误关闭真实的安全风险。
执行流程
1. 获取告警信息
gh api repos/{owner}/{repo}/code-scanning/alerts/<alert-number>
验证告警状态:
- 如果已经是
dismissed或fixed状态,提示用户并退出 - 如果是
open状态,继续执行
2. 展示告警详情
向用户展示告警的关键信息:
🔍 Code Scanning 告警 #{alert-number}
严重程度: {security_severity_level} 🔴/🟠/🟡/🟢
规则: {rule.id} - {rule.description}
工具: {tool.name}
位置: {location.path}:{location.start_line}
消息: {message}
3. 询问关闭理由
使用 AskUserQuestion 工具让用户选择关闭理由:
问题: "为什么要关闭这个 Code Scanning 告警?"
选项:
-
误报 (False Positive)
- 描述: CodeQL 规则误判,代码实际上不存在此安全问题
- 对应 API 参数:
dismissed_reason: "false positive"
-
不会修复 (Won't Fix)
- 描述: 已知问题但基于架构或业务原因不予修复
- 对应 API 参数:
dismissed_reason: "won't fix"
-
测试代码 (Used in Tests)
- 描述: 仅在测试代码中出现,不影响生产环境安全
- 对应 API 参数:
dismissed_reason: "used in tests"
-
取消
- 描述: 不关闭告警
- 操作: 退出命令
4. 要求详细说明
如果用户选择关闭(非"取消"),要求用户提供详细的文字说明:
请提供详细的关闭理由(将记录到 GitHub):
说明要求:
- 最少 20 个字符
- 清晰说明为什么此告警可以安全关闭
- 如果是误报,说明为什么代码不存在此安全问题
- 如果是不修复,说明技术或业务原因
5. 最终确认
显示即将提交的信息,要求最终确认:
⚠️ 即将关闭 Code Scanning 告警 #{alert-number}
规则: {rule.id}
位置: {location.path}:{location.start_line}
关闭理由类别: {选择的理由}
详细说明: {用户输入的说明}
是否确认关闭?(y/N)
- 如果用户输入
y或yes,继续执行 - 否则,取消操作
6. 执行关闭操作
使用 GitHub API 关闭告警:
gh api --method PATCH \
repos/{owner}/{repo}/code-scanning/alerts/<alert-number> \
-f state=dismissed \
-f dismissed_reason="{API参数}" \
-f dismissed_comment="{用户的详细说明}"
API 参数映射:
dismissed_reason的有效值(根据 GitHub Code Scanning API):false positive: 误报won't fix: 不修复used in tests: 测试代码
7. 记录到任务(如果存在)
检查是否有相关的安全分析任务:
- 搜索
.ai-workspace/active/、.ai-workspace/blocked/、.ai-workspace/completed/中包含codescan_alert_number: <alert-number>的任务 - 如果找到,在任务文件中添加关闭记录:
closed_at: {当前时间}
closed_reason: {关闭理由类别}
closed_comment: {用户的详细说明}
并将任务移动到 completed/ 或 dismissed/ 目录(根据理由)
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 · 221 lines · 18 tokens per session scan A 03159e3dd34c
close-codescan is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 18 tokens to every session and 1,734 once invoked, about $0.0001 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.
Other commands, from other repositories
me-han-hu-draft
Draft a technical manuscript section in Han Hu manuscript mode using the private calibrated style corpus and evidence-preserving engineering workflow.
me-cfd-review
Review thermal-fluid CFD setup, boundary conditions, mesh, wall treatment, convergence, validation, and whether the claims are supported.
me-code-sanity
Run a fast preflight on thermal-fluid research code for units, baselines, leakage, physics checks, and result traceability.
me-correlation-check
Check thermal-fluid equations, empirical correlations, and dimensionless groups for validity range, assumptions, units, and claim strength.
me-experiment-plan
Plan thermal-fluid experiments with instrumentation, calibration, uncertainty, repeatability, heat-loss correction, operating envelope, and safety checks.
me-lit-matrix
Build a thermal-fluid literature matrix organized by mechanism, method, metric, validity range, benchmark value, and unresolved gap.