ai-engineering-kit 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 (48) hide show
  1. package/README.md +3 -1
  2. package/dist/cli.js +4 -1
  3. package/package.json +1 -1
  4. package/template/skills/engineering/diagnose/SKILL.md +117 -0
  5. package/template/skills/engineering/diagnose/scripts/hitl-loop.template.sh +41 -0
  6. package/template/skills/engineering/grill-with-docs/ADR-FORMAT.md +47 -0
  7. package/template/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +60 -0
  8. package/template/skills/engineering/grill-with-docs/SKILL.md +88 -0
  9. package/template/skills/engineering/improve-codebase-architecture/DEEPENING.md +37 -0
  10. package/template/skills/engineering/improve-codebase-architecture/HTML-REPORT.md +123 -0
  11. package/template/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  12. package/template/skills/engineering/improve-codebase-architecture/LANGUAGE.md +53 -0
  13. package/template/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
  14. package/template/skills/engineering/prototype/LOGIC.md +79 -0
  15. package/template/skills/engineering/prototype/SKILL.md +30 -0
  16. package/template/skills/engineering/prototype/UI.md +112 -0
  17. package/template/skills/engineering/setup-matt-pocock-skills/SKILL.md +121 -0
  18. package/template/skills/engineering/setup-matt-pocock-skills/domain.md +51 -0
  19. package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  20. package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  21. package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  22. package/template/skills/engineering/setup-matt-pocock-skills/triage-labels.md +15 -0
  23. package/template/skills/engineering/tdd/SKILL.md +109 -0
  24. package/template/skills/engineering/tdd/deep-modules.md +33 -0
  25. package/template/skills/engineering/tdd/interface-design.md +31 -0
  26. package/template/skills/engineering/tdd/mocking.md +59 -0
  27. package/template/skills/engineering/tdd/refactoring.md +10 -0
  28. package/template/skills/engineering/tdd/tests.md +61 -0
  29. package/template/skills/engineering/to-issues/SKILL.md +83 -0
  30. package/template/skills/engineering/to-prd/SKILL.md +74 -0
  31. package/template/skills/engineering/triage/AGENT-BRIEF.md +168 -0
  32. package/template/skills/engineering/triage/OUT-OF-SCOPE.md +101 -0
  33. package/template/skills/engineering/triage/SKILL.md +103 -0
  34. package/template/skills/engineering/zoom-out/SKILL.md +7 -0
  35. package/template/skills/misc/git-guardrails-claude-code/SKILL.md +95 -0
  36. package/template/skills/misc/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
  37. package/template/skills/misc/migrate-to-shoehorn/SKILL.md +118 -0
  38. package/template/skills/misc/scaffold-exercises/SKILL.md +106 -0
  39. package/template/skills/misc/setup-pre-commit/SKILL.md +91 -0
  40. package/template/skills/productivity/caveman/SKILL.md +49 -0
  41. package/template/skills/productivity/grill-me/SKILL.md +10 -0
  42. package/template/skills/productivity/handoff/SKILL.md +15 -0
  43. package/template/skills/productivity/teach/GLOSSARY-FORMAT.md +35 -0
  44. package/template/skills/productivity/teach/LEARNING-RECORD-FORMAT.md +46 -0
  45. package/template/skills/productivity/teach/MISSION-FORMAT.md +31 -0
  46. package/template/skills/productivity/teach/RESOURCES-FORMAT.md +32 -0
  47. package/template/skills/productivity/teach/SKILL.md +131 -0
  48. package/template/skills/productivity/write-a-skill/SKILL.md +117 -0
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: caveman
3
+ description: >
4
+ Ultra-compressed communication mode. Cuts token usage ~75% by dropping
5
+ filler, articles, and pleasantries while keeping full technical accuracy.
6
+ Use when user says "caveman mode", "talk like caveman", "use caveman",
7
+ "less tokens", "be brief", or invokes /caveman.
8
+ ---
9
+
10
+ Respond terse like smart caveman. All technical substance stay. Only fluff die.
11
+
12
+ ## Persistence
13
+
14
+ ACTIVE EVERY RESPONSE once triggered. No revert after many turns. No filler drift. Still active if unsure. Off only when user says "stop caveman" or "normal mode".
15
+
16
+ ## Rules
17
+
18
+ Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Abbreviate common terms (DB/auth/config/req/res/fn/impl). Strip conjunctions. Use arrows for causality (X -> Y). One word when one word enough.
19
+
20
+ Technical terms stay exact. Code blocks unchanged. Errors quoted exact.
21
+
22
+ Pattern: `[thing] [action] [reason]. [next step].`
23
+
24
+ Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
25
+ Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"
26
+
27
+ ### Examples
28
+
29
+ **"Why React component re-render?"**
30
+
31
+ > Inline obj prop -> new ref -> re-render. `useMemo`.
32
+
33
+ **"Explain database connection pooling."**
34
+
35
+ > Pool = reuse DB conn. Skip handshake -> fast under load.
36
+
37
+ ## Auto-Clarity Exception
38
+
39
+ Drop caveman temporarily for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.
40
+
41
+ Example -- destructive op:
42
+
43
+ > **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
44
+ >
45
+ > ```sql
46
+ > DROP TABLE users;
47
+ > ```
48
+ >
49
+ > Caveman resume. Verify backup exist first.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: grill-me
3
+ description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
4
+ ---
5
+
6
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7
+
8
+ Ask the questions one at a time.
9
+
10
+ If a question can be answered by exploring the codebase, explore the codebase instead.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ ---
6
+
7
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
8
+
9
+ Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
10
+
11
+ Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
12
+
13
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
14
+
15
+ If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
@@ -0,0 +1,35 @@
1
+ # GLOSSARY.md Format
2
+
3
+ `GLOSSARY.md` is the canonical language for this teaching workspace. All explainers, exercises, and learning records should adhere to its terminology. Building it is itself part of learning: compressing a concept into a tight definition is evidence the user understands it.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Glossary
9
+
10
+ {One or two sentence description of the topic this glossary covers.}
11
+
12
+ ## Terms
13
+
14
+ **Hypertrophy**:
15
+ Muscle growth driven by mechanical tension and metabolic stress over repeated training sessions.
16
+ _Avoid_: Bulking, getting big
17
+
18
+ **Progressive overload**:
19
+ Systematically increasing the demand on a muscle over time — via load, volume, or intensity.
20
+ _Avoid_: Pushing harder, levelling up
21
+
22
+ **RPE (Rate of Perceived Exertion)**:
23
+ A 1–10 self-rating of how hard a set felt, where 10 is failure and 8 means two reps left in the tank.
24
+ _Avoid_: Effort score, intensity rating
25
+ ```
26
+
27
+ ## Rules
28
+
29
+ - **Add a term only when the user understands it.** The glossary is a record of compressed knowledge, not a dictionary the user reads to learn. If the user has just been introduced to a concept, wait until they can use it correctly before promoting it here.
30
+ - **Be opinionated.** When several words exist for the same concept, pick the best one and list the rest as aliases to avoid. This is how language compresses.
31
+ - **Keep definitions tight.** One or two sentences. Define what the term IS, not what it does or how to do it.
32
+ - **Use the glossary's own terms inside definitions.** Once a term is in the glossary, prefer it everywhere — including inside other definitions. This is what makes complex terms easier to grasp later.
33
+ - **Group under subheadings** when natural clusters emerge (e.g. `## Anatomy`, `## Programming`). A flat list is fine when terms cohere.
34
+ - **Flag ambiguities explicitly.** If a term is used loosely in the wider field, note the resolution: "In this workspace, 'set' always means a working set — warm-ups are tracked separately."
35
+ - **Revise as understanding deepens.** A definition the user wrote in week one may be wrong by week six. Update in place; do not leave stale entries.
@@ -0,0 +1,46 @@
1
+ # Learning Record Format
2
+
3
+ Learning records live in `./learning-records/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. Create the directory lazily — only when the first record is written.
4
+
5
+ They are the teaching equivalent of ADRs: they capture non-obvious lessons, key insights, and stated prior knowledge that will steer future sessions. They are used to calculate the zone of proximal development.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ # {Short title of what was learned or established}
11
+
12
+ {1-3 sentences: what was learned (or what prior knowledge was established), and why it matters for future sessions.}
13
+ ```
14
+
15
+ That is the whole format. A learning record can be a single paragraph. The value is recording _that_ this is now known and _why_ it changes what to teach next — not in filling out sections.
16
+
17
+ ## Optional sections
18
+
19
+ Only include these when they add genuine value. Most records won't need them.
20
+
21
+ - **Status** frontmatter (`active | superseded by LR-NNNN`) — useful when an earlier understanding turns out to be wrong and is replaced.
22
+ - **Evidence** — how the user demonstrated the understanding (a question answered, an exercise completed, prior experience cited). Useful when the claim might be revisited.
23
+ - **Implications** — what this unlocks or rules out for future sessions. Worth recording when non-obvious.
24
+
25
+ ## Numbering
26
+
27
+ Scan `./learning-records/` for the highest existing number and increment by one.
28
+
29
+ ## When to write a learning record
30
+
31
+ Write one when any of these is true:
32
+
33
+ 1. **The user demonstrated genuine understanding of something non-trivial** — not just exposure, but evidence they can use the concept correctly. This sets a new floor for what to teach next.
34
+ 2. **The user disclosed prior knowledge** — "I already know X." Record it so future sessions don't re-teach it. Also record the _depth_ claimed.
35
+ 3. **A misconception was corrected** — the user previously believed something wrong and now sees why. These are high-value: they predict future stumbling blocks for related topics.
36
+ 4. **The mission shifted in response to learning** — the user discovered they cared about something different than they thought. Cross-link to [[MISSION.md]] and update it.
37
+
38
+ ### What does _not_ qualify
39
+
40
+ - Material that was merely covered. Coverage is not learning. Wait for evidence.
41
+ - Anything already captured tersely in [[GLOSSARY.md]] as a term definition. Don't duplicate.
42
+ - Session-by-session activity logs. Learning records are not a journal — they are decision-grade insights.
43
+
44
+ ## Supersession
45
+
46
+ When a later record contradicts an earlier one (the user's understanding deepened or corrected), mark the old record `Status: superseded by LR-NNNN` rather than deleting it. The history of how understanding evolved is itself useful signal.
@@ -0,0 +1,31 @@
1
+ # MISSION.md Format
2
+
3
+ `MISSION.md` lives at the workspace root. It captures the _reason_ the user is learning this topic. Every teaching decision — what to teach next, which resources to surface, which exercises to design — should trace back to this document.
4
+
5
+ ## Template
6
+
7
+ ```md
8
+ # Mission: {Topic}
9
+
10
+ ## Why
11
+ {1-3 sentences. The concrete real-world goal the user is chasing. What changes in their life or work when they have this skill? Avoid abstract framings like "to understand X" — push for the underlying outcome.}
12
+
13
+ ## Success looks like
14
+ - {A specific, observable thing the user will be able to do}
15
+ - {Another specific thing}
16
+ - {…}
17
+
18
+ ## Constraints
19
+ - {Time, budget, prior commitments, learning preferences, anything that bounds the approach}
20
+
21
+ ## Out of scope
22
+ - {Adjacent topics the user explicitly does not want to chase right now — protects the zone of proximal development}
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **One mission per workspace.** If the user wants to learn two unrelated things, that is two workspaces.
28
+ - **Concrete over abstract.** "Run a half marathon by October" beats "get fitter." "Ship a Rust CLI to my team" beats "learn Rust."
29
+ - **Push back on vagueness.** If the user cannot articulate why, interview them before writing anything. A bad mission is worse than no mission.
30
+ - **Revise when reality shifts.** Missions change. When the user's goal moves, update this file — don't leave a stale mission steering future sessions.
31
+ - **Keep it short.** If `MISSION.md` runs past a screen, it has stopped being a compass and started being a plan.
@@ -0,0 +1,32 @@
1
+ # RESOURCES.md Format
2
+
3
+ `RESOURCES.md` is the curated set of trusted sources for this topic. Knowledge for explainers should be drawn from here, not from parametric guesses. Wisdom comes from the communities listed here.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Resources
9
+
10
+ ## Knowledge
11
+
12
+ - [Book: _The Science and Practice of Strength Training_ — Zatsiorsky & Kraemer](https://example.com)
13
+ Foundational text on programming and adaptation. Use for: anything to do with periodisation, recovery, intensity zones.
14
+ - [Article: "How Much Should I Train?" — Greg Nuckols (Stronger By Science)](https://example.com)
15
+ Evidence-based review of volume landmarks. Use for: weekly set targets per muscle group.
16
+
17
+ ## Wisdom (Communities)
18
+
19
+ - [r/weightroom](https://reddit.com/r/weightroom)
20
+ High-signal subreddit, moderated against bro-science. Use for: programme critique, plateau troubleshooting.
21
+ - Local: Tuesday strength class at {gym name}
22
+ Use for: real-time coaching feedback on lifts.
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **High-trust only.** Prefer primary sources, recognised experts, peer-reviewed work, and communities with strong moderation. If a resource is marketing dressed as education, leave it out.
28
+ - **Annotate every entry.** A bare link is useless in three months. Add one line: what it covers and when to reach for it.
29
+ - **Group by Knowledge / Wisdom.** Mirrors the philosophy in [SKILL.md](./SKILL.md). It is fine for a resource to appear in only one group.
30
+ - **Surface gaps explicitly.** If no good resource exists for an area the mission needs, write a `## Gaps` section listing what is missing. This drives future search.
31
+ - **Prune ruthlessly.** A resource that turned out to be wrong, shallow, or off-mission should be removed, not buried. Better five sharp sources than thirty mediocre ones.
32
+ - **Record community preferences.** If the user has opted out of joining communities, note it here so future sessions don't keep proposing them.
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: teach
3
+ description: Teach the user a new skill or concept, within this workspace.
4
+ disable-model-invocation: true
5
+ argument-hint: "What would you like to learn about?"
6
+ ---
7
+
8
+ The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
9
+
10
+ ## Teaching Workspace
11
+
12
+ Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
13
+
14
+ - `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](./MISSION-FORMAT.md).
15
+ - `./reference/*.html`: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
16
+ - `RESOURCES.md`: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in [RESOURCES-FORMAT.md](./RESOURCES-FORMAT.md).
17
+ - `./learning-records/*.md`: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled `0001-<dash-case-name>.md`, where the number increments each time. Use the format in [LEARNING-RECORD-FORMAT.md](./LEARNING-RECORD-FORMAT.md).
18
+ - `./lessons/*.html`: A directory of lessons. A **lesson** is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
19
+ - `NOTES.md`: A scratchpad for you to jot down user preferences, or working notes.
20
+
21
+ ## Philosophy
22
+
23
+ To learn at a deep level, the user needs three things:
24
+
25
+ - **Knowledge**, captured from high-quality, high-trust resources
26
+ - **Skills**, acquired through highly-relevant interactive lessons devised by you, based on the knowledge
27
+ - **Wisdom**, which comes from interacting with other learners and practitioners
28
+
29
+ Before the `RESOURCES.md` is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.
30
+
31
+ Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.
32
+
33
+ ### Fluency vs Storage Strength
34
+
35
+ You should be careful to split between two types of learning:
36
+
37
+ - **Fluency strength**: in-the-moment retrieval of knowledge
38
+ - **Storage strength**: long-term retention of knowledge
39
+
40
+ Fluency can give the user an illusory sense of mastery, but storage strength is the real goal. Try to design lessons which build long-term retention by desirable difficulty:
41
+
42
+ - Using retrieval practice (recall from memory)
43
+ - Spacing (distributing practice over time)
44
+ - Interleaving (mixing up different but related topics in practice - for skills practice only)
45
+
46
+ ## Lessons
47
+
48
+ A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to `./lessons/` and titled `0001-<dash-case-name>.html` where the number increments each time.
49
+
50
+ A lesson should be **beautiful** — clean, readable typography and layout — since the user will return to these later to review. Think Tufte.
51
+
52
+ The lesson should be short, and completable very quickly. Learners' working memory is very small, and we need to stay within it. But each lesson should give the user a single tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.
53
+
54
+ If possible, open the lesson file for the user by running a CLI command.
55
+
56
+ Each lesson should link via HTML anchors to other lessons and reference documents.
57
+
58
+ Each lesson should recommend a primary source for the user to read or watch. This should be the most high-quality, high-trust resource you found on the topic.
59
+
60
+ Each lesson should contain a reminder to ask followup questions to the agent. The agent is their teacher, and can assist with anything that's unclear.
61
+
62
+ ## The Mission
63
+
64
+ Every lesson should be tied into the mission - the reason that the user is interested in learning about the topic.
65
+
66
+ If the user is unclear about the mission, or the `MISSION.md` is not populated, your first job should be to question the user on why they want to learn this.
67
+
68
+ Failing to understand the mission will mean knowledge acquisition is not grounded in real-world goals. Lessons will feel too abstract. You will have no way of judging what the user should do next.
69
+
70
+ Missions may change as the user develops more skills and knowledge. This is normal - make sure to update the `MISSION.md` and add a learning record to capture the change. Confirm with the user before changing the mission.
71
+
72
+ ## Zone Of Proximal Development
73
+
74
+ Each lesson, the user should always feel as if they are being challenged 'just enough'.
75
+
76
+ The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:
77
+
78
+ - Reading their `learning-records`
79
+ - Figuring out the right thing to teach them based on their mission
80
+ - Teach the most relevant thing that fits in their zone of proximal development
81
+
82
+ ## Knowledge
83
+
84
+ Lessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.
85
+
86
+ Knowledge should first be gathered from trusted resources. Use `RESOURCES.md` to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson.
87
+
88
+ For acquiring knowledge, difficulty is the enemy. It eats working memory you need for understanding.
89
+
90
+ ## Skills
91
+
92
+ If knowledge is all about acquisition, skills are about durability and flexibility. Make the knowledge stick.
93
+
94
+ For skill acquisition, difficulty is the tool. Effortful retrieval is what builds storage strength. Skills should be taught through interactive lessons. There are several tools at your disposal:
95
+
96
+ - Interactive lessons, using quizzes and light in-browser tasks
97
+ - Lessons which guide the user through a list of real-world steps to take (for instance, yoga poses)
98
+
99
+ Each of these should be based on a **feedback loop**, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.
100
+
101
+ For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.
102
+
103
+ ## Acquiring Wisdom
104
+
105
+ Wisdom comes from true real-world interaction - testing your skills outside the learning environment.
106
+
107
+ When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a **community**.
108
+
109
+ A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.
110
+
111
+ You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.
112
+
113
+ ## Reference Documents
114
+
115
+ While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.
116
+
117
+ Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.
118
+
119
+ Some learning topics lend themselves to reference:
120
+
121
+ - Syntax and code snippets for programming
122
+ - Algorithms and flowcharts for processes
123
+ - Yoga poses and sequences for yoga
124
+ - Exercises and routines for fitness
125
+ - Glossaries for any topic with its own nomenclature
126
+
127
+ Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson.
128
+
129
+ ## `NOTES.md`
130
+
131
+ The user will sometimes express preferences of how they want to be taught, or things you should keep in mind. This is the place to record those preferences, so you can refer back to them when designing lessons or working with the user.
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: write-a-skill
3
+ description: Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
4
+ ---
5
+
6
+ # Writing Skills
7
+
8
+ ## Process
9
+
10
+ 1. **Gather requirements** - ask user about:
11
+ - What task/domain does the skill cover?
12
+ - What specific use cases should it handle?
13
+ - Does it need executable scripts or just instructions?
14
+ - Any reference materials to include?
15
+
16
+ 2. **Draft the skill** - create:
17
+ - SKILL.md with concise instructions
18
+ - Additional reference files if content exceeds 500 lines
19
+ - Utility scripts if deterministic operations needed
20
+
21
+ 3. **Review with user** - present draft and ask:
22
+ - Does this cover your use cases?
23
+ - Anything missing or unclear?
24
+ - Should any section be more/less detailed?
25
+
26
+ ## Skill Structure
27
+
28
+ ```
29
+ skill-name/
30
+ ├── SKILL.md # Main instructions (required)
31
+ ├── REFERENCE.md # Detailed docs (if needed)
32
+ ├── EXAMPLES.md # Usage examples (if needed)
33
+ └── scripts/ # Utility scripts (if needed)
34
+ └── helper.js
35
+ ```
36
+
37
+ ## SKILL.md Template
38
+
39
+ ```md
40
+ ---
41
+ name: skill-name
42
+ description: Brief description of capability. Use when [specific triggers].
43
+ ---
44
+
45
+ # Skill Name
46
+
47
+ ## Quick start
48
+
49
+ [Minimal working example]
50
+
51
+ ## Workflows
52
+
53
+ [Step-by-step processes with checklists for complex tasks]
54
+
55
+ ## Advanced features
56
+
57
+ [Link to separate files: See [REFERENCE.md](REFERENCE.md)]
58
+ ```
59
+
60
+ ## Description Requirements
61
+
62
+ The description is **the only thing your agent sees** when deciding which skill to load. It's surfaced in the system prompt alongside all other installed skills. Your agent reads these descriptions and picks the relevant skill based on the user's request.
63
+
64
+ **Goal**: Give your agent just enough info to know:
65
+
66
+ 1. What capability this skill provides
67
+ 2. When/why to trigger it (specific keywords, contexts, file types)
68
+
69
+ **Format**:
70
+
71
+ - Max 1024 chars
72
+ - Write in third person
73
+ - First sentence: what it does
74
+ - Second sentence: "Use when [specific triggers]"
75
+
76
+ **Good example**:
77
+
78
+ ```
79
+ Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
80
+ ```
81
+
82
+ **Bad example**:
83
+
84
+ ```
85
+ Helps with documents.
86
+ ```
87
+
88
+ The bad example gives your agent no way to distinguish this from other document skills.
89
+
90
+ ## When to Add Scripts
91
+
92
+ Add utility scripts when:
93
+
94
+ - Operation is deterministic (validation, formatting)
95
+ - Same code would be generated repeatedly
96
+ - Errors need explicit handling
97
+
98
+ Scripts save tokens and improve reliability vs generated code.
99
+
100
+ ## When to Split Files
101
+
102
+ Split into separate files when:
103
+
104
+ - SKILL.md exceeds 100 lines
105
+ - Content has distinct domains (finance vs sales schemas)
106
+ - Advanced features are rarely needed
107
+
108
+ ## Review Checklist
109
+
110
+ After drafting, verify:
111
+
112
+ - [ ] Description includes triggers ("Use when...")
113
+ - [ ] SKILL.md under 100 lines
114
+ - [ ] No time-sensitive info
115
+ - [ ] Consistent terminology
116
+ - [ ] Concrete examples included
117
+ - [ ] References one level deep