release-gate-loop

release-gate-loop is a skill for Claude Code, Codex from KongFangXun/sofagent. It costs 59 tokens per session (3,536 once invoked), scanned A, original, MIT.

A release check that tests a change, reports whether it passes, and can run a limited fix-and-retest cycle. A release is the act of making a software version available.

In plain words
What is it for?
Use it before releasing software to run acceptance tests, check regressions and coverage, diagnose failures, make fixes, audit them, and verify again.
Why use it?
It catches acceptance, regression, and coverage problems before release and sends failures through a defined repair loop.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node FORGE/src/release-gate-driver.mjs --target <版本号>.

Good fit Use it before releasing software to run acceptance tests, check regressions and coverage, diagnose failures, make fixes, audit them, and verify again.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/KongFangXun/sofagent
agentmods
npx agentmods add skills/kongfangxun/sofagent/release-gate-loop

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for release-gate-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/kongfangxun/sofagent/release-gate-loop/github.svg)](https://agentmods.dev/skills/kongfangxun/sofagent/release-gate-loop)
Your own site
<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.

agentmods 80×15 button for release-gate-loop

Your own site · 80×15
<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>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,536 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
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.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash 19157ec0222a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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) = 三层子进程嵌套。
FORGE/SKILL/release-gate-loop/SKILL.md · 160 lines

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 启动(见下「执行载体铁律」)。

怎么用

  1. 读 loop.md 拿到完整 SOP(角色 / 步骤协议 / 产物 schema)。
  2. 5 步的行为指令在 prompts/(acceptance / regression / coverage / consolidate / verdict)。
  3. F 步骤指令在 prompts/(f-diagnose / f-fix)+ driver 自动执行 f-audit。
  4. 跨 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 一直活跃 = 用户界面持续可见「在跑」,这是硬要求非可选)。

Read the full file on GitHub · 160 lines

Changes

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.

  1. yesterday Changed 19157ec0222a
  2. 4d ago Changed 2ca6d14236af
  3. 7d ago Changed 5bd4e2624cd9
  4. 8d ago Changed 901cfde882ca
  5. 12d ago Changed 22909ac26c19
  6. 15d ago Changed d57e682f8e43
  7. 17d ago Changed · +1 lines 14c2adfc9416
  8. 20d ago Changed 232ae9324d1f
  9. 22d ago Changed 17cd6168f1de
  10. 24d ago First seen · 159 lines · 59 tokens per session scan A 1b9e5437ce1d

Subscribe to this mod's changes

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.