Communitygithub.com

AlemTuzlak/skills

当变更意图已经确定,但代理必须在制定实施计划或编写任何代码之前,梳理行为变更所涉及的范围时使用。适用于新功能、错误修复以及涉及边界移动的重构。不适用于错别字、注释、格式化、仅锁文件变更、无代码的文档,或用户仍在犹豫的场景。

skills 是什么?

该技能专为 AI 代理在动手编码前构建变更范围心智地图而设计,其核心目的是产出变更必须触及的模块与文件列表。它不生成实现计划、不编写代码、也不调用后续技能,而是纯粹地映射。技能通过一套固定的流程操作:首先确认用户意图已明确(例如已知的名称、函数或行为);接着读取或自动初始化仓库的域映射文件(`.agent/domain-map.json`),该文件以域粒度(而非函数粒度)记录代码域及其相互关系;然后聚焦变更涉及的域,通过实际阅读相关文件并仅追踪那些仍在扩展“待触及文件列表”的导入来缩小范围;当存在多条路径时,它运用一套优先级决策梯子(优先复用现有模块、留在原域、避免新增包或API,最后才是文件数量最少)来选出一条;最终以六个固定板块(命中域、部件、通信方式、待触及文件、不会触及的文件、路径选择)展示结果并立即停止。该技能支持所有主流 AI 代理平台(如 Claude Code、Cursor、Codex),并硬性规定了多项红线:不写代码、不加载下一技能、不读取已废弃的 `coupling.json`、不全局搜索工具函数、不等待用户确认。错误处理覆盖了不在 git 仓库、JSON 解析失败、命中域不明确等场景,确保代理在复杂重构或新功能开发中做到范围明确、边界清晰。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AlemTuzlak/skills/tree/HEAD/skills/touch-map

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Touch Map(变更触及图)

构建一份本变更必须触及哪些部分的心智地图。不要编写实现计划。不要编写代码。不要加载流水线中的下一个技能。后续的工作流技能会将此地图与其他技能衔接。

地图本身就是产物:即完成该变更所需的部件和文件。

何时使用

在用户已经决定变更是什么以及他们已选择的任何如何之后加载。

  • **适用于:**新功能、错误修复、移动边界的重构。
  • **跳过:**错别字、注释、格式化、仅锁文件变更、无代码的文档。
  • 如果意图仍不明确(例如“实现X”但未选择具体行为):停止。询问直到变更确定。然后再绘制地图。不要为尚未确定的特性绘制地图。

硬性关口

  1. 不要编写代码,也不调用下一个技能。 本技能只负责绘制地图。它不规划代码块,也不实现功能。
  2. 展示地图后立即停止。 不要等待批准。如果地图有误,用户会主动打断。
  3. 不要读取 coupling.json。 那是一个后续的、独立的检查。
  4. 不要遍历整个仓库查找工具函数。 仅记录代理在实际涉及的域名中看到的复用代码。后续技能会负责全面搜索。

持久化域映射

路径:<repo>/.agent/domain-map.json

随仓库一同提交。仅限域粒度。函数名不应出现在此处。

{
  "version": 1,
  "domains": [
    {
      "id": "auth",
      "owns": ["packages/auth", "packages/auth-ui"],
      "talksTo": ["users", "sessions"]
    }
  ]
}
  • id — 短名称,一个单词或使用短横线命名法(kebab-case)。
  • owns — 包或文件夹路径。
  • talksTo — 其他域的 ID。

**仅当域级别的信息发生变化时才写入此文件:**添加、删除或重命名域;owns 路径;或 talksTo 链接。在现有域内添加一个函数不得编辑此文件。

流程

流程 1:确认已明确的意图

  1. 如果变更已经清晰(已知的 Bug 名称、函数名称、行为名称),继续。
  2. 如果用户仍在选择他们想要的内容,停止绘制地图。询问直到意图明确。然后返回此处。

流程 2:加载或引导初始化域映射

  1. 如果 .agent/domain-map.json 存在,读取它。
  2. 如果缺失,在仅限域粒度下构建初始域映射:
    • 优先使用 packages/*(或仓库的包文件夹)。
    • 否则使用 src/(或主源码根目录)下的顶层区域文件夹。
    • 根据这些 owns 路径之间的导入边设置 talksTo。
    • 不要在域映射中包含函数名。
  3. 按需创建 .agent/ 目录。写入文件。在同一个会话回合中展示新的域映射。继续。不要等待。

流程 3:聚焦本变更

  1. 根据域映射和已明确的意图,选择涉及的域。
  2. 从明确属于本变更的模块开始。
  3. 读取这些文件。仅在“待触及文件列表”仍在变化时追踪导入。
  4. 当新打开的文件不再改变地图时停止。不要为了完整性而读取整个包。
  5. 将部件命名为模块加上本变更将使用或紧邻的现有函数和类型。文件是指针,不是地图本身。
  6. 记录在这些文件中实际看到的复用代码(路径 + 符号)。不要为了查找辅助函数而全局搜索整个工作区。

流程 4:如果存在多条路径,选择一条

如果只有一条诚实的路径,用一行陈述。

如果存在多条路径,选择一条。在决定性的梯子第一步停止:

  1. 复用已有的内容,而不是编写新模块。
  2. 留在涉及的域名内。不要打开新域。
  3. 如果内部变更可行,不要添加新包、层或公共 API。
  4. 然后是文件数量最少。

命名胜出的路径以及它是由梯子的哪一步决定的。文件数量最少是平局决胜项,而非完整规则。不要为了赢得文件数量而将新行为塞进一个神级文件。

流程 5:更新域映射(仅限域级别)

  1. 如果本变更添加、删除或重命名了域,或更改了 owns / talksTo,在同一个工作回合中修补 .agent/domain-map.json。
  2. 如果在域粒度上没有变化,保持文件不变。

流程 6:展示按变更绘制的触摸图

按顺序展示以下六个板块。不要编写每个任务的 markdown 文件。

  1. 命中域 — 来自域映射。
  2. 部件 — 模块以及涉及的现有函数和类型。包括已见的复用代码(路径 + 符号)。
  3. 它们如何通信 — 仅本变更使用的边(调用、类型、数据)。不是完整的调用图。仅当这些边在无序列表中难以看清时才添加 Mermaid 图。
  4. 待触及的文件 — 最终的文件列表。这是独立的产物。
  5. 不会触及的文件 — 明确声明。防止附带编辑。
  6. 路径选择 — 如果只有一条路径,用一行说明。如果存在多条路径,则说明胜出的路径及其梯子步骤。

流程 7:停止

  1. 完成流程 6 后停止。
  2. 不要编写代码。不要从本技能中加载另一个技能。

决策树

  • 意图未明确 → 流程 1,然后停止直到明确。
  • 意图明确,行为变更 → 流程 2 → 3 → 4 → 5 → 6 → 7。
  • 错别字 / 注释 / 格式 / 锁文件 / 仅文档 → 本技能不适用。
  • 域映射文件缺失 → 流程 2 第二步(引导初始化),然后继续。
  • 一条路径 vs 多条路径 → 流程 4。

红线标志

信号含义应怎么做
在用户选择特性前绘制地图意图未明确流程 1。先追问清楚。
打开 owns 中的每一个文件巡回参观而非绘制地图流程 3:当文件列表稳定时停止。
在单体仓库中全局搜索 isRecord全局搜索属于另一个技能仅记录已见的复用代码。
读取 coupling.json错误的文件将该检查留给后续步骤。
等待地图“看起来不错?”关口是展示并停止展示六个板块后立即停止。
在地图绘制后开始编码本技能只负责绘制地图流程 7。不写代码。
从此处加载下一个流水线技能让编排留在工作流停止。让工作流技能进行编排。
写入 .agent/touch-maps/<task>.md过时的任务垃圾仅在聊天(或会话)中保留。域映射文件是唯一的持久化内容。
因为添加了一个辅助函数而编辑域映射函数粒度出现在域映射中保持域映射不动。将辅助函数放在板块2中。
优先选择文件数量最少的路径神级文件陷阱运行完整的决策梯子。

错误处理

  • **不在 git 仓库内:**用六个板块绘制本变更的地图。跳过域映射文件。用一行说明。
  • **域映射 JSON 无效:**不要猜测。报告解析错误。仅在用户同意时从流程 2 第二步重新构建,或者如果意图明显(如尾随逗号、缺失括号)则修复 JSON。
  • **命中域不明确:**选择能够拥有该变更的最小域名集合。在路径选择中说明不确定性。不要为一个单文件 Bug 发明新域。
  • **用户中断指出地图有误:**修正六个板块。如果路径发生变更,重新运行流程 4。然后停止。

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

AlemTuzlak/skills

Use when the user wants to write a blog post about a feature, product change, PR, git diff, or any technical topic - accepts marketing briefs, PRs, git refs, codebase paths, or freeform descriptions as input

AlemTuzlak/skills

Use when the user wants to generate a changelog, release notes, or document what changed between versions, tags, or PRs

AlemTuzlak/skills

Use when writing, editing, or organizing documentation, when planning what docs a feature needs, and whenever planning or implementing a new feature or change in a repo (docs ship with the code). Also use when tempted to write docs without showing the discovered readers to the user, without asking for tone, or without loading simple-english and i-have-adhd. Triggers on "write docs for X", "document this feature", "add a guide", "update the docs", "reorganize the docs", "plan feature X", "implement X", or /docs.

AlemTuzlak/skills

Use when a bug is in play: a test fails, CI is red, an API returns the wrong result, a stack trace appears, or the user says it is broken or fix this. Don't use for a new feature with no failure, for types-only work, or for docs.

AlemTuzlak/skills

Use when the user invokes /i-have-adhd, says they have ADHD, or asks for ADHD-friendly output. Also used as a required writing filter by the docs skill. Don't use for marketing copy or after the user says "stop adhd mode" or "normal mode".

AlemTuzlak/skills

Use when a settled change must be turned into an ordered stack of small blocks before anyone implements. Don't use for unsettled intent, typos, comments, formatting, docs-only work, or writing the implementation itself.

AlemTuzlak/skills

Use when the user wants to write a product update email, feature announcement newsletter, or digest email for users or subscribers

AlemTuzlak/skills

Use when the user wants to turn a raw talking-head / screen-share recording into a finished, edited, annotated video plus a full content package. Removes silences, flags mistakes for the user to cut, transcribes, adds transcript-synced overlays (code, on-screen code highlights, word highlights, lists, comparisons, diagrams, section labels, punch-in zooms), renders with original audio, then generates blog/socials/YouTube content. Triggers on "produce a video", "edit my video", "annotate my recording", "/produce-video".

AlemTuzlak/skills

Use when the user runs /prove-it or says prove it, prove the changes, show me in the browser, or asks to prove a UI or API change. Don't use only because the agent is about to say done, for types-only work, or for docs with no behavior to prove.

AlemTuzlak/skills

Use when the user wants to write, draft, or author an RFC (Request for Comments) / technical design doc for a feature, change, or architectural decision. Interactively interviews the user, grounds the proposal in the actual codebase, presents 2-3 concrete API/code-snippet approaches to choose from, then writes a review-ready RFC. Triggers on "write an RFC", "draft an RFC", "RFC for X", "design doc for X", or /rfc.

AlemTuzlak/skills

Use when the user wants to deeply learn a new topic from scratch. Runs a pre-interview (current knowledge, end-goal proficiency, depth, practice load, background, scope), researches online (articles, niche-influencer blogs, canonical docs, subtopic landscape), then produces a structured markdown course with mandatory visual diagrams, evidence-based learning-science features (retrieval practice, spaced callbacks, worked-example fading, concept ledger, jargon gate, analogy hygiene), and a self-contained interactive HTML mini-course. Triggers on /teach-me, "teach me about X", "I want to learn X", "deep dive on X", "create a course on X", "study X with me".

AlemTuzlak/skills

Use when the user wants to transcribe a video or audio file to text with word-level timestamps — spins up a self-contained local Whisper (whisper.cpp) Docker service bundled in this skill and returns transcript.txt, transcript.srt, and word-level transcript.words.json. Also used as a building block by /produce-video. Triggers on "transcribe this video", "get a transcript", "transcribe-video".

AlemTuzlak/skills

Use when the user wants to write a video script for a product demo, feature walkthrough, launch video, or social media video about a feature or product change

AlemTuzlak/skills

Use when the user wants YouTube metadata for a video — a click-worthy title, an SEO/above-the-fold description, tags, and timestamped chapters. Accepts a transcript (ideally timestamped SRT), a topic, a PR, or a freeform description. Used standalone and by /produce-video. Triggers on "youtube title", "youtube description", "youtube chapters", "youtube tags", "youtube metadata", "youtube-copy".

相关技能