← All skills
Tencent SkillHub · AI

Agent Workflow Enforcer

让 AI Agent 的执行流程稳定可控。 通过 Gate 门禁、强制输出格式、Style Context 持久化, 把"建议"变成"必须",解决 Agent 选择性执行的问题。

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

让 AI Agent 的执行流程稳定可控。 通过 Gate 门禁、强制输出格式、Style Context 持久化, 把"建议"变成"必须",解决 Agent 选择性执行的问题。

⬇ 0 downloads ★ 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, claude-skill.md, scripts/gate.py

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 17 sections Open source page

Agent Workflow Enforcer

核心原则:用代码控制流程,不靠 AI 记忆。

为什么需要这个?

AI Agent 会"忘"规则: Context 压缩后,早期指令被淡化 写在 prompt 里的规则是"建议",Agent 可以不听 分段任务时风格不一致 解决方案:把规则写进流程,没过检查点 = 不能继续。

机制一:Gate 门禁

任务开始前,强制运行检查脚本: python3 {baseDir}/scripts/gate.py <task_type> [options]

支持的任务类型

类型说明content内容创作(文章、推文、配图)code代码修改deploy部署操作custom自定义(读取 gate-config.yaml)

示例

# 内容创作门禁 python3 {baseDir}/scripts/gate.py content --platform x --account your-account # 代码修改门禁 python3 {baseDir}/scripts/gate.py code --scope "核心文件"

输出

═══════════════════════════════════════ 🚧 Gate Check: content ═══════════════════════════════════════ 📋 Checklist (必须全部确认): [ ] 1. 已读相关 SKILL.md [ ] 2. 已确认目标账号/平台 [ ] 3. 已检查 style-context(如适用) ⚠️ 没有完成以上检查 = 不能继续执行 ═══════════════════════════════════════ 规则:Gate 输出后,Agent 必须逐项确认才能继续。

机制二:强制输出格式

在 AGENTS.md 或 system prompt 中添加: ## 强制输出格式 ### 内容创作任务 第一条回复必须包含: 📋 Content Checklist □ 已跑 gate □ 已读相关 skill □ 已确认账号: [账号] **没有这个块 = 不能开始任务。** ### 任务完成时 必须包含: 📋 Pre-publish Checklist □ 格式检查: ✅ □ 风格检查: ✅ □ 输出位置: [路径/链接] **任何一项 ❌ = 不能发布。** 原理:Agent 可能忘了读文件,但格式要求写死在流程里,它不会忘输出格式。

机制三:Style Context 持久化

分段任务时,第一批完成后创建 style-context.yaml: python3 {baseDir}/scripts/create_style_context.py \ --project "项目名" \ --style "风格名" \ --output ./style-context.yaml

模板

# style-context.yaml project: project-name created: 2026-02-25 style: name: style-name description: "风格描述" colors: primary: "#XXXXXX" background: "#XXXXXX" elements: - "元素1" - "元素2" avoid: - "避免1" - "避免2" prompt_template: | [完整的 prompt 模板] existing_outputs: file1.png: "描述" file2.md: "描述"

后续批次规则

在 AGENTS.md 中添加: ## 分段任务规则 检测到分段任务时: 1. 先检查 style-context.yaml 是否存在 2. **存在** → 读取,按记录的风格继续 3. **不存在** → 不能继续,先创建 **没有 style-context = 不能继续分段任务。**

机制四:自动学习(可选)

当用户修改 Agent 输出时,检测差异并学习: python3 {baseDir}/scripts/detect_learning.py "原文" "修改后" 输出: { "detected": true, "original": "进行分析", "corrected": "分析", "suggested_rule": "避免「进行+动词」冗余结构" } 确认后写入 learnings.jsonl,下次自动应用。

1. 安装

# OpenClaw npx clawhub@latest install agent-workflow-enforcer # 手动 git clone https://github.com/example/agent-workflow-enforcer ~/skills/agent-workflow-enforcer

2. 配置 AGENTS.md

  • 把以下内容加到你的 AGENTS.md:
  • ## 🚧 Workflow Enforcer
  • ### Gate 门禁
  • 任务开始前运行:`python3 ~/skills/agent-workflow-enforcer/scripts/gate.py <type>`
  • ### 强制输出格式
  • 任务开始:必须输出 Checklist 块
  • 任务完成:必须输出 Pre-publish 块
  • **没有格式块 = 任务不完整**
  • ### 分段任务
  • 有 style-context.yaml → 读取后继续
  • 没有 → 先创建

3. 测试

python3 ~/skills/agent-workflow-enforcer/scripts/gate.py content --platform x

文件结构

agent-workflow-enforcer/ ├── SKILL.md # 本文件 ├── scripts/ │ ├── gate.py # 门禁脚本 │ ├── create_style_context.py │ └── detect_learning.py ├── templates/ │ ├── style-context.yaml │ ├── gate-config.yaml │ └── agents-snippet.md # AGENTS.md 代码片段 └── examples/ └── content-workflow/

核心原则

规则写在 prompt 里 = 建议 Agent 可以不听。 规则写在输出格式里 = 强制 没有格式块 = 回复不完整。 规则写在 gate 脚本里 = 硬门禁 没跑脚本 = 后续不执行。 不是靠 AI "记住",是靠流程卡死。

License

MIT

Category context

Agent frameworks, memory systems, reasoning layers, and model-native orchestration.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
2 Docs1 Scripts
  • SKILL.md Primary doc
  • claude-skill.md Docs
  • scripts/gate.py Scripts