goal-loop

goal-loop is a skill for Claude Code, Codex, Cursor from SilenceInsect/AIDocxWorkFlow. It costs 100 tokens per session (4,498 once invoked), scanned A, original, MIT.

A Chinese-language workflow for running a project task through repeated planning, action, checking, review, and iteration. It saves task progress and limits the loop by rounds, tokens, or required user input.

In plain words
What is it for?
Starting, pausing, clearing, and continuing structured autonomous work through the /goal-loop commands.
Why use it?
It helps keep long tasks organized across interruptions while recording what was delivered, checked, and learned in each round.

Skill for Claude CodeCodexCursor

Install

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.

agentmods
npx agentmods add skills/silenceinsect/aidocxworkflow/goal-loop
Any agent
npx skills add SilenceInsect/AIDocxWorkFlow --skill goal-loop
Clone the repo
git clone --depth 1 https://github.com/SilenceInsect/AIDocxWorkFlow

Made for: Claude Code, Codex, Cursor.

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 goal-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/silenceinsect/aidocxworkflow/goal-loop.svg)](https://agentmods.dev/skills/silenceinsect/aidocxworkflow/goal-loop)
Your own site
<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>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,498 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00100 $0.04498
Opus 5 $0.00050 $0.02249
Sonnet 5 $0.00020 $0.00900
Haiku 4.5 $0.00010 $0.00450

Measured 3d ago against content hash 17ddc86efeb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.cursor/skills/goal-loop/SKILL.md · 305 lines

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 推理补全并标注 [推理补全]

每轮固定输出三件套:

  1. 最新完整交付物
  2. 本轮审计论证单 (audit_<round>.md)
  3. 本轮复盘报告 (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>.tmpos.replace(),防止崩溃半写

Round 无新交付物时处理规范(F1 修复):

当某轮 Act 阶段无新 artifact 产出时:

  1. audit_<round>.md 仍必须产出(总结当前状态,不可跳过)
  2. latest_artifact 字段沿用上一轮的值
  3. audit 内容聚焦于"本轮是否仍保持 achieved 状态"
  4. 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. 五段式自治闭环(每轮必跑,不可跳过)

Read the full file on GitHub · 305 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. 3d ago First seen · 305 lines · 100 tokens per session scan A 17ddc86efeb8

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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.

obra/superpowers · 37 tokens

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.

microsoft/vscode · 62 tokens

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.

microsoft/vscode · 51 tokens

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.

microsoft/vscode · 53 tokens

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…

microsoft/vscode · 71 tokens