Borrowing it
Nothing to install: this file belongs to fitlab-ai/agent-infra. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/close-codescan/SKILL.mdgit clone --depth 1 https://github.com/fitlab-ai/agent-infraWrote 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/fitlab-ai/agent-infra/close-codescan)<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/close-codescan"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/close-codescan.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00035 | $0.01524 |
| Opus 5 | $0.00017 | $0.00762 |
| Sonnet 5 | $0.00007 | $0.00305 |
| Haiku 4.5 | $0.00003 | $0.00152 |
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 today.
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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
关闭 Code Scanning 告警
--agent取值见.agents/rules/task-management.md「合作者 token 规范」。
关闭指定的 Code Scanning(CodeQL)告警并记录合理的关闭理由。
任务入参短号别名
如果
{task-id}入参匹配^[#]?[0-9]+$(裸数字或带#前缀),先读取.agents/rules/task-short-id.md的「SKILL 入参解析」段执行解析;后续命令视{task-id}为解析后的全长TASK-YYYYMMDD-HHMMSS形式。
步骤开始:本地生命周期边界
安全告警 API 仍由本技能处理;若存在关联任务,步骤 7 只声明一个本地 lifecycle intent,由核心统一提交基础元数据、日志、归档目录和短号。
执行流程
1. 获取告警信息
执行前先读取 .agents/rules/security-alerts.md,然后运行 agent-infra-internal platform-security read --kind code-scanning --number {alert-number},解析其 JSON 结果获取告警详情。
验证告警处于 open 状态。如果已被关闭/修复,告知用户并退出。
2. 展示告警详情
Code Scanning 告警 #{alert-number}
严重程度:{security_severity_level}
规则:{rule.id} - {rule.description}
扫描工具:{tool.name}
位置:{location.path}:{location.start_line}
消息:{message}
3. 询问关闭理由
提示用户选择理由:
- 误报 (False Positive) - CodeQL 规则误判;代码不存在此安全问题
- 不会修复 (Won't Fix) - 已知问题但基于架构或业务原因不予修复
- 测试代码 (Used in Tests) - 仅在测试代码中出现,不影响生产环境安全
- 取消 - 不关闭告警
4. 要求详细说明
如果用户选择关闭(非取消),要求提供详细说明:
- 最少 20 个字符
- 必须清楚说明为什么可以安全关闭该告警
- 如果是误报,说明为什么代码不存在该安全问题
- 如果是不修复,说明技术或业务原因
5. 最终确认
即将关闭 Code Scanning 告警 #{alert-number}:
规则:{rule.id}
位置:{location.path}:{location.start_line}
原因:{选择的理由}
说明:{用户的说明}
确认?(y/N)
6. 执行关闭
将用户说明写入 {comment-file},然后运行 agent-infra-internal platform-security dismiss --kind code-scanning --number {alert-number} --reason {api-reason} --comment-file {comment-file}。解析 JSON 结果,仅当关闭状态为 applied 或 no-op 时继续。
API reason 映射(按 Code Scanning API):
- 误报 ->
false positive - 不会修复 ->
won't fix - 测试代码 ->
used in tests
7. 记录到任务(如存在)
如果有关联任务(搜索 codescan_alert_number: <alert-number>):
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {standard-agent-token} \
--alert-number {alert-number} --reason "{reason}"
仅 status=applied|no-op 视为本地归档完成。若 API 已关闭但 lifecycle 返回 failed,必须明确报告“远端已关闭、本地待恢复”,展示 recovery steps,并以同一 intent 重试;不得手工更新 task.md、移动目录或释放短号。
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.
- today Changed 0e0c5a3736d4
- 4d ago Changed 18065a0bec9e
- 8d ago First seen · 138 lines · 35 tokens per session scan A a07c24ce292a
close-codescan is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,524 once invoked, about $0.0002 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 skills, from other repositories
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
work
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
preview-design
Render a real artifact through this branch's local MERIDIAN design code (not the published npm package) so the team can test the new Design Convention on the document / handoff / platform surfaces before it ships. Use for /preview-design, "preview the design convention", "render this with the new design", or Design…
sw-do
Implement a SpecWeave increment task by task through the ledger, with evidence per task and a verified close. Use for "implement this", "start working", "continue the increment", "keep going".
done
Close an increment: ledger check, specweave verify, optional review, then specweave complete. Use when all tasks are done and saying "close increment", "we are done", or "finish up".
xiaohongshu-image-creator
An image-making assistant for Xiaohongshu, a Chinese social platform for lifestyle, product, and educational posts. It creates vertical covers and supporting images matched to the post’s topic, audience, and visual style.