Skip to content
Back to search

agent-skill-gate

Agent Skill 步进治理体系:由程序保证 Agent 不跳步骤(step-gate Rust 门控 + 交付门 + 链治理)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/daixudk96-max--agent-skill-gate/badge.svg)](/listings/daixudk96-max--agent-skill-gate)

HTML

<a href="/listings/daixudk96-max--agent-skill-gate"><img src="/api/listings/daixudk96-max--agent-skill-gate/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 57 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # step-gate
  2. Agent Skill 步进治理:**由程序(而非模型)保证 Agent 不能跳步骤**。
  3. 这是一个标准格式的 agent skill(SKILL.md + 运行时 + 工具)。把它装进你的 agent 后,
  4. 对 Agent 说一句"用 step-gate 改造我的 <skill>",它就会把任意现有 skill 改造成步骤门控版:
  5. 每一步只有通过程序校验(产物 + 交付回执)才能推进,跳过或乱序在物理上不可能。
  6. ## 安装
  7. 把 skills/step-gate/ 整个目录复制到你的 agent 的 skill 目录(目录名保持 step-gate):
  8. - **Claude Code**:~/.claude/skills/step-gate/
  9. - **DSH / Cursor / OpenCode / Gemini CLI**(项目级):<项目根>/.agents/skills/step-gate/
  10. - 同上(全局):~/.agents/skills/step-gate/
  11. 复制即用——包内已内置 5 平台二进制(windows-x64 / linux-x64 / linux-arm64 / macos-x64 / macos-arm64),零运行时依赖。
  12. ## 使用
  13. 装好后对 Agent 说:
  14. > 用 step-gate 改造我的 <skill>
  15. Agent 会按 3 个门控步骤执行:**理解目标 skill → 改造并治理(生成 flow.yaml / guides / validators)→ 验收并分发**。
  16. 每一步由 step-gate 程序校验产物并记录交付回执;产物缺失、跳过 next、契约被改都会 exit 1 被拦。
  17. 改造时遵循**内容归位原则**:原 skill 的提示/例子/do/don't 逐字复制到用到它的步骤指南里(多步用到就多步复制),不设"高级内容"桶。
  18. ## 原理(30 秒版)
  19. - **flow.yaml**:声明步骤与每步产物规则(validators:file / non-empty)
  20. - **状态机**:pending -> current -> done(分支备选 skipped);只有当前步可 complete,失败 failed 可修复重试
  21. - **交付门**:next 把该步完整指南推送给 Agent 并写入回执(admission),complete 无回执即拒绝——
  22. Agent 不可能"没看到步骤说明"就完成
  23. - **链治理**:多个 skill 可串成链(chain.json),跨 skill 顺序同样由程序门控
  24. - **分支状态机**:flow.yaml 支持条件分支(file / non-empty / contains 判定 + else 兜底),"如果 X 就做 A 否则做 B"由程序判定,未走备选自动标 skipped
  25. - **防绕过**:状态文件只由程序读写;管理员命令(reset/fail/init)需要 operator token,启动器对 Agent 白名单化
  26. ## 目录结构
  27. step-gate/
  28. SKILL.md # 标准 Anthropic 格式(frontmatter + 渐进披露)
  29. flow.yaml # 本 skill 自身的步骤门控声明
  30. guides/ # 每步必达指南(由 next 交付)
  31. bin/ # 5 平台 step-gate 二进制
  32. scripts/ # run.cmd / run.sh 启动器(自动选平台 + 命令白名单)
  33. tools/ # skill-converter.py / skill-pack.py / check_bins.py(纯标准库)
  34. INSTALL.md / LICENSE.txt
  35. ## 验证
  36. 治理化的核心保障已通过 84 项单元测试 + DSH 空会话四轨迹实测(直接 complete 被拒、跳过 next 被拒、
  37. 旧包迁移门、标准流程全过)+ 分支状态机端到端三场景(else 兜底 / when 命中 / meta 决策记录)。
  38. ## 许可证
  39. Apache-2.0(见 LICENSE)。包内 skills/step-gate/LICENSE.txt 同款。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.