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/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/fitlab-ai/agent-infra/close-codescan"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/close-codescan.svg" alt="Reviewed on agentmods" width="80" 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.01589 |
| Opus 5.5 | $0.00014 | $0.00636 |
| Sonnet 5.5 | $0.00007 | $0.00318 |
| Haiku 4.5 | $0.00003 | $0.00159 |
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 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 — 141 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.
- 24d ago Changed · +3 lines c6d81ee17aea
- 1mo ago Changed 0e0c5a3736d4
- 1mo ago Changed 18065a0bec9e
- 1mo 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 (86 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,589 once invoked, about $0.0001 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-30.
Other skills, from other repositories
plan-tree
Maintain a structured planning document tree made of roadmap/status files, implementation status or handoff TODO files, topic notes, decision records, open questions, ideas/inspiration pools, and repository/file-structure hygiene plans. Use when Codex needs to create, reorganize, audit, or update a multi-file plan…
ccb-github
Maintain this CCB project's GitHub-facing release and npm publication surface. Use when preparing, publishing, auditing, or fixing CCB releases; updating README.md, README/zh.md, localized README files, CHANGELOG.md, VERSION, package.json, GitHub release notes/assets, repository description/topics, npm registry state…
planner-task-packet
Draft CCB workflow task packets, readiness recommendations, and candidate clarification questions without mutating authoritative state.
orchestration-bundle-candidate
Select one route and return one adaptive one-to-four-workgroup bundle candidate as reply-only evidence.
planner-closure-backfill
Produce one revision-fenced Planner backfill proposal for either a Detailer replan or task-set closure, with compact Frontdesk status evidence.
ccb-diagnose
Diagnose a named CCB agent by combining authoritative runtime and job lineage with deep read-only pane inspection, apply bounded recovery when evidence supports it, verify the result, and request authorization before submitting a redacted GitHub issue. Use for $ccbdiagnose agentname, $ccb-diagnose agentname, or…