@needfspeed/skills-library 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CATALOG.md +39 -1
  2. package/README.md +13 -2
  3. package/docs/pstack/README.md +42 -0
  4. package/docs/pstack/poteto-agent.md +8 -0
  5. package/package.json +5 -2
  6. package/skills/pstack/LICENSE +21 -0
  7. package/skills/pstack/architect/SKILL.md +79 -0
  8. package/skills/pstack/architect/references/rationale-template.md +35 -0
  9. package/skills/pstack/architect/references/runner-prompt.md +19 -0
  10. package/skills/pstack/arena/SKILL.md +71 -0
  11. package/skills/pstack/automate-me/SKILL.md +109 -0
  12. package/skills/pstack/figure-it-out/SKILL.md +55 -0
  13. package/skills/pstack/how/SKILL.md +134 -0
  14. package/skills/pstack/how/references/critic-prompt.md +59 -0
  15. package/skills/pstack/how/references/critique-rubric.md +58 -0
  16. package/skills/pstack/how/references/explainer-prompt.md +55 -0
  17. package/skills/pstack/how/references/explorer-prompt.md +52 -0
  18. package/skills/pstack/interrogate/SKILL.md +106 -0
  19. package/skills/pstack/interrogate/references/code-quality-review.md +47 -0
  20. package/skills/pstack/interrogate/references/lead-judgment.md +58 -0
  21. package/skills/pstack/interrogate/references/reviewer-prompt.md +72 -0
  22. package/skills/pstack/interrogate/references/rubric.md +77 -0
  23. package/skills/pstack/poteto-mode/SKILL.md +124 -0
  24. package/skills/pstack/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  25. package/skills/pstack/poteto-mode/playbooks/autonomous-run.md +12 -0
  26. package/skills/pstack/poteto-mode/playbooks/bug-fix.md +17 -0
  27. package/skills/pstack/poteto-mode/playbooks/eval.md +27 -0
  28. package/skills/pstack/poteto-mode/playbooks/feature.md +21 -0
  29. package/skills/pstack/poteto-mode/playbooks/investigation.md +14 -0
  30. package/skills/pstack/poteto-mode/playbooks/multi-phase-plan.md +3 -0
  31. package/skills/pstack/poteto-mode/playbooks/opening-a-pr.md +11 -0
  32. package/skills/pstack/poteto-mode/playbooks/pause-safely.md +10 -0
  33. package/skills/pstack/poteto-mode/playbooks/perf-issue.md +13 -0
  34. package/skills/pstack/poteto-mode/playbooks/prototype.md +14 -0
  35. package/skills/pstack/poteto-mode/playbooks/refactoring.md +15 -0
  36. package/skills/pstack/poteto-mode/playbooks/runtime-forensics.md +11 -0
  37. package/skills/pstack/poteto-mode/playbooks/session-pickup.md +13 -0
  38. package/skills/pstack/poteto-mode/playbooks/trace-forensics.md +14 -0
  39. package/skills/pstack/poteto-mode/playbooks/visual-parity.md +11 -0
  40. package/skills/pstack/poteto-mode/references/plan.md +105 -0
  41. package/skills/pstack/principle-boundary-discipline/SKILL.md +32 -0
  42. package/skills/pstack/principle-build-the-lever/SKILL.md +23 -0
  43. package/skills/pstack/principle-encode-lessons-in-structure/SKILL.md +31 -0
  44. package/skills/pstack/principle-exhaust-the-design-space/SKILL.md +21 -0
  45. package/skills/pstack/principle-experience-first/SKILL.md +19 -0
  46. package/skills/pstack/principle-fix-root-causes/SKILL.md +22 -0
  47. package/skills/pstack/principle-foundational-thinking/SKILL.md +19 -0
  48. package/skills/pstack/principle-guard-the-context-window/SKILL.md +17 -0
  49. package/skills/pstack/principle-laziness-protocol/SKILL.md +17 -0
  50. package/skills/pstack/principle-make-operations-idempotent/SKILL.md +24 -0
  51. package/skills/pstack/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
  52. package/skills/pstack/principle-minimize-reader-load/SKILL.md +21 -0
  53. package/skills/pstack/principle-never-block-on-the-human/SKILL.md +23 -0
  54. package/skills/pstack/principle-outcome-oriented-execution/SKILL.md +22 -0
  55. package/skills/pstack/principle-prove-it-works/SKILL.md +33 -0
  56. package/skills/pstack/principle-redesign-from-first-principles/SKILL.md +16 -0
  57. package/skills/pstack/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  58. package/skills/pstack/principle-sequence-verifiable-units/SKILL.md +22 -0
  59. package/skills/pstack/principle-subtract-before-you-add/SKILL.md +20 -0
  60. package/skills/pstack/principle-type-system-discipline/SKILL.md +29 -0
  61. package/skills/pstack/reflect/SKILL.md +77 -0
  62. package/skills/pstack/reflect/references/divergent-reviewer.md +43 -0
  63. package/skills/pstack/reflect/references/judgment-reviewer.md +42 -0
  64. package/skills/pstack/reflect/references/synthesizer.md +56 -0
  65. package/skills/pstack/reflect/references/tooling-reviewer.md +57 -0
  66. package/skills/pstack/setup-pstack/SKILL.md +55 -0
  67. package/skills/pstack/show-me-your-work/SKILL.md +82 -0
  68. package/skills/pstack/show-me-your-work/references/decision-log-template.tsv +1 -0
  69. package/skills/pstack/show-me-your-work/scripts/log.sh +40 -0
  70. package/skills/pstack/tdd/SKILL.md +44 -0
  71. package/skills/pstack/typescript-best-practices/SKILL.md +24 -0
  72. package/skills/pstack/typescript-best-practices/references/patterns.md +223 -0
  73. package/skills/pstack/unslop/SKILL.md +80 -0
  74. package/skills/pstack/why/SKILL.md +229 -0
  75. package/skills/pstack/why/references/epistemics.md +144 -0
  76. package/skills/pstack/why/references/investigator-prompt.md +103 -0
  77. package/skills/pstack/why/references/source-playbook.md +17 -0
  78. package/skills/pstack/why/references/sources/code-archaeology.md +88 -0
  79. package/skills/pstack/why/references/sources/databricks.md +70 -0
  80. package/skills/pstack/why/references/sources/datadog.md +99 -0
  81. package/skills/pstack/why/references/sources/incident-postmortem.md +15 -0
  82. package/skills/pstack/why/references/sources/linear.md +48 -0
  83. package/skills/pstack/why/references/sources/notion.md +55 -0
  84. package/skills/pstack/why/references/sources/sentry.md +100 -0
  85. package/skills/pstack/why/references/sources/slack.md +54 -0
  86. package/skills/pstack/why/references/synthesizer-prompt.md +135 -0
package/CATALOG.md CHANGED
@@ -5,10 +5,48 @@
5
5
  | 领域 | 名称 | 入口 | 用途 |
6
6
  | --- | --- | --- | --- |
7
7
  | Java | java-mockito-tests | `skills/java/java-mockito-tests/SKILL.md` | JMockit 到 Mockito 迁移、JDK 17 兼容和测试验证 |
8
+ | pstack | poteto-mode | `skills/pstack/poteto-mode/SKILL.md` | 默认入口:读任务、选 playbook,按步骤路由到其它 skill |
9
+ | pstack | how | `skills/pstack/how/SKILL.md` | 讲清一个子系统怎么运作;改动前的代码走读 |
10
+ | pstack | why | `skills/pstack/why/SKILL.md` | 追查设计缘由、回归与事故根因,不只读代码 |
11
+ | pstack | architect | `skills/pstack/architect/SKILL.md` | 动代码前先定类型、签名与模块形状,实现时继续把关 |
12
+ | pstack | arena | `skills/pstack/arena/SKILL.md` | 同一任务并行出 N 个方案,选基底再移植各自最好的部分 |
13
+ | pstack | interrogate | `skills/pstack/interrogate/SKILL.md` | 多模型对抗式审查一个 diff,专挑毛病 |
14
+ | pstack | reflect | `skills/pstack/reflect/SKILL.md` | 长任务收尾时,把可复用的配方沉淀成 skill 修改 |
15
+ | pstack | tdd | `skills/pstack/tdd/SKILL.md` | 先写失败测试再修;仅在明确要求或有便宜的本地测试路径时 |
16
+ | pstack | typescript-best-practices | `skills/pstack/typescript-best-practices/SKILL.md` | 读写 TS/TSX 时的类型系统纪律与具体写法 |
17
+ | pstack | figure-it-out | `skills/pstack/figure-it-out/SKILL.md` | 没有现成 playbook 时,设计一套可审计的流程 |
18
+ | pstack | show-me-your-work | `skills/pstack/show-me-your-work/SKILL.md` | 用 TSV 记录每一步决策,留下可复核的决策链 |
19
+ | pstack | unslop | `skills/pstack/unslop/SKILL.md` | 去掉文字里的 AI 味 |
20
+ | pstack | automate-me | `skills/pstack/automate-me/SKILL.md` | 从历史会话挖出你的工作方式,生成你自己的 `-mode` skill |
21
+ | pstack | setup-pstack | `skills/pstack/setup-pstack/SKILL.md` | 探测可用模型,为各角色写模型路由规则 |
22
+ | pstack | principle-boundary-discipline | `skills/pstack/principle-boundary-discipline/SKILL.md` | 校验与错误处理集中在系统边界,内部保持干净 |
23
+ | pstack | principle-build-the-lever | `skills/pstack/principle-build-the-lever/SKILL.md` | 重复性工作先造工具,而不是手工硬做 |
24
+ | pstack | principle-encode-lessons-in-structure | `skills/pstack/principle-encode-lessons-in-structure/SKILL.md` | 同一个纠正出现第二次就写进结构,而不是再提醒一次 |
25
+ | pstack | principle-exhaust-the-design-space | `skills/pstack/principle-exhaust-the-design-space/SKILL.md` | 没有先例的决策,先做 2-3 个可比较的方案 |
26
+ | pstack | principle-experience-first | `skills/pstack/principle-experience-first/SKILL.md` | 产品取舍优先用户感受,而不是实现省事 |
27
+ | pstack | principle-fix-root-causes | `skills/pstack/principle-fix-root-causes/SKILL.md` | 复现问题、追到根因再修,不修症状 |
28
+ | pstack | principle-foundational-thinking | `skills/pstack/principle-foundational-thinking/SKILL.md` | 写逻辑前先定核心类型与数据形状 |
29
+ | pstack | principle-guard-the-context-window | `skills/pstack/principle-guard-the-context-window/SKILL.md` | 上下文吃紧时把批量工作路由给子 agent |
30
+ | pstack | principle-laziness-protocol | `skills/pstack/principle-laziness-protocol/SKILL.md` | 默认不加抽象、不加层,能删就删 |
31
+ | pstack | principle-make-operations-idempotent | `skills/pstack/principle-make-operations-idempotent/SKILL.md` | 命令与生命周期步骤要能安全重跑 |
32
+ | pstack | principle-migrate-callers-then-delete-legacy-apis | `skills/pstack/principle-migrate-callers-then-delete-legacy-apis/SKILL.md` | 先迁调用方,再删旧 API |
33
+ | pstack | principle-minimize-reader-load | `skills/pstack/principle-minimize-reader-load/SKILL.md` | 减少问题与答案之间的层数与隐藏状态 |
34
+ | pstack | principle-never-block-on-the-human | `skills/pstack/principle-never-block-on-the-human/SKILL.md` | 可逆的事先做出来给结果,而不是先问 |
35
+ | pstack | principle-outcome-oriented-execution | `skills/pstack/principle-outcome-oriented-execution/SKILL.md` | 分阶段迁移时朝目标架构收敛,不保留半旧半新 |
36
+ | pstack | principle-prove-it-works | `skills/pstack/principle-prove-it-works/SKILL.md` | 宣布完成前,拿真实产物验证 |
37
+ | pstack | principle-redesign-from-first-principles | `skills/pstack/principle-redesign-from-first-principles/SKILL.md` | 新需求进来时按"它本来就该这样"重新设计 |
38
+ | pstack | principle-separate-before-serializing-shared-state | `skills/pstack/principle-separate-before-serializing-shared-state/SKILL.md` | 并发写共享状态前先消除共享 |
39
+ | pstack | principle-sequence-verifiable-units | `skills/pstack/principle-sequence-verifiable-units/SKILL.md` | 把多步工作拆成可逐步验证的单元 |
40
+ | pstack | principle-subtract-before-you-add | `skills/pstack/principle-subtract-before-you-add/SKILL.md` | 先删冗余,再加新东西 |
41
+ | pstack | principle-type-system-discipline | `skills/pstack/principle-type-system-discipline/SKILL.md` | 让非法状态在类型层面写不出来 |
8
42
 
9
43
  ## Docs
10
44
 
11
- 当前暂无独立文档。与某个 skill 强相关的资料放在该 skill 的 `references/` 中。
45
+ | 领域 | 文档 | 用途 |
46
+ | --- | --- | --- |
47
+ | Java | `docs/java/README.md` | Java 相关说明 |
48
+ | pstack | `docs/pstack/README.md` | pstack 来源、收录范围、用法与注意事项 |
49
+ | pstack | `docs/pstack/poteto-agent.md` | 上游 Cursor 子 agent 定义(原样保留) |
12
50
 
13
51
  ## Examples
14
52
 
package/README.md CHANGED
@@ -18,7 +18,10 @@ templates/ 可复用模板
18
18
  CATALOG.md 全部资料索引
19
19
  ```
20
20
 
21
- 当前收录 `java-mockito-tests`,用于将 Java 项目的 JMockit 单元测试迁移到兼容 JDK 17 的 Mockito 实现。
21
+ 当前收录:
22
+
23
+ - `java-mockito-tests`:把 Java 项目的 JMockit 单元测试迁移到兼容 JDK 17 的 Mockito 实现。
24
+ - `pstack`(34 个 skill):Poteto(Lauren Tan)的 pstack 工程工作流,从 `poteto-mode` 入口开始用。原样收录,来源与许可见 `docs/pstack/README.md`。
22
25
 
23
26
  ## 使用 skill
24
27
 
@@ -26,9 +29,16 @@ CATALOG.md 全部资料索引
26
29
 
27
30
  ```powershell
28
31
  Copy-Item -Recurse node_modules/@needfspeed/skills-library/skills/java/java-mockito-tests $env:USERPROFILE/.codex/skills/
32
+
33
+ # pstack:全部 34 个 skill
34
+ Copy-Item -Recurse node_modules/@needfspeed/skills-library/skills/pstack/* $env:USERPROFILE/.codex/skills/
29
35
  ```
30
36
 
31
- 通义灵码若使用不同的技能目录,复制同一完整目录到其要求的位置;请保留 `SKILL.md`、`agents/` 和 `references/` 的相对结构。
37
+ 通义灵码若使用不同的技能目录,复制同一完整目录到其要求的位置;请保留 `SKILL.md`、`agents/`、`references/` 和 `playbooks/` 的相对结构。
38
+
39
+ ## 第三方内容
40
+
41
+ `skills/pstack/` 收录 Poteto 的 pstack,许可为 MIT,Copyright (c) 2026 Lauren Tan,全文见 `skills/pstack/LICENSE`。该目录内的 skill 正文未改动,只有目录位置按本库结构整理。其余内容为本库自有资料。
32
42
 
33
43
  ## 维护约定
34
44
 
@@ -37,6 +47,7 @@ Copy-Item -Recurse node_modules/@needfspeed/skills-library/skills/java/java-mock
37
47
  - 示例按领域放入 `examples/<领域>/`。
38
48
  - 模板放入 `templates/<类型>/`。
39
49
  - 新增资料时同步更新 `CATALOG.md` 并提升包版本。
50
+ - 收录第三方 skill 时,保留其 LICENSE,并在 `docs/<领域>/README.md` 记录上游仓库、commit 与版本。
40
51
 
41
52
  发布前运行:
42
53
 
@@ -0,0 +1,42 @@
1
+ # pstack
2
+
3
+ [Poteto(Lauren Tan)](https://x.com/poteto) 的 pstack:一套让 AI agent 写得更少、但更可靠的工程工作流 skill 集。
4
+
5
+ 这里是 pstack 的**原样收录**(skill 正文、playbook、references 均未改动),只把它放进了本库的 `skills/<领域>/<skill>/` 结构里。
6
+
7
+ ## 来源
8
+
9
+ | 项 | 值 |
10
+ | --- | --- |
11
+ | 上游仓库 | https://github.com/poteto/plugins (目录 `pstack/`) |
12
+ | 上游 commit | `74dd2291e8e37b12fd6dc49b2acbd655c6bdaf12` |
13
+ | 上游插件版本 | `0.9.0` |
14
+ | 许可 | MIT,Copyright (c) 2026 Lauren Tan,全文见 `skills/pstack/LICENSE` |
15
+
16
+ 本库只做收录与目录整理,pstack 的内容以官方仓库为准。
17
+
18
+ ## 收录内容
19
+
20
+ - `skills/pstack/`:34 个 skill
21
+ - `poteto-mode`(入口,含 15 个 playbook)与 14 个工作流 skill
22
+ - 21 个 `principle-*` 原则 skill
23
+ - `docs/pstack/poteto-agent.md`:上游的 Cursor 子 agent 定义,原样保留,供需要 agent 定义的场景使用
24
+
25
+ 上游的 `.cursor-plugin/plugin.json`(Cursor 插件清单)未收录;需要时从上游目录直接取。
26
+
27
+ ## 用法
28
+
29
+ 和本库其它 skill 一样:把完整 skill 目录复制到目标工具的技能目录,保留 `SKILL.md`、`references/`、`playbooks/` 的相对结构。
30
+
31
+ ```powershell
32
+ # 例:全部 pstack skill 复制到 Codex 技能目录
33
+ Copy-Item -Recurse node_modules/@needfspeed/skills-library/skills/pstack/* $env:USERPROFILE/.codex/skills/
34
+ ```
35
+
36
+ 从 `poteto-mode` 开始用:它读任务、挑 playbook,再按步骤路由到其它 skill。其余 skill 也可以在需要时单独调用(例如只想要 `unslop` 或 `tdd`)。
37
+
38
+ ## 注意事项
39
+
40
+ - 部分 skill 文本引用 Cursor 专有工具或命令(如 `/loop`、`AskQuestion`)以及 `setup-pstack` 生成的模型路由规则。这些内容**原样保留**,在别的 agent 里需要按运行环境自行对照。
41
+ - `principle-*` 是给 agent 读的约束条目,不是给人执行的操作手册。
42
+ - 上游版本升级时,替换 `skills/pstack/` 并同步更新本文件与 `CATALOG.md` 里的 commit 与版本号。
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: poteto-agent
3
+ description: Routing target for `/poteto-mode` and any request for poteto's style. Resume an existing `poteto-agent` for the conversation rather than spawning a sibling. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. Substituting `generalPurpose` skips that read and drifts.
4
+ ---
5
+
6
+ # Poteto subagent
7
+
8
+ You are operating as poteto-mode's full agent style. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Navigate to a leaf `principle-*` skill whenever you apply that principle.
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@needfspeed/skills-library",
3
- "version": "0.1.0",
4
- "description": "A categorized collection of reusable AI skills and engineering reference materials.",
3
+ "version": "0.2.0",
4
+ "description": "A categorized collection of reusable AI skills and engineering reference materials, including poteto's pstack.",
5
5
  "keywords": [
6
6
  "codex-skill",
7
+ "agent-skills",
8
+ "pstack",
9
+ "poteto",
7
10
  "documentation",
8
11
  "java",
9
12
  "mockito"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lauren Tan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: architect
3
+ description: "Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Architect
8
+
9
+ Design before implementing. Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. If implementation proves the sketch wrong, throw it out and redesign.
10
+
11
+ ## Start
12
+
13
+ Open a todolist with one entry per phase before starting. Autonomous mode without checkpoints needs the list to show phase position and keep phases from silently disappearing.
14
+
15
+ 1. Ground
16
+ 2. Sketch
17
+ 3. Agree
18
+ 4. Implement
19
+ 5. Scrap
20
+
21
+ ## Phase A: Ground the problem
22
+
23
+ Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. Critique mode if existing structure is the constraint or the design must push back on it.
24
+
25
+ Naming a file isn't grounding. Produce the traced model `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess.
26
+
27
+ Skip Phase A only when the work is genuinely greenfield with no surrounding system to integrate.
28
+
29
+ ## Phase B: Sketch
30
+
31
+ Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`: the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it.
32
+
33
+ Use your configured architect runners (defaults `claude-opus-4-8-thinking-xhigh`, `gpt-5.5-high-fast`, `composer-2.5-fast`).
34
+
35
+ This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.
36
+
37
+ Arena returns one synthesized design package. The synthesis decision populates the rationale's "Synthesis decision" section.
38
+
39
+ ## Phase C: Agree (opt-in)
40
+
41
+ Default: proceed directly to implementation with the synthesized design. No human checkpoint.
42
+
43
+ Opt in to a checkpoint when the invoker explicitly asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.
44
+
45
+ The synthesis can ship as its own commit either way. That's the "scaffold first" mode of the **foundational-thinking** principle skill; subsequent commits read as filling in bodies against a stable contract. Planned and scoped breakage during fill-in is fine, per the **outcome-oriented-execution** principle skill. For adversarial pressure on the design before implementing, run the **interrogate** skill on the synthesized sketch.
46
+
47
+ If the human pushes back on the shape (in a checkpoint or after the fact), treat that as Phase A evidence. Re-ground and re-run Phase B before writing more code.
48
+
49
+ ## Phase D: Implement against the sketch
50
+
51
+ Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract.
52
+
53
+ Deviations from the sketch are signal worth surfacing, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. Surface it; don't bolt it on.
54
+
55
+ ## Phase E: Scrap when the architecture is wrong
56
+
57
+ If implementation keeps producing friction the sketch can't absorb, throw the sketch out. Don't bolt fixes onto a wrong design, per the **redesign-from-first-principles** and **fix-root-causes** principle skills.
58
+
59
+ The signal is a *pattern*, not single instances. Tells:
60
+
61
+ - The same shape of workaround appearing repeatedly across unrelated code.
62
+ - Multiple unrelated edge cases that all need special-case branches.
63
+ - Types that need escape hatches (`any`, casts, optional fields always set in practice) to compile.
64
+ - The "we need a lock" reflex when the sketch said the state wasn't shared.
65
+ - Callers having to know the abstraction's internal rules to use it.
66
+ - Two or more independent Phase D deviations of the same shape across the implementation. Surfacing deviations is Phase D's job; a repeated pattern of them is Phase E's trigger.
67
+
68
+ Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex; complexity in the data is not complexity in the design. The rewrite signal is repeated friction of the same shape, not single hard cases.
69
+
70
+ When you scrap:
71
+
72
+ 1. Re-run the **how** skill over what's been built. The implementation lessons enter the new design as inputs, not vibes.
73
+ 2. Redesign as if the new constraints had been day-one assumptions, per redesign-from-first-principles.
74
+ 3. Subtract before adding, per the **subtract-before-you-add** principle skill. The new sketch should be smaller than the old one before it grows.
75
+ 4. Return to Phase B and re-run arena.
76
+
77
+ ## Outputs
78
+
79
+ The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes; module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision.
@@ -0,0 +1,35 @@
1
+ # Rationale template
2
+
3
+ The prose that ships alongside the type sketch. One page. Sentence-case headings, no boilerplate. Replace the italic notes with actual content.
4
+
5
+ ## Problem
6
+
7
+ *One paragraph. What we're trying to do, and what about the existing system or constraints makes the shape non-obvious. If [Phase A](../SKILL.md#phase-a-ground-the-problem) surfaced constraints the design must honor (existing types to interop with, callers we can't break, invariants that crossed our boundary), name them here so the reader sees the same constraints you saw.*
8
+
9
+ ## Usage (caller's view)
10
+
11
+ *Write this first, before the type sketch. Show the README or quickstart the consumer reads, plus two or three realistic call sites in their own code. What they import, what they call, what comes back. The type sketch in [Shape](#shape) is derived from this. The two must agree; when they diverge, reconcile the sketch to the usage, not the reverse. The caller's experience is the spec. The types serve it.*
12
+
13
+ ## Shape
14
+
15
+ *The recommended architecture. Data structures first; then how data flows through the signatures. Name the load-bearing decisions: which invariants are encoded in types, where validation lives, what the system deliberately does not do. Cite the principle behind each decision (e.g., `per boundary-discipline`); don't restate it.*
16
+
17
+ ## Synthesis decision
18
+
19
+ *Filled in by [arena](../../arena/SKILL.md). Records which candidate became the base and why, what was adapted from each of the others, and what was rejected and why.*
20
+
21
+ ## Tradeoffs accepted
22
+
23
+ *One bullet per tradeoff the chosen shape makes. Form: "we accept X in exchange for Y." Name anything a future reader might mistake for an oversight, including things that look like premature optimization or premature simplification.*
24
+
25
+ ## Alternatives considered
26
+
27
+ *Required. Name at least one concrete alternative shape, with one line on why it lost. Two or three when the design space had real contenders; one is fine when the constraints forced the answer, with the conclusion phrased as "this was the only viable shape because..." Avoid listing flavors of the same shape. Distinct from "Synthesis decision": this section covers design alternatives the chosen shape considered and rejected, not other runner candidates.*
28
+
29
+ ## Open questions and risks
30
+
31
+ *Things you noticed during the sketch that the human needs to weigh in on, and risks worth flagging before implementation starts. Phrase as questions, not assertions, so the human's answer is the resolution rather than a comment.*
32
+
33
+ ## Next implementation step
34
+
35
+ *The first thing to build against the sketch. One sentence. What you'd start writing immediately after synthesis (or after Phase D sign-off, if a checkpoint was opted into).*
@@ -0,0 +1,19 @@
1
+ # Architect runner prompt
2
+
3
+ The orchestrator passes this file through to every parallel candidate runner during Phase B and fills in the variable inputs around it: the task, the Phase A grounding artifacts, the isolated working directory, and the path to write outputs. The working directory is a git worktree when available, otherwise a per-runner subdirectory under the sketch dir; what matters is independence between candidates.
4
+
5
+ You are producing one candidate design in architect's parallel exploration. Read the **architect** skill in full first; that's the workflow you're inside. Output a candidate design package: type sketch, function signatures, module map, and prose rationale shaped per [`rationale-template.md`](rationale-template.md).
6
+
7
+ Apply the following discipline. The orchestrator compares candidates on these axes to pick a base.
8
+
9
+ - Caller's usage first. Write the README-style usage and two or three real call sites before the types, then derive the type sketch from them. The usage is the spec; the two must agree, so reconcile the sketch to the usage, not the reverse.
10
+ - Data structures first. Get the core types right and the code becomes obvious. Trace each dominant access pattern through the proposed structure; if the answer is "we'll add a map / index / cache later," the structure is wrong.
11
+ - Shared state: if two actors might both write, ask "what happens?" If the answer isn't "nothing," default to per-actor state with a merge at the read boundary, per the **separate-before-serializing-shared-state** principle skill.
12
+ - Make boundaries visible. `not implemented` errors for bodies, `// TODO` pseudocode for tricky logic, doc comments stating intent and invariants. A reader should trace data from input to output by reading types and signatures alone.
13
+ - Encode invariants in types: hard-to-misuse types > runtime checks > prose comments, per the **encode-lessons-in-structure** principle skill.
14
+ - Validate at boundaries, trust types inside, per the **boundary-discipline** principle skill. Business logic as pure functions; the shell stays thin.
15
+ - Single source of truth per invariant. Derive instead of sync.
16
+ - Idempotent state transitions where applicable, per the **make-operations-idempotent** principle skill. Ask what happens if the operation runs twice or crashes halfway.
17
+ - Short call chains. If tracing the flow needs more than three files, flatten the hierarchy, per the **laziness-protocol** and **minimize-reader-load** principle skills.
18
+
19
+ You are one of several runners, each on a different model. Produce the best design your model can make; don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: arena
3
+ description: "Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Arena
8
+
9
+ Fan out N parallel attempts at the same task. Read every candidate end to end. Pick the strongest as the base. Graft the best ideas from the others into it. Verify the synthesized result.
10
+
11
+ ## Start
12
+
13
+ Open a todolist with one entry per phase before launching anything. The arena runs autonomously and the list keeps phases from silently disappearing.
14
+
15
+ 1. Frame
16
+ 2. Fan out
17
+ 3. Cross-judge
18
+ 4. Pick
19
+ 5. Graft
20
+ 6. Verify
21
+
22
+ ## Phase A: Frame
23
+
24
+ The N candidates will receive the same prompt, so the prompt is the contract. Get it right before spawning anything.
25
+
26
+ 1. State the artifact each candidate is producing.
27
+ 2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. Concrete: `Adds a --dry-run flag that skips writes`. Vague: `code is correct`. The rubric is the picker's tool in Phase D; candidates only see the task.
28
+ 3. Pick the runners. Default runners are your configured arena list (defaults `claude-opus-4-8-thinking-xhigh`, `gpt-5.5-high-fast`, `composer-2.5-fast`). Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive.
29
+ 4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`). N candidates writing to the same path is shared mutable state and fails the the **separate-before-serializing-shared-state** principle skill test.
30
+
31
+ ## Phase B: Fan out
32
+
33
+ Spawn all N subagents in one message with `run_in_background: true`, each with the task, the path to the shared grounding, its own output path, and instructions to produce both the artifact and a short rationale.
34
+
35
+ The rationale is mandatory. Without it, the parent cannot tell whether a candidate's structure is principled or accidental, which makes Phase E grafting unreliable. Each rationale names the alternatives the candidate considered and what it rejected.
36
+
37
+ If a candidate fails to produce output, proceed with N-1 and note the dropout in the synthesis record.
38
+
39
+ ## Phase C: Cross-judge
40
+
41
+ After all Phase B candidates complete, spawn one readonly judge subagent on a different model family from the parent's. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts.
42
+
43
+ ## Phase D: Pick a base
44
+
45
+ Read every candidate end to end before picking. Skimming N candidates surfaces only the candidate whose surface looks most familiar.
46
+
47
+ Score each candidate against the rubric criterion by criterion, not on holistic feel. Compare against the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding.
48
+
49
+ Pick the base on which candidate a future maintainer can extend most easily without breaking invariants. Prefer the cleaner boundary or smaller surface area when two feel tied, per the Laziness Protocol.
50
+
51
+ Record the pick and the reason in a short synthesis note alongside the base artifact, including the cross-judge's verdict.
52
+
53
+ ## Phase E: Graft
54
+
55
+ Walk each losing candidate once more and identify what is worth porting into the base. The signal is usually one or two things per candidate, not most of it.
56
+
57
+ Fold each graft in by hand, per the **redesign-from-first-principles** principle skill. Don't paste mechanically. The result has to remain coherent under one mental model.
58
+
59
+ Record what was grafted, from which candidate, and what was rejected and why. The rejection notes are the highest-signal part of the record. Future readers learn from what you considered and dropped, not just what you kept.
60
+
61
+ When N candidates converge on the same shape, that is a strong agreement signal. Note the convergence in the record and ship the consensus shape. No graft is needed. When N candidates wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence.
62
+
63
+ ## Phase F: Verify
64
+
65
+ The synthesized artifact has to hold up under the same scrutiny as any other output, per the **prove-it-works** principle skill. The arena does not earn you a pass.
66
+
67
+ If verification surfaces a problem the arena did not catch, either Phase A was wrong (re-frame and re-run) or one candidate caught it and you missed the graft (go back to Phase E). Don't paper over.
68
+
69
+ ## Outputs
70
+
71
+ One synthesized artifact. One short synthesis note alongside, naming the base, the grafts (with source candidate), the rejections, the dropouts if any, and the verification result.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: automate-me
3
+ description: "Use for \"automate me\", \"create/update/refresh my -mode skill\", \"turn/capture my preferences or working style into a skill\", or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via create-skill + unslop, optionally pulling fresh evidence from recent transcripts."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Automate me
8
+
9
+ 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`).
10
+
11
+ 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.
12
+
13
+ ## Flow
14
+
15
+ ### 0. Check for an existing skill
16
+
17
+ Look for `*-mode/SKILL.md` matching the user's handle, under the project's `.cursor/skills/` or `~/.cursor/skills/`. If one exists, confirm intent with `AskQuestion` (unless they already said "update my skill" or similar):
18
+
19
+ - Update the existing skill (default for repeat runs)
20
+ - Start fresh (rare; ask why before doing it)
21
+
22
+ Update mode changes the rest of the flow:
23
+ - Step 1 mines only history since the skill was last edited (`git log -1 --format=%cI <path>`).
24
+ - Step 2 asks what's changed or missing, not what to capture from zero.
25
+ - 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.
26
+
27
+ ### 1. Mine their history
28
+
29
+ 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.
30
+
31
+ 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:
32
+
33
+ - Response preferences (length, tone, format, "dumb it down" corrections)
34
+ - Delegation habits (subagents, models, specialized workflows, parallelism)
35
+ - Verification posture (what "done" means; unit tests vs live repro; reviewers)
36
+ - Code and prose discipline (style, principles cited, lint/format tools)
37
+ - Process conventions (worktrees, commits, PRs, review/merge tooling)
38
+ - Meta preferences (fixing skills mid-task, proposing new ones)
39
+
40
+ Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence; lone signals are weak and usually get dropped.
41
+
42
+ ### 2. Ask the user directly
43
+
44
+ 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. Lower cognitive load, higher hit rate.
45
+
46
+ 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.
47
+
48
+ Don't dump 20 questions. Two structured rounds plus one open question is usually enough.
49
+
50
+ ### 3. Cluster findings
51
+
52
+ Group the combined signals into sections. Common ones (use only what applies):
53
+
54
+ - **Response style**: length, tone, format.
55
+ - **Autonomy**: how much to do without asking; MCP tool use.
56
+ - **Understand first**: which skills to reach for when scoping or investigating a change.
57
+ - **Subagents**: default, parallelism, model-to-task, specialized workflows.
58
+ - **Prose / code discipline**: principles, lint tools, style guides.
59
+ - **Review and verify**: repro posture, verification skills, live-testing tools.
60
+ - **Process**: git worktrees, commits, PRs, review/merge tooling.
61
+ - **Skills**: skill-authoring habits, fix-the-skill-first, proposing new skills.
62
+
63
+ 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.
64
+
65
+ ### 4. Draft the skill
66
+
67
+ Use Cursor's built-in `create-skill` skill to author the skill. Placement:
68
+
69
+ - Path: `.cursor/skills/<handle>-mode/SKILL.md` in the project (or `~/.cursor/skills/<handle>-mode/` if the user prefers a personal skill).
70
+ - Handle: the user's first name or chosen identifier.
71
+ - Frontmatter `description`: trigger on their name + `/<handle>-mode` + "work in their style", not on generic keywords like "write code" or "review PR".
72
+ - 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.
73
+ - Frontmatter `disable-model-invocation: true` by default. Mode skills are heavy and opinionated; they should only apply when the user explicitly invokes them (by name or slash command), not auto-trigger on description matching. Opt out only if the user explicitly wants their mode to apply on every turn.
74
+
75
+ ### 5. Iterate on prose
76
+
77
+ Apply the **unslop** skill and `create-skill`'s writing guidelines to every line. Both apply to any agent-read prose, not just skills.
78
+
79
+ Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly; a mode skill is not a manual.
80
+
81
+ ### 6. Land it
82
+
83
+ Work in a worktree off main. Commit and open a PR so the user can review it. Don't push to main directly.
84
+
85
+ ## Guardrails
86
+
87
+ - **Don't overfit to one conversation.** A preference stated once and contradicted another time is noise. Require multiple instances before codifying it.
88
+ - **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.
89
+ - **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.
90
+ - **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.
91
+ - **Name conventions generic.** Use "the user" or "the human" in imperatives, not the author's first name. Others may read or adopt the skill.
92
+ - **Don't force symmetry.** If a user has no process rules worth writing down, skip the Process section entirely. Sparse is fine; bloated is not.
93
+
94
+ ## Evaluation
95
+
96
+ 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.
97
+
98
+ Run a description-optimization loop only if the skill's trigger accuracy turns out to be a problem in practice.
99
+
100
+ ## When not to use
101
+
102
+ - User wants a task-specific skill (not working conventions): `create-skill` alone, no mining required.
103
+ - User wants to capture one narrow workflow (e.g. "how I write commit messages"): that's a regular skill, not a mode skill.
104
+
105
+ ## Reference files
106
+
107
+ - The **poteto-mode** skill: example of the output shape.
108
+ - The **unslop** skill: prose discipline for every line.
109
+ - Cursor's built-in `create-skill` skill: skill authoring process and writing guidelines.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: figure-it-out
3
+ description: "Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for /figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Figure it out
8
+
9
+ When the task matches no playbook, design one. The deliverable before any code is the workflow itself: a sequence of phases that scales rigor to the task, runs the scientific method, and leaves a decision trail a human can audit after stepping away. Bias toward more rigor. The cost of building the wrong thing dwarfs the cost of being careful.
10
+
11
+ Don't reinvent a playbook you already have. A focused single-unit task that matches Bug fix, Perf, Feature, Visual parity, Eval, or Multi-phase plan routes there. But a large or cross-cutting version of one (a migration across many call sites, an ambitious multi-part change), or work the user reviews after stepping away, belongs here even though a single-unit version would be a Feature. The rigor and the audit trail are the point.
12
+
13
+ ## Start
14
+
15
+ Open a todolist whose first item is to read the Principles section of the **poteto-mode** skill. Then add the phases below as todos.
16
+
17
+ ## Phase A: Frame
18
+
19
+ Ground first, then commit. Don't start the run until you can state:
20
+
21
+ - The definition of done as a falsifiable predicate (the **prove-it-works** principle skill). "Done well" has to be checkable.
22
+ - Scope, quantified: rough units and effort, plus the blockers grounding surfaced. Raise them before spending hours, not after fifty doomed commits.
23
+ - The rigor level, biased high. One-way doors and high blast radius get more; reversible low-stakes steps get less. Rigor is gates and artifacts, not "try harder".
24
+
25
+ Present the framing and tradeoffs before committing to a long run. Reversible work proceeds (the **never-block-on-the-human** principle skill), but a multi-hour run earns one checkpoint.
26
+
27
+ ## Phase B: Design the workflow
28
+
29
+ Decompose into atomic, independently-landable units. Sequence riskiest-unknown-first so option value stays high. Scaffold and verification come before features (the **foundational-thinking** principle skill).
30
+
31
+ - Build the verification harness before the work, with the baseline captured from the pre-change state, so the check reads as "old value vs new value".
32
+ - For one-way-door design decisions, run the **architect** skill (it runs **arena**) with diverse, isolated, opinionated candidates and a read-only judge on a different model family. Skip it for mechanical work whose shape is already concrete. A second arena over a settled design is over-engineering (the **laziness-protocol** principle skill).
33
+ - Decide what fans out. Parallelize only across genuine seams, and give each worker its own worktree or branch (the **separate-before-serializing-shared-state** principle skill). Don't over-fan.
34
+ - Write the designed phase list down. That list is what the human reviews.
35
+
36
+ Then put the design into motion. Add its steps to the todolist as concrete items, after the Phase C entry and before Phase D. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end.
37
+
38
+ ## Phase C: Run the loop
39
+
40
+ Each unit is an experiment: state the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't.
41
+ Apply the **sequence-verifiable-units** principle skill, verifying each unit before starting the next instead of batching checks at the end.
42
+
43
+ - Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system. A blank screenshot passes a lazy gate.
44
+ - Pair delegated work with a judge and audit the delegates' artifacts yourself before trusting them. If a worker games the gate, reset and harden the contract. If the gate itself is wrong, fix the gate in its own change rather than routing around it.
45
+ - A verdict is VERIFIED, NOT VERIFIED, or INCONCLUSIVE. Inconclusive is not a pass. Don't hide a negative.
46
+
47
+ ## Phase D: Keep the audit trail
48
+
49
+ Log the run via the **show-me-your-work** skill, one canonical TSV with a row per decision and per unit, evidence as links. figure-it-out's work is usually ambitious enough to commit the trail so the reviewer can read it in the PR; commit it when confidence has to be shown. Prefer evidence produced by committed scripts so a reviewer can re-run it. The trail plus the diff is what lets the human come back and trust the work.
50
+
51
+ ## Phase E: Verify and hand back
52
+
53
+ Check the whole against the Phase A predicate on the real product, not just the harness. Encode any recurring correction as a gate, a lint rule, a check, or a script, so the win can't silently regress (the **encode-lessons-in-structure** principle skill).
54
+
55
+ **Reply:** the playbook you designed, the rigor level and why, the decision-trail path, what's verified against the predicate, and what's still open.