Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

automate-me

把你的工作习惯做成 skill

A guided flow for turning the user’s working conventions into a skill agents will follow. The output is one -mode skill tailored to them (e.g. jay-mode, priya-mode).

引导流程:把用户的工作约定变成 agent 会遵循的 skill。产出是一份为他们定制的 -mode skill(如 jay-mode、priya-mode)。

This skill orchestrates three others: an inline mining pass (see step 1), Cursor’s built-in create-skill (authoring), and the unslop skill (prose discipline). It sequences them. It doesn’t replace them.

本 skill 编排另外三个:内联挖掘(见 step 1)、Cursor 内置 create-skill(撰写)、以及 unslop(文风纪律)。它负责排序,不替代它们。

Flow

流程

0. Check for an existing skill

0. 检查是否已有 skill

Look recursively for .cursor/skills/**/*-mode/SKILL.md and ~/.cursor/skills/*-mode/SKILL.md matching the user’s handle. Mode skills can live in a personal category directory (.cursor/skills/<handle>/), not only at the top level. If one exists, confirm intent with AskQuestion (unless they already said “update my skill” or similar):

递归查找匹配用户 handle 的 .cursor/skills/**/*-mode/SKILL.md 和 ~/.cursor/skills/*-mode/SKILL.md。mode skill 可放在个人分类目录(.cursor/skills/<handle>/),不只有顶层。若已存在,用 AskQuestion 确认意图(除非已说「更新我的 skill」之类):

  • Update the existing skill (default for repeat runs)

  • Start fresh (rare, ask why before doing it)

  • 更新已有 skill(重复跑时的默认)

  • 从头开始(少见,动手前先问为什么)

Update mode changes the rest of the flow:

更新模式会改变后续流程:

  • Step 1 mines only history since the skill was last edited (git log -1 --format=%cI <path>).

  • Step 2 asks what’s changed or missing, not what to capture from zero.

  • Step 4 edits the existing file in place. Preserve sections the user hasn’t contradicted. Revise ones with new evidence. Add new sections only for genuinely new rules.

  • Step 1 只挖 skill 上次编辑以来的历史(git log -1 --format=%cI <path>)。

  • Step 2 问什么变了或缺了,不是从零捕捉什么。

  • Step 4 原地编辑已有文件。用户未推翻的小节保留;有新证据的修订;只有真正新规则才加新小节。

1. Mine their history

1. 挖掘历史

Locate the active workspace’s transcripts before fanning out. The system prompt names the workspace’s agent-transcripts/ directory. Use only that path. Don’t glob across ~/.cursor/projects/*/. That crosses workspace boundaries and reads private chats from unrelated projects.

扇出前定位当前工作区的 transcript。system prompt 会点名工作区的 agent-transcripts/ 目录。只用那条路径。别跨 ~/.cursor/projects/*/ glob——那会跨工作区边界,读到无关项目的私聊。

Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting:

在该范围内扫近期 agent 对话找反复模式。对历史切片跑多个并行 subagent(如最近 2–4 周,切成 3 片让每片够料)。每个切片挖掘 subagent 读 parent 给的工作区路径下的 transcript,找下列信号,返回短结构化模式列表加证据指针。默认可猎信号:

  • Response preferences (length, tone, format, “dumb it down” corrections)

  • Delegation habits (subagents, models, specialized workflows, parallelism)

  • Verification posture (what “done” means, unit tests vs live repro, reviewers)

  • Code and prose discipline (style, principles cited, lint/format tools)

  • Process conventions (worktrees, commits, PRs, review/merge tooling)

  • Meta preferences (fixing skills mid-task, proposing new ones)

  • 回复偏好(长度、语气、格式、「说简单点」类纠正)

  • 委派习惯(subagent、模型、专用工作流、并行)

  • 验证姿态(「done」意味什么、单元测试 vs 实机复现、审阅者)

  • 代码与文风纪律(风格、引用的原则、lint/format 工具)

  • 流程约定(worktree、commit、PR、审阅/合并工具)

  • 元偏好(任务中途修 skill、提议新 skill)

Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence. Lone signals are weak and usually get dropped.

提升信号前跨切片交叉核对。2+ 切片都见到的模式高置信。孤独信号弱,通常丢掉。

2. Ask the user directly

2. 直接问用户

Mining misses intent that hasn’t come up yet. Use the AskQuestion tool (structured multi-choice) rather than asking the user to type from scratch.

挖掘会漏还没出现过的意图。用 AskQuestion(结构化多选),别让用户从零打字。

Shape: one or two questions with 4-6 options each, allow_multiple: true for category questions. Start broad (“Which areas matter most?”), then follow up on selected areas with specific options. After the structured rounds, one free-form chat question catches anything the options missed.

形状:一两道题,每题 4–6 选项;分类题开 allow_multiple: true。先宽(「哪些方面最要紧?」),再对选中方面跟具体选项。结构化轮次后,一道自由聊天题兜住选项漏掉的。

Don’t dump 20 questions.

别甩 20 个问题。

3. Cluster findings

3. 聚类发现

Group the combined signals into sections. Common ones (use only what applies):

把合并信号收成小节。常见(只用适用的):

  • Response style: length, tone, format.

  • Autonomy: how much to do without asking, MCP tool use.

  • Understand first: which skills to reach for when scoping or investigating a change.

  • Subagents: default, parallelism, model-to-task, specialized workflows.

  • Prose / code discipline: principles, lint tools, style guides.

  • Review and verify: repro posture, verification skills, live-testing tools.

  • Process: git worktrees, commits, PRs, review/merge tooling.

  • Skills: skill-authoring habits, fix-the-skill-first, proposing new skills.

  • 回复风格:长度、语气、格式。

  • 自主度:不问能做多少、MCP 工具使用。

  • 先理解:定范围或调查改动时先够哪些 skill。

  • Subagent:默认、并行、模型对任务、专用工作流。

  • 文风 / 代码纪律:原则、lint 工具、风格指南。

  • 审阅与验证:复现姿态、验证 skill、实机测试工具。

  • 流程:git worktree、commit、PR、审阅/合并工具。

  • Skills:撰写习惯、先修 skill、提议新 skill。

The poteto-mode skill shows the shape. Read it for granularity. Don’t copy its content. The user’s rules are not the same as poteto-mode’s.

poteto-mode skill 展示形状。读它学粒度。别抄内容。用户规则 ≠ poteto-mode 的规则。

4. Draft the skill

4. 起草 skill

Use Cursor’s built-in create-skill skill to author the skill. Placement:

用 Cursor 内置 create-skill 撰写。放置:

  • Path: preserve an existing mode skill’s category. For a new mode, use .cursor/skills/<handle>/<handle>-mode/SKILL.md when the repo has an established personal category for that handle. Otherwise default to .cursor/skills/<handle>-mode/SKILL.md in the project (or ~/.cursor/skills/<handle>-mode/ if the user prefers a personal skill).

  • Handle: the user’s first name or chosen identifier.

  • Frontmatter description: trigger on their name + /<handle>-mode + “work in their style”, not on generic keywords like “write code” or “review PR”.

  • Frontmatter formatting: follow create-skill’s YAML rules. Keep description as one YAML scalar. Quote it or use description: >- with indented continuation lines when punctuation or wrapping requires it.

  • Frontmatter disable-model-invocation: true by default. Opt out only if the user explicitly wants their mode to apply on every turn.

  • 路径:保留已有 mode skill 的分类。新 mode:仓库已有该 handle 的个人分类时用 .cursor/skills/<handle>/<handle>-mode/SKILL.md;否则默认项目内 .cursor/skills/<handle>-mode/SKILL.md(用户要个人 skill 则用 ~/.cursor/skills/<handle>-mode/)。

  • Handle:用户名或自选标识。

  • Frontmatter description:用他们的名字 + /<handle>-mode + 「按他们的风格工作」触发,别用「写代码」「审 PR」这类泛词。

  • Frontmatter 格式:跟 create-skill 的 YAML 规则。description 保持一个 YAML 标量;需要标点或换行时加引号或用 description: >- 加缩进续行。

  • Frontmatter 默认 disable-model-invocation: true。仅当用户明确要每轮都应用才关掉。

5. Iterate on prose

5. 迭代文风

Apply the unslop skill and create-skill’s writing guidelines to every line.

对每一行应用 unslop skill 和 create-skill 的写作指南。

Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly. A mode skill is not a manual.

把草稿给用户看并收反馈。预期多轮迭代。狠砍。mode skill 不是手册。

6. Land it

6. 落地

Work in a worktree off main. Commit and open a PR. Don’t push to main directly.

在离 main 的 worktree 里干。commit 并开 PR。别直接推 main。

Guardrails

护栏

  • Don’t overfit to one conversation. A preference stated once and contradicted another time is noise. Require multiple instances before codifying it.

  • Don’t be clever. Restating other skills’ contents, inventing metaphors, or writing “poetic” prose for an agent reader is cost without benefit. Keep it operational.

  • Reference, don’t inline. Other skills the user relies on should appear as path references, not pasted excerpts. Same for any principle docs they maintain elsewhere.

  • Keep sections minimal. Only add a section if the user has a specific, non-default rule there. “Communicate clearly” is not a section. “Short paragraphs. Tables when comparing options. Bullets only when items are genuinely parallel.” is.

  • Name conventions generic. Use “the user” or “the human” in imperatives, not the author’s first name.

  • Don’t force symmetry. If a user has no process rules worth writing down, skip the Process section entirely.

  • 别过拟合到一次对话。 说一次又被另一次推翻的偏好是噪声。定型前要多次实例。

  • 别耍聪明。 复述其他 skill 内容、发明隐喻、给 agent 读者写「诗意」散文,是无益成本。保持可操作。

  • 引用,别内联。 用户依赖的其他 skill 用路径引用,别粘贴摘录。他们别处维护的原则文档同理。

  • 小节保持最小。 只有用户有具体、非默认规则才加小节。「沟通清楚」不是小节。「短段落。比较选项用表。条目真平行才用子弹。」才是。

  • 约定命名要泛。 祈使里用「the user」或「the human」,别用作者名。

  • 别强对称。 用户没有值得写下的流程规则,就整节跳过 Process。

Evaluation

评估

A -mode skill is subjective output. A create-skill-style test/iterate benchmark loop isn’t useful here. Vibe-check with the user: does it read like them? Did it miss anything? Then ship.

-mode skill 是主观产出。这里不适合 create-skill 式的测试/迭代基准环。跟用户 vibe-check:读起来像他们吗?漏了啥吗?然后交付。

Run a description-optimization loop only if the skill’s trigger accuracy turns out to be a problem in practice.

只有 skill 触发准确度在实践中成问题,才跑 description 优化环。

When not to use

何时不用

  • User wants a task-specific skill (not working conventions): create-skill alone, no mining required.

  • User wants to capture one narrow workflow (e.g. “how I write commit messages”). That’s a regular skill, not a mode skill.

  • 用户要任务专用 skill(不是工作约定):单独 create-skill,不必挖掘。

  • 用户要捕捉一条窄工作流(如「我怎么写 commit message」)。那是普通 skill,不是 mode skill。