agentleFS
shumingyang-opencodeshumingyang-opencode/mattpocock-skills-zh-tw/skills/misc/scaffold-exercises/SKILL.md

scaffold-exercises

Skill3 starsChanged 4 months agoMITView on GitHub

建立帶有 section、題目、解答與講解、且能通過 lint 檢查的練習目錄結構。當使用者想要建立練習骨架、建立練習樁,或設定新的課程 section 時使用。

41 other projects use a version of this, 40 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use edit-article, request-refactor-plan and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kayamanSkill

    edit-article

    Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

    Also in 17 projects that use this

  • kayamanSkill

    request-refactor-plan

    Guides creating a detailed refactor plan with tiny commits via user interview, then files it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

    Also in 16 projects that use this

  • Jonathan0823Skill

    design-an-interface

    Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

    Also in 16 projects that use this

  • kennethkeimSkill

    ubiquitous-language

    Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".

    Also in 16 projects that use this

The file

Files
SKILL.md

建立練習骨架(Scaffold Exercises)

建立能通過 pnpm ai-hero-cli internal lint 的練習目錄結構,然後用 git commit 提交。

目錄命名

  • Sections:exercises/ 內部的 XX-section-name/(例如 01-retrieval-skill-building)
  • 練習:section 內部的 XX.YY-exercise-name/(例如 01.03-retrieval-with-bm25)
  • Section 號碼 = XX,練習號碼 = XX.YY
  • 名稱使用 dash-case(小寫、連字號)

練習變體

每個練習至少需要以下子資料夾之一:

  • problem/ - 帶有 TODO 的學生工作區
  • solution/ - 參考實作
  • explainer/ - 概念性材料,沒有 TODO

建立樁時,除非計畫另有指定,否則預設使用 explainer/。

必備檔案

每個子資料夾(problem/、solution/、explainer/)需要一個 readme.md,它必須:

  • 不是空的(必須有真實內容,即使是單一標題行也可以)
  • 沒有壞掉的連結

建立樁時,建立一個帶有標題與描述的最小 readme:

# Exercise Title

Description here

如果子資料夾有程式碼,它也需要一個 main.ts(>1 行)。但對於樁,一個只有 readme 的練習也可以。

工作流程

  1. 解析計畫 - 擷取 section 名稱、練習名稱與變體類型
  2. 建立目錄 - 為每個路徑 mkdir -p
  3. 建立樁 readmes - 每個變體資料夾一個帶有標題的 readme.md
  4. 執行 lint - pnpm ai-hero-cli internal lint 來驗證
  5. 修正任何錯誤 - 反覆直到 lint 通過

Lint 規則摘要

linter(pnpm ai-hero-cli internal lint)檢查:

  • 每個練習都有子資料夾(problem/、solution/、explainer/)
  • problem/、explainer/ 或 explainer.1/ 至少有一個存在
  • 主要子資料夾中 readme.md 存在且非空
  • 沒有 .gitkeep 檔案
  • 沒有 speaker-notes.md 檔案
  • readme 中沒有壞掉的連結
  • readme 中沒有 pnpm run exercise 命令
  • 每個子資料夾需要 main.ts,除非它只有 readme

移動/重新命名練習

重新編號或移動練習時:

  1. 使用 git mv(不是 mv)來重新命名目錄 - 保留 git 歷史
  2. 更新數字前綴以維持順序
  3. 移動後重新執行 lint

範例:

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

範例:從計畫建立樁

給定一個像這樣的計畫:

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

建立:

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

然後建立 readme 樁:

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"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.