goal-draft
它能做什么
它为 Qwen Code 的目标起草目标文本,包括是或否的完成检查、防护措施和预算。适合希望智能体持续工作、直到得到明确结果的人。
适用场景
- ✓当你希望智能体持续工作,直到达成某个特定结果时。
- ✓当你想检查自己写的目标是否足够清晰、可以被判断时。
- ✓当你说出类似“一直做到任务完成”这样的话时。
技能链接
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/goal-draft/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望智能体一直工作,直到这个模块中的所有单元测试都通过。请帮我把它写成一个清晰的目标。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体先询问期望的结果,然后写出一个目标,附上编号的是或否检查项,并在对话记录中留下证据。它本身不执行工作,只起草文本,等待你批准。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/goal-draft — write a Goal the verifier can judge
You are already inside the loaded goal-draft skill — do not call the skill tool to invoke it again; start with Step 0.
You are drafting the text for /goal set. You are NOT doing the work the goal describes. Do not edit files, do not run the checks, do not start on the task. Deliver a concise objective for approval or a command the user can run; if essential information is missing, deliver only a draft marked "Needs clarification".
How Goals are judged (why the format below matters)
An active Goal is re-fed to the model every turn, and its completion is judged by an independent verifier that sees ONLY transcript evidence, read from the most recent record backwards until its request is full:
- Visible assistant output, tool results, and the user's own messages recorded for the Goal count as evidence; a user message proves only what the user said, chose, or approved. The objective itself and hidden reasoning do not, and in a long Goal the oldest records no longer reach the verifier.
delivered_outputevidence proves only that text was printed. It cannot prove that tests passed, files changed, or remote state changed — those need a directly recorded tool result in the transcript (anexternal_fact), not a script's or an aggregate wrapper's summary of one.- A claim that the user confirmed, chose, or approved something needs a real user message as evidence; otherwise the completion proposal is rejected.
- Vague, subjective, or open-ended conditions never produce decisive evidence; the loop then runs until a limit is hit.
So a good objective makes the agent PRODUCE evidence at the end: run the named check immediately before proposing completion and paste the decisive output line. A check that ran long before may have to run again when completion is proposed.
Step 0 — should this be a Goal at all?
Say no, briefly, when the request is a normal one-shot task, needs a design or product judgement call, or has no way to be checked from the agent's own output. Offer to just do it, or to write a plan instead. A goal that cannot be checked is a prompt, not a goal.
Step 1 — check the active Goal
Call get_goal. If a Goal is active, preserve the user's explicit choice to edit it (same goal, tighter wording → /goal edit) or replace it (/goal set). If that choice is unclear, include it in Step 3's single round of questions; do not choose on the user's behalf. Never draft a second concurrent goal.
Step 2 — ground the draft in the workspace
Before asking anything, verify what you can with read_file, glob, and grep_search: that named files and packages exist, and what the real check commands are (package.json scripts, Makefile, CI workflow, test config). Use those exact commands in "Done when". Never invent paths, IDs, or commands; write <TODO: …> for anything you cannot confirm.
Read only what is needed to establish the scope and verification path. Stop exploring once those are grounded; do not audit the implementation, reproduce failures, run builds or tests, install dependencies, or start services while drafting. A requested new output file is a proposed destination, not evidence that the file already exists.
Step 3 — at most one round of questions
Ask with ask_user_question, 1–3 questions in one call, each with options and a recommended default. Ask only when the answer changes the check, the scope, or the budget. Typical questions:
- Which check defines success: a test command, a build, a metric threshold, a file or state assertion?
- Which environment: local, CI, staging?
- What is off limits: which files, which actions (push, delete, publish)?
- How long to try before stopping as blocked?
Rules for the questions:
- Never ask what you could find out by reading the workspace.
- Batch them into one
ask_user_questioncall; do not drip one per turn. - Only ask things only the user can answer: what counts as done, what is off limits, how long to try.
- If you cannot find a concrete way to verify the outcome, you MUST ask, offering 2–3 candidate checks. Do not skip this and do not invent one.
If you cannot ask (headless, or a client without prompts), use a recommended default only for nonessential choices and mark it [ASSUMPTION] in Context. An unknown success criterion, unverified command or input path, or unresolved edit-versus-replace choice stays <TODO: …>; do not invent an answer just to finish the hand-off. If ess
常见问题
它会开始工作吗?
不会。它只起草目标文本,工作要等你批准目标之后再进行。
什么样的完成检查才好?
检查是二元的,并且会留下证据,例如已记录的工具结果,以便验证者确认。
如果我没有提供足够的细节怎么办?
技能会返回一份标记为需要进一步说明的草稿,而不是进行猜测。
详情
作者的原始描述
Turn a fuzzy intention into a /goal objective the Goal verifier can actually judge - one outcome, numbered binary "Done when" checks that leave evidence in the transcript, guardrails, a budget, and a block protocol. Use when the user wants to set or define a goal, asks whether a goal is good enough, or says "keep going until X". Usage - /goal-draft <what you want done>, or /goal-draft <existing goal> to tighten it. This skill only writes the objective; it never starts the work.
repo: QwenLM/qwen-code
热度
- GitHub 星标
- 29k
- 排名
- #9781
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
codegraph
29k帮你的智能体通过调用图、依赖关系、无用代码、热点和语义搜索来分析已建立索引的代码库。
qwen-code-claw
29k帮你的智能体把编程任务交给 Qwen Code,例如理解代码库、修复缺陷、重构代码或生成新项目。
structured-debugging
29k教你的智能体用一步一步的方法调试疑难缺陷:先提出假设,再添加有针对性的检查,验证后找出真正的原因,然后才修复。
tmux-real-user-testing
29k帮你的智能体在 tmux 中像真实用户一样测试终端应用,并为每一步操作保存带屏幕截图的可读步骤日志。