Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/KongFangXun/sofagentnpx agentmods add skills/kongfangxun/sofagent/release-gate-loopWrote 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/kongfangxun/sofagent/release-gate-loop)<a href="https://agentmods.dev/skills/kongfangxun/sofagent/release-gate-loop"><img src="https://agentmods.dev/badge/skills/kongfangxun/sofagent/release-gate-loop/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/kongfangxun/sofagent/release-gate-loop"><img src="https://agentmods.dev/badge/skills/kongfangxun/sofagent/release-gate-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 48 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00059 | $0.03536 |
| Opus 5.5 | $0.00024 | $0.01414 |
| Sonnet 5.5 | $0.00012 | $0.00707 |
| Haiku 4.5 | $0.00006 | $0.00354 |
Grade A, and why
release-gate-loop scanned grade A with 1 finding 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 yesterday.
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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
原因:driver(spawn) → worker(spawn) → run_bash(execSync) = 三层子进程嵌套。 How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
release-gate-loop · 发版闸门循环定义
V 验证 FAIL 后触发 F 修复循环——F 读 verdict → 改代码 → 跑 audit → V 重验,最大 3 轮。
这是什么
一套可复用的发版前自动验证闸门 + 自动修复。它描述:谁来做(V = 验证者 + F = 修复者)、怎么走(V 5 步验证 + F 3 步修复循环)、产物放哪(runs/release-gate-loop/YYYY-MM-DD/run-NN/round-N/)。
- V = 验证者:跑 acceptance-test.sh、跑 regression-checklist、做覆盖率交叉检查、合并报告、出裁决。
- F = 修复者:V 裁决 FAIL 后,F 读 verdict 报告 → 定位根因 → 改代码 → driver 自动跑 audit → 回到 V 重验。
- driver(Node 编排进程,非 agent):在步骤间中转、维护
runs/文件、复制报告到桌面。由用户手动新开的执行 session 启动(见下「执行载体铁律」)。
怎么用
- 读
loop.md拿到完整 SOP(角色 / 步骤协议 / 产物 schema)。 - 5 步的行为指令在
prompts/(acceptance / regression / coverage / consolidate / verdict)。 - F 步骤指令在
prompts/(f-diagnose / f-fix)+ driver 自动执行 f-audit。 - 跨 run 的永久索引在
FORGE/LEDGER.md(被 git 跟踪);每次产物在runs/(不进 git)。
实现载体
V 由 Node driver(FORGE/src/release-gate-driver.mjs)驱动——每个 step 独立子进程(真零上下文),LangGraph createReactAgent 编排。driver 由用户手动新开的执行 session 启动并监控(见下「执行载体铁律」)。
🔴 执行载体铁律:driver 必须由「独立 session」直跑,禁止主 session 内开子代理代跑
判断层 driver 的执行 session 必须是用户手动新开的独立 session(与主 session 平行、互不嵌套),不是主 session 里 spawn 的 subagent。
原因(实证):主 session 内子代理 → 后台 shell → driver 三层嵌套,用户打断主 session 时级联 SIGTERM 会杀掉整棵进程树——曾在 consolidate 步骤被中止(latest.json stopReason=aborted-signal),已完成两步产物差点作废。此外子代理自带 token 开销、driver 崩溃时子代理诊断层还引入过误诊(「缺 15 包」实为 29 包三层根因)。
正确分工:
- 主 session(审查/决策 session):三查 → 修复环境问题 → 产出「交接 prompt」交给用户 → 用户在新 session 粘贴执行 → 等新 session 回报 verdict → 零信任复验。主 session 全程不 spawn driver。
- 执行 session(用户新开):粘贴交接 prompt → 按下方「Session 监控协议」启动 driver 并轮询到 verdict → 回报六项终态数据。
交接 prompt 必含要素(主 session 生成,自包含):目标版本号、启动 commit(预期干净树)、启动命令行(含 source ~/.sofagent/env.local)、监控协议要点(120s 轮询 / heartbeat 死亡检测 / 已知降级信号不处理清单)、verdict 产出后的六项回报清单(verdict+stopReason / 四步产物存在性 / usage token 总量 / verdict.md 头 50 行 / status.json 全文 / driver 日志尾 30 行)、异常处置(启动即崩回报不修 / 卡死 15 分钟查 pid)。 交付形式:直接在对话中输出可复制的 prompt 文本块,禁止落盘成文件——用户复制粘贴到新 session 执行(用户裁定)。
Session 监控协议(CRITICAL · 适用于执行 session)
启动 driver 后,session 不是傻等,而是进入 sleep 轮询模式——保持 working 状态,让用户感知"后台在干活"(每 120 秒一轮,读 status.json 输出一行状态——session 一直活跃 = 用户界面持续可见「在跑」,这是硬要求非可选)。
What ships with it
22 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.
- evolution.md 900 B
- loop.md 5.0 KB
- prompts/acceptance-consolidate.md 1.8 KB
- prompts/acceptance-shard-1.md 2.9 KB
- prompts/acceptance-shard-10.md 2.9 KB
- prompts/acceptance-shard-11.md 2.9 KB
- prompts/acceptance-shard-12.md 2.9 KB
- prompts/acceptance-shard-2.md 2.9 KB
- prompts/acceptance-shard-3.md 2.9 KB
- prompts/acceptance-shard-4.md 2.9 KB
- prompts/acceptance-shard-5.md 2.9 KB
- prompts/acceptance-shard-6.md 2.9 KB
- prompts/acceptance-shard-7.md 2.9 KB
- prompts/acceptance-shard-8.md 2.9 KB
- prompts/acceptance-shard-9.md 2.9 KB
- prompts/acceptance.md 2.7 KB
- prompts/consolidate.md 4.4 KB
- prompts/coverage.md 5.2 KB
- prompts/f-diagnose.md 1.3 KB
- prompts/f-fix.md 4.9 KB
- prompts/regression.md 4.7 KB
- prompts/verdict.md 3.5 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.
- yesterday Changed 19157ec0222a
- 4d ago Changed 2ca6d14236af
- 7d ago Changed 5bd4e2624cd9
- 8d ago Changed 901cfde882ca
- 12d ago Changed 22909ac26c19
- 15d ago Changed d57e682f8e43
- 17d ago Changed · +1 lines 14c2adfc9416
- 20d ago Changed 232ae9324d1f
- 22d ago Changed 17cd6168f1de
- 24d ago First seen · 159 lines · 59 tokens per session scan A 1b9e5437ce1d
release-gate-loop is a skill published in the GitHub repository KongFangXun/sofagent (53 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 3,536 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pi-package-sandbox-test
Use when verifying that published Pi packages install and load for normal users, including pi.dev package compatibility checks, release validation, Daytona sandbox tests, and package installability audits.
github-copilot-upgrader
Use this to update the Github Copilot CLI/SDK.
draft-release-notes
Author the committed release-notes file for a Prisma 8 release (stable or 8.0.0-rc.N) by enumerating the merged PRs since the previous release v tag (stable or -rc.N), resolving opaque TML-NNNN: titles via Linear context (never copied verbatim), triaging public-worthiness, and writing categorized notes — breaking…
publish-npm-version
Cuts the next release of Prisma 8: bumps the root package.json version (on the v8 RC line: 8.0.0-rc.N → rc.N+1), propagates it to every workspace package, and opens a PR titled "chore(release): bump to ". When the maintainer merges the PR, the Publish to npm workflow runs automatically and ships the new version to npm…
create-pr
Create a pull request for the current session. Use when the user wants to open a PR with the session's changes.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.