Matt Pocock 杂项 - scaffold-exercises

Model: qwen-max | ¥0.15/call
工程方法论GPT-4.1工程实践scaffoldexercises

scaffold-exercises:mattpocock/skills 方法论: misc/scaffold-exercises,适用于工程实践、代码质量与开发流程优化。

Calls: 1

Skill Documentation

Matt Pocock 杂项 - scaffold-exercises

摘要

scaffold-exercises:mattpocock/skills 方法论: misc/scaffold-exercises,适用于工程实践、代码质量与开发流程优化。

> 来源: mattpocock/skills (141k stars) — Total TypeScript 创始人 Matt Pocock

> 类目: 杂项

> 原文件: skills/misc/scaffold-exercises/SKILL.md

> 模型推荐: gpt-4.1 (代码工程)

这个 skill 是干嘛的

Matt Pocock (Total TypeScript, 141k stars) 沉淀下来的"日常代码工程动作"skill 模板。

每一个对应一个具体动作(代码评审 / TDD / 重构 / 文档对齐 / 任务交接),不是工具,是"该怎么干这件事"的工作流模板。

michael 强调"skill 要有相应的指导功能,指导用户使用",所以这里加了下面两节让 Agent 和用户对接。

---

🤖 Agent 使用说明

1. 接到任务后先按这个 skill 的检查清单走一遍

2. 清单里如果出现"先做 X 才能做 Y"的红线 → 必须先完成 X

3. 跑完清单后开始动手(改代码 / 写文档 / 评审)

4. 完工前用 `verification-before-completion`(superpowers) 或 `verification` 类 step 自检

5. 任务量大时考虑用 `dispatching-parallel-agents`(superpowers) 或 `wayfinder`(mattpocock) 拆解

👤 用户需要做什么?

1. 告诉 Agent 你要做什么(一句话即可)

2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文

3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答

4. 完工后让 Agent 跑一遍自检再交回

5. 整个过程 Agent 自动化,不需要手工介入

---

原 skill 内容(mattpocock/skills/misc/scaffold-exercises/SKILL.md)

---

name: scaffold-exercises

description: Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

---

Scaffold Exercises

Create exercise directory structures that pass `pnpm ai-hero-cli internal lint`, then commit with `git commit`.

Directory naming

Exercise variants

Each exercise needs at least one of these subfolders:

When stubbing, default to `explainer/` unless the plan specifies otherwise.

Required files

Each subfolder (`problem/`, `solution/`, `explainer/`) needs a `readme.md` that:

When stubbing, create a minimal readme with a title and a description:

# Exercise Title

Description here

If the subfolder has code, it also needs a `main.ts` (>1 line). But for stubs, a readme-only exercise is fine.

Workflow

1. **Parse the plan** - extract section names, exercise names, and variant types

2. **Create directories** - `mkdir -p` for each path

3. **Create stub readmes** - one `readme.md` per variant folder with a title

4. **Run lint** - `pnpm ai-hero-cli internal lint` to validate

5. **Fix any errors** - iterate until lint passes

Lint rules summary

The linter (`pnpm ai-hero-cli internal lint`) checks:

Moving/renaming exercises

When renumbering or moving exercises:

1. Use `git mv` (not `mv`) to rename directories - preserves git history

2. Update the numeric prefix to maintain order

3. Re-run lint after moves

Example:

git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings

Example: stubbing from a plan

Given a plan like:

Section 05: Memory Skill Building
- 05.01 Introduction to Memory
- 05.02 Short-term Memory (explainer + problem + solution)
- 05.03 Long-term Memory

Create:

mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer

Then create readme stubs:

exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"

常见问题(FAQ)

使用「scaffold-exerc」这个 skill 能解决什么问题?

本 skill 专注于scaffold-exerc,mattpocock/skills 方法论: misc/scaffold-exercises。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。

什么情况下适合使用「scaffold-exerc」?

当你需要在scaffold-exercises相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。

使用「scaffold-exerc」前需要准备什么?

需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。

FAQ

👤 用户需要做什么?

1. 告诉 Agent 你要做什么(一句话即可)

2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文

3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答

4. 完工后让 Agent 跑一遍自检再交回

5. 整个过程 Agent 自动化,不需要手工介入

---

使用「scaffold-exerc」这个 skill 能解决什么问题?

本 skill 专注于scaffold-exerc,mattpocock/skills 方法论: misc/scaffold-exercises。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。

什么情况下适合使用「scaffold-exerc」?

当你需要在scaffold-exercises相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。

使用「scaffold-exerc」前需要准备什么?

需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。