Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/silenceinsect/aidocxworkflow/goal-loopnpx skills add SilenceInsect/AIDocxWorkFlow --skill goal-loopgit clone --depth 1 https://github.com/SilenceInsect/AIDocxWorkFlowWrote 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/silenceinsect/aidocxworkflow/goal-loop)<a href="https://agentmods.dev/skills/silenceinsect/aidocxworkflow/goal-loop"><img src="https://agentmods.dev/badge/skills/silenceinsect/aidocxworkflow/goal-loop.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00100 | $0.04498 |
| Opus 5 | $0.00050 | $0.02249 |
| Sonnet 5 | $0.00020 | $0.00900 |
| Haiku 4.5 | $0.00010 | $0.00450 |
Grade A, and why
goal-loop 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 3d 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 — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Goal Loop 自治循环
1. 命令契约
/goal-loop <任务目标> # 启动自治循环(含或不含 plan)
/pause-goal # 暂停当前自治循环(写入 pause 标志)
/clear-goal # 清空当前 goal 快照,重置状态为 idle
调用 /goal-loop 时必须携带 任务内容 + 任务 plan(验收标准 + 正确范例);缺少时按 §6 推理补全并标注 [推理补全]。
每轮固定输出三件套:
- 最新完整交付物
- 本轮审计论证单 (
audit_<round>.md) - 本轮复盘报告 (
review_<round>.md)
2. Goal 快照 Schema(必填 10 字段)
会话级持久化字段(文件路径:.goal-log-db/active/<goal_id>/snapshot.json):
| 字段 | 类型 | 含义 |
|---|---|---|
goal_id |
string | 唯一任务 ID,UUIDv4 |
raw_user_goal |
string | 用户原始目标文本 |
accept_criteria |
string[] | 可量化验收断言清单(≥ 1 条) |
task_queue |
object[] | 子任务队列(每项含 id / title / status / artifact) |
loop_round |
int | 当前迭代轮次(从 1 起) |
last_audit |
object/null | 上一轮审计论证记录 |
last_review |
object/null | 上一轮复盘根因与修复方案 |
latest_artifact |
string/null | 最新交付物路径 |
status |
enum | active / achieved / paused / budget-limited |
token_budget |
object | {used, limit, updated_at} 资源消耗记录 |
持久化规则:
- 窗口重载、工具执行结束、中途闲聊、刷新输入框 → 不丢失进度
- 仅
/clear-goal手动清空指令可销毁任务 - 普通对话无法篡改 Goal 快照(读写隔离:仅
goal_snapshot.py写入) - atomic write:先写
<file>.tmp再os.replace(),防止崩溃半写
Round 无新交付物时处理规范(F1 修复):
当某轮 Act 阶段无新 artifact 产出时:
audit_<round>.md仍必须产出(总结当前状态,不可跳过)latest_artifact字段沿用上一轮的值- audit 内容聚焦于"本轮是否仍保持 achieved 状态"
- review 内容说明"本轮无新交付物原因 + 是否可继续收敛"
2.1 value_ratio 软指导(v30 D1 新增)
来源:v26 草案 D1 + v28 DT-V28-001 决策(选 B:启动软指导值 0.5 + 收敛硬约束 0.6)
运行时行为(
ai_workflow/goal_snapshot.py):
create_snapshot阶段:value_ratio >= MIN_VALUE_RATIO_HARD (0.6)才可启动,低于 0.5 则 WARN 并允许继续- 收敛判定阶段:必须
value_ratio >= MIN_VALUE_RATIO_HARD (0.6)- 0.5 ~ 0.6 之间:WARN 并记录到
follow_up_items,不阻断启动常量:
MIN_VALUE_RATIO_SOFT = 0.5(启动软指导),MIN_VALUE_RATIO_HARD = 0.6(收敛硬约束)
实践意义:
- 简单工程类目标(如"修复 bug")process_criteria 可能占多数,ratio 落在 0.5~0.6 区间——WARN 不阻断
- 业务类目标(如"落地新规范")value_criteria 自然占多数——ratio 通常 ≥ 0.6
- 真正体现"价值导向优先"的把关在收敛判定(必须 0.6),不在启动前检
3. 五段式自治闭环(每轮必跑,不可跳过)
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.
- 3d ago First seen · 305 lines · 100 tokens per session scan A 17ddc86efeb8
goal-loop is a skill published in the GitHub repository SilenceInsect/AIDocxWorkFlow (2 stars, last pushed 1mo ago), licensed MIT. It adds 100 tokens to every session and 4,498 once invoked, about $0.0005 per session on Opus 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…