MCPInstall

goal-crafter

Craft verifiable, tight goal prompts for AI coding agents (Claude Code /goal, Codex Automations, Pi), either from a standalone task interview or from an already-approved to-goal handoff. Use when the user says "给我一个 goal 提示词", "帮我写个 goal", "设置一个自动化任务", "我想让 agent 自动做 X", or asks to turn a task into a self-running loop. Ensures every goal has a checkable completion criterion so the agent knows when it's done.

Installs
145
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/tt-a1i/matt-skills-with-to-goal --skill goal-crafter
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads goal-crafter automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Goal Crafter

Turn a vague task into a verifiable goal that an AI agent can run unattended.

Leading principle: A goal without a checkable completion criterion is just a wish. The agent must be able to answer "Am I done?" without asking a human.

Invocation modes

Choose the mode before following the process:

  • Standalone mode: the user brings a vague task or directly asks for a goal. Run Phase 1 and clarify the task one question at a time.
  • Compiled-handoff mode: approved planning evidence already supplies the answers. Do not interview the user again. Apply only this skill's verifiability rules and target-harness formatting. The evidence may come from a conversation, spec, issue, document, or another skill.

In compiled-handoff mode, if a required product decision or completion condition is genuinely absent from the sources, report that the source is not agent-ready and name the missing evidence. Do not reopen the planning interview from inside goal compilation.

Process

Phase 1 — Clarify the task

Run this phase only in standalone mode. In compiled-handoff mode, extract the five answers from the upstream evidence without asking questions.

Ask the user, one question at a time, in this shape (standalone interview only — keep compiled-handoff mode emoji-free):

❓ **QN** - **<short title>**
<body>

💡 <your recommended answer, when you have one>

Walk these five in order:

  1. What exactly should the agent do? Get the task in one sentence. If it's vague ("优化代码", "改进 UI"), push for specifics.

  2. Where does it run? Which project / repo / workspace? Is there a specific branch or file area?

  3. What does DONE look like? This is the most important question. Push for observable, machine-checkable conditions:

    ❌ Vague (bad)✅ Verifiable (good)
    "代码质量提高""tsc --noEmit 0 errors + eslint 0 warnings"
    "UI 更好看""页面在 375px / 768px / 1440px 三个断点下视觉一致,无溢出"
    "修复所有 bug""npm test 全部通过,且 git diff 只包含修复相关改动"
    "写好文档""README.md 包含安装/使用/API 三个章节,每个章节有代码示例"
    "性能优化""Lighthouse Performance 分数 ≥ 90,LCP < 2.5s"
  4. Any constraints? Don't touch certain files? Must use specific tools? Budget limit? Time limit?

  5. What agent / harness? Claude Code (/goal), Codex (Automations), Pi, or generic?

Phase 1 complete when you have answers to all 5 questions. If the user can't answer #3, help them brainstorm verifiable conditions — this is the most common failure point.

Phase 2 — Draft the goal

Write the goal in the target agent's format. Follow these rules:

The three shapes below are the formats this skill deliberately maintains for the harnesses it is most often pointed at. They are a snapshot, not a standard: when the target harness documents a different shape, follow the harness and treat the block here as the fallback. Any harness not listed uses the generic block.

For Claude Code /goal:

Goal: [one-line task description]

Completion criteria:
- [ ] [checkable condition 1]
- [ ] [checkable condition 2]
- [ ] [checkable condition 3]

Constraints:
- [file/area restrictions]
- [tool/approach restrictions]
- [budget/time limits]

Context:
- [key files to read first]
- [relevant docs/specs]
- [related issues/PRs]

For Codex Automations:

Task: [one-line description]
Frequency: [once / on push / on schedule]
Verification: [checkable condition]
Workspace: [project path]

For Pi / generic:

任务:[一句话]
完成标准:
- [ ] [可验证条件 1]
- [ ] [可验证条件 2]
限制:[约束条件]

Phase 3 — Verify the goal

Before presenting the final goal, self-check:

  • Can an agent read the completion criteria and unambiguously decide "done" vs "not done"?
  • Is every criterion observable without human judgment? (No "looks good", "feels right")
  • Are the constraints specific enough to prevent scope creep?
  • Is the context sufficient for the agent to start working without asking "where" or "how"?

If any check fails in standalone mode, go back to Phase 1 and ask the user to clarify that specific point. In compiled-handoff mode, report the source as not agent-ready and name the missing evidence instead of asking a new planning question.

Phase 4 — Deliver

In standalone mode, present the final goal and end with:

🎯 把这个 goal 粘贴到 [agent 名称] 里,它就会自己跑到完成。如果中途卡住,告诉我哪条完成标准没达到,我帮你调。

In compiled-handoff mode, the upstream skill owns the delivery wrapper. Return the goal in the requested harness format without adding this standalone closing line.


Examples

下面两个示例里的仓库名、目录结构和文件路径都是占位符,不代表任何真实项目的约定。真正产出的 goal 必须写目标仓库当前的真实路径,不要照抄这里的形状。

Example 1: Code review automation

User: "帮我写个 goal,自动审查 PR"

Clarified:

  • Task: 审查当前分支相对于 main 的所有改动
  • Where: 当前工作仓库
  • Done: 输出一份审查报告,列出所有 P0/P1 问题,每个问题标注文件和行号
  • Constraints: 只读,不改文件
  • Agent: Claude Code

Output:

Goal: 审查当前分支相对于 origin/main 的 diff

Completion criteria:
- [ ] 已读取完整的 git diff
- [ ] 已检查安全漏洞(SQL 注入、XSS、密钥泄露)
- [ ] 已检查逻辑错误(空指针、竞态条件、边界条件)
- [ ] 已检查代码规范(命名、结构、重复代码)
- [ ] 输出审查报告,每个问题标注:严重度 + 文件:行号 + 问题描述 + 修复建议

Constraints:
- 只读,不修改任何文件
- 只关注当前分支的改动,不审查已有代码

Context:
- 项目背景:<一句话说明这个仓库是什么>
- 设计 spec:<仓库内的设计文档>

Example 2: UI redesign

User: "帮我写个 goal,重做这个页面"

Clarified:

  • Task: 用 shadcn 组件库重做目标页面
  • Done: 页面在 3 个断点下视觉一致,所有交互有 hover/focus/active 状态,通过 tsc 类型检查
  • Constraints: 不改变现有 API 接口,使用项目已有的 Tailwind 配置
  • Agent: Claude Code

Output:

Goal: 用 shadcn/ui 组件库重做目标页面

Completion criteria:
- [ ] 所有组件替换为 shadcn/ui 等价组件
- [ ] 页面在 375px / 768px / 1440px 断点下无溢出、无错位
- [ ] 所有可交互元素有 hover、focus、active 状态
- [ ] `tsc --noEmit` 0 errors
- [ ] 页面加载后无 console error

Constraints:
- 不修改 API 客户端目录下的任何文件
- 使用项目已有的 Tailwind 主题配置
- 不引入新的 npm 依赖(shadcn 除外)

Context:
- 当前页面:<页面组件文件>
- UI 组件:<组件库入口文件>
- 样式:<全局样式入口>

Special Rules

  • Never skip Phase 1 question #3 in standalone mode. If the user can't define "done", the goal will fail. Help them brainstorm.
  • Never re-interview in compiled-handoff mode. Approved evidence already owns clarification and product decisions; missing evidence means the source is not agent-ready.
  • One verifiable condition per checkbox. Don't combine multiple conditions into one line.
  • Constraints are your friend. They prevent the agent from "optimizing" unrelated files or introducing breaking changes.
  • If the task is too large for one goal, suggest breaking it into 2-3 smaller goals with clear handoffs.
  • For research/analysis goals (no code changes), the completion criterion is "output a report with specific sections".

FAQ

What does the goal-crafter skill do?

Craft verifiable, tight goal prompts for AI coding agents (Claude Code /goal, Codex Automations, Pi), either from a standalone task interview or from an already-approved to-goal handoff. Use when the user says "给我一个 goal 提示词", "帮我写个 goal", "设置一个自动化任务", "我想让 agent 自动做 X", or asks to turn a task into a self-running loop. Ensures every goal has a checkable completion criterion so the agent knows when it's done.

How do I install goal-crafter?

Run npx skills add https://github.com/tt-a1i/matt-skills-with-to-goal --skill goal-crafter in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/goal-crafter/ (personal) or .claude/skills/goal-crafter/ (project).

Which AI agents can use goal-crafter?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is goal-crafter safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains goal-crafter?

It is published by tt-a1i in tt-a1i/matt-skills-with-to-goal. It has 145 recorded installs.

More from tt-a1i/matt-skills-with-to-goal

View all →

to-goal

tt-a1i/matt-skills-with-to-goal

Open the skill to read its SKILL.md instructions.

147 installs

domain-modeling

tt-a1i/matt-skills-with-to-goal

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

grill-with-docs

tt-a1i/matt-skills-with-to-goal

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing131 installs

grilling

tt-a1i/matt-skills-with-to-goal

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA131 installs

codebase-design

tt-a1i/matt-skills-with-to-goal

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

to-spec

tt-a1i/matt-skills-with-to-goal

Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed.

Popular productivity & automation skills

View category →

agent-browser

vercel-labs/agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

OfficialProductivity & Automation1.3M installs

lark-doc

open.feishu.cn

飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。

lark-base

open.feishu.cn

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。

lark-drive

open.feishu.cn

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

lark-shared

open.feishu.cn

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.

lark-im

open.feishu.cn

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。