跳到正文
cccskills
免费在 GitHub 公开

scaffold-exercises

Turn a course plan into numbered exercise folders with problem, solution, and explanation variants. Create starter readme files, check naming and links with the project’s linter, and fix structural errors before committing.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • Set up exercise folders for a new course section
  • Create problem, solution, and explanation stubs
  • Renumber exercises and check their structure

包含的文件(2)

  • SKILL.md3.5 KB
  • agents/openai.yaml108 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Scaffold Exercises

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

Directory naming

  • Sections: XX-section-name/ inside exercises/ (e.g., 01-retrieval-skill-building)
  • Exercises: XX.YY-exercise-name/ inside a section (e.g., 01.03-retrieval-with-bm25)
  • Section number = XX, exercise number = XX.YY
  • Names are dash-case (lowercase, hyphens)

Exercise variants

Each exercise needs at least one of these subfolders:

  • problem/ - student workspace with TODOs
  • solution/ - reference implementation
  • explainer/ - conceptual material, no TODOs

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

Required files

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

  • Is not empty (must have real content, even a single title line works)
  • Has no broken links

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:

  • Each exercise has subfolders (problem/, solution/, explainer/)
  • At least one of problem/, explainer/, or explainer.1/ exists
  • readme.md exists and is non-empty in the primary subfolder
  • No .gitkeep files
  • No speaker-notes.md files
  • No broken links in readmes
  • No pnpm run exercise commands in readmes
  • main.ts required per subfolder unless it's readme-only

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"

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

ask-matt

免费有简介AI 评分 90分

根据任务的规模和阶段,指导你选择相关技能及其使用顺序,涵盖想法梳理、实现和故障排查,帮助确定下一步以及如何衔接后续工作。

  • 选择从想法到实现的步骤
  • 确定故障排查的起点
  • 规划分多次会话完成的开发
mattpocock/skills29.6万2026年10月13日 更新

chief-of-staff

免费有简介AI 评分 60分

在单次会话中协调承担不同任务的子智能体,推进长期目标。后台工作与用户对话同时进行,并改进共享规范、工作环境和后续任务所需的信息访问条件。

  • 协调长期目标中的任务分工
  • 后台推进工作并持续对话
  • 改进共享规范和工作环境
mattpocock/skills29.6万2026年10月13日 更新

claude-handoff

免费有简介AI 评分 90分

将进行中的对话整理为交接摘要,移除敏感信息,明确后续重点、参考资料和建议技能,再启动新的后台智能体,从当前工作目录继续处理任务。

  • 将后续工作交给新的智能体
  • 限定下一次会话的任务范围
  • 整理下一次会话所需的参考资料
mattpocock/skills29.6万2026年10月13日 更新

code-review

免费有简介AI 评分 90分

以指定提交、分支或标签为基准,从开发规范和原始需求两个角度审查代码变更。分别报告规范问题与需求缺漏,便于独立判断两方面的结果。

  • 审查分支或PR的变更
  • 检查指定提交或标签之后的变更
  • 对照已记录的开发规范
mattpocock/skills29.6万2026年10月13日 更新

codebase-design

免费有简介AI 评分 90分

帮助设计用法精简、内部集中处理复杂逻辑的模块。通过统一术语和判断标准,评估模块是否易用、实现替换位置是否合适,以及是否便于测试。

  • 简化模块的调用方式
  • 集中分散的复杂逻辑
  • 选择可替换实现的位置
mattpocock/skills29.6万2026年10月13日 更新

diagnosing-bugs

免费有简介AI 评分 80分

通过能检测具体症状的测试或脚本,调查难以复现的故障和性能下降。缩小失败条件,验证多个原因假设,完成修复后检查原始复现流程及防止复发的测试。

  • 调查难以复现的错误
  • 查找处理速度下降的原因
  • 重复验证间歇性故障
mattpocock/skills29.6万2026年10月13日 更新

查看 mattpocock 的全部技能

报告此技能的问题