This skill creates the /goal instruction before execution starts. It does not perform the requested work unless the user explicitly asks to continue after the goal is written.
Operating Rules
- Keep the command prefix exactly
/goal, even for Chinese users. The body may be Chinese. - Put the best copy-ready goal first. Do not start with placeholders or a worksheet.
- Choose conservative defaults for low-risk ambiguity and state the assumption briefly.
- Ask only when the answer changes risk, cost, ownership, product direction, or permission.
- For specialized or unfamiliar domains, make the goal discovery-first instead of inventing domain rules.
- Treat verification, write boundaries, stop conditions, and pause conditions as required parts of the contract.
- Prefer commands, logs, screenshots, files, URLs, builds, tests, or other evidence over vague confidence.
Goal Contract
Every finished goal should contain these elements:
/goal [one concrete outcome].
Verification: [commands, runtime checks, artifacts, screenshots, logs, files, URLs, or other evidence].
Constraints: [behavior, data, APIs, style, safety, branch, or policy rules that must not change].
Boundaries: [allowed write paths and explicitly forbidden paths or systems].
Iteration policy: [small steps, rerun checks, inspect evidence before retrying, retry cap when useful].
Stop when: [specific evidence proves completion].
Pause if: [credentials, production data, destructive actions, external approval, legal/medical/financial judgment, budget, ownership, or repeated blockers are required].
For Chinese users, use Chinese labels:
/goal [一个具体目标结果]。
验证:[命令、运行检查、产物、截图、日志、文件、链接或其他证据]。
约束:[不能改变的行为、数据、接口、风格、安全、分支或策略规则]。
边界:[允许写入的位置,以及明确禁止触碰的路径或系统]。
迭代策略:[小步推进,重跑检查,重试前先看证据,必要时限制轮数]。
完成条件:[哪些具体证据证明可以停止]。
暂停条件:[需要凭证、生产数据、破坏性操作、外部审批、法律/医疗/金融判断、预算、所有权或重复阻塞时暂停]。
Drafting Flow
- Convert the request into an outcome, not an activity.
- Classify risk: local prototype or docs is low risk; existing repo changes are medium risk; production data, credentials, payments, compliance, legal, medical, financial, destructive operations, live deployment, or copyrighted assets are high risk.
- If the project exists, require the agent to inspect project scripts, docs, tests, and conventions before inventing commands.
- Write verification that produces evidence. If exact commands are unknown, make command discovery part of verification.
- Separate constraints from boundaries: constraints preserve behavior and policy; boundaries define where the agent may write.
- Bound iteration: one focused change at a time, rerun checks, inspect logs before changing strategy, and avoid endless retries.
- Define stop and pause conditions so the agent knows when to finish and when to ask.
Output Shapes
For a vague Chinese request, output:
推荐执行版(中文,可直接复制)- one short
默认选择理由 可选调整with two to four numbered choices and default options你可以直接回复:按默认,或回复类似 1B 2A
For an English request, output one English-compatible goal unless the user asks for Chinese too.
For a high-risk or unfamiliar task, output a discovery-first goal that verifies available docs, samples, scripts, policies, or official references before implementation and pauses before the risky action.
Quality Checks
Reject or revise a draft when it:
- does not start with
/goal - lacks verification, constraints, boundaries, iteration policy, stop conditions, or pause conditions
- contains placeholders such as
[Outcome],TODO,TBD,待定, or待补充 - uses weak verification like
make sure it worksor确认可用without evidence - allows broad writes like
edit anything,随便改, or修改任意文件 - says to retry forever without a new source of evidence
- treats vague taste words such as
高级,专业, orpolishedas completion proof instead of translating them into screenshot or review evidence
When saving a goal to a file, run:
python3 "${CLAUDE_SKILL_DIR}/scripts/check_goal_contract.py" path/to/goal.txt
The checker lives at scripts/check_goal_contract.py.