clikit-plugin 0.2.45 → 0.2.47

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 (177) hide show
  1. package/AGENTS.md +69 -3
  2. package/README.md +128 -92
  3. package/command/commit.md +1 -1
  4. package/command/create.md +65 -8
  5. package/command/debug.md +1 -1
  6. package/command/design.md +183 -43
  7. package/command/handoff.md +1 -1
  8. package/command/import-plan.md +2 -2
  9. package/command/init.md +1 -1
  10. package/command/issue.md +3 -4
  11. package/command/pr.md +1 -1
  12. package/command/research.md +5 -7
  13. package/command/resume.md +1 -1
  14. package/command/ship.md +29 -32
  15. package/command/start.md +38 -27
  16. package/command/{status-beads.md → status.md} +2 -3
  17. package/command/verify.md +132 -48
  18. package/dist/.tsbuildinfo +1 -1
  19. package/dist/agents/index.d.ts +0 -0
  20. package/dist/agents/index.d.ts.map +0 -0
  21. package/dist/beads-context.test.d.ts +2 -0
  22. package/dist/beads-context.test.d.ts.map +1 -0
  23. package/dist/cli.d.ts +0 -0
  24. package/dist/cli.d.ts.map +0 -0
  25. package/dist/cli.js +5 -0
  26. package/dist/cli.test.d.ts +0 -0
  27. package/dist/cli.test.d.ts.map +0 -0
  28. package/dist/clikit.schema.json +32 -11
  29. package/dist/clilog.test.d.ts +0 -0
  30. package/dist/clilog.test.d.ts.map +0 -0
  31. package/dist/commands/index.d.ts +0 -0
  32. package/dist/commands/index.d.ts.map +0 -0
  33. package/dist/config.d.ts +15 -7
  34. package/dist/config.d.ts.map +1 -1
  35. package/dist/config.test.d.ts +0 -0
  36. package/dist/config.test.d.ts.map +0 -0
  37. package/dist/hooks/beads-context.d.ts +2 -0
  38. package/dist/hooks/beads-context.d.ts.map +1 -1
  39. package/dist/hooks/empty-message-sanitizer.d.ts +0 -0
  40. package/dist/hooks/empty-message-sanitizer.d.ts.map +0 -0
  41. package/dist/hooks/error-logger.d.ts +0 -0
  42. package/dist/hooks/error-logger.d.ts.map +0 -0
  43. package/dist/hooks/git-guard.d.ts +0 -0
  44. package/dist/hooks/git-guard.d.ts.map +0 -0
  45. package/dist/hooks/index.d.ts +0 -2
  46. package/dist/hooks/index.d.ts.map +1 -1
  47. package/dist/hooks/memory-digest.d.ts +1 -0
  48. package/dist/hooks/memory-digest.d.ts.map +1 -1
  49. package/dist/hooks/security-check.d.ts +0 -0
  50. package/dist/hooks/security-check.d.ts.map +0 -0
  51. package/dist/hooks/subagent-question-blocker.d.ts +0 -0
  52. package/dist/hooks/subagent-question-blocker.d.ts.map +0 -0
  53. package/dist/hooks/todo-beads-sync.d.ts +1 -0
  54. package/dist/hooks/todo-beads-sync.d.ts.map +1 -1
  55. package/dist/hooks/todo-enforcer.d.ts +1 -1
  56. package/dist/hooks/todo-enforcer.d.ts.map +1 -1
  57. package/dist/hooks/truncator.d.ts +0 -0
  58. package/dist/hooks/truncator.d.ts.map +0 -0
  59. package/dist/index.d.ts +0 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +250 -576
  62. package/dist/skills/index.d.ts +0 -0
  63. package/dist/skills/index.d.ts.map +0 -0
  64. package/dist/tools/cass-memory.d.ts +0 -0
  65. package/dist/tools/cass-memory.d.ts.map +0 -0
  66. package/dist/tools/context-summary.d.ts +0 -0
  67. package/dist/tools/context-summary.d.ts.map +0 -0
  68. package/dist/tools/index.d.ts +0 -3
  69. package/dist/tools/index.d.ts.map +1 -1
  70. package/dist/tools/memory-db.d.ts +0 -0
  71. package/dist/tools/memory-db.d.ts.map +0 -0
  72. package/dist/tools/memory.d.ts +0 -0
  73. package/dist/tools/memory.d.ts.map +0 -0
  74. package/dist/tools/observation.d.ts +0 -0
  75. package/dist/tools/observation.d.ts.map +0 -0
  76. package/dist/types.d.ts +0 -0
  77. package/dist/types.d.ts.map +0 -0
  78. package/memory/_digest.md +1 -1
  79. package/memory/_templates/handoff.md +0 -0
  80. package/memory/_templates/plan.md +35 -0
  81. package/memory/_templates/prd.md +0 -0
  82. package/memory/_templates/research.md +0 -0
  83. package/memory/_templates/review.md +0 -0
  84. package/memory/_templates/spec.md +12 -0
  85. package/memory/beads/.gitkeep +0 -0
  86. package/memory/handoffs/.gitkeep +0 -0
  87. package/memory/memory.db +0 -0
  88. package/memory/plans/.gitkeep +0 -0
  89. package/memory/prds/.gitkeep +0 -0
  90. package/memory/research/.gitkeep +0 -0
  91. package/memory/reviews/.gitkeep +0 -0
  92. package/memory/specs/.gitkeep +0 -0
  93. package/package.json +4 -4
  94. package/skill/beads/SKILL.md +42 -43
  95. package/skill/beads/mcp.json +26 -0
  96. package/skill/beads/references/api-reference.md +64 -0
  97. package/skill/chrome-devtools/SKILL.md +22 -23
  98. package/skill/chrome-devtools/mcp.json +17 -0
  99. package/skill/chrome-devtools/references/tool-reference.md +63 -0
  100. package/skill/condition-based-waiting/SKILL.md +28 -66
  101. package/skill/deep-research/SKILL.md +34 -103
  102. package/skill/deep-research/mcp.json +21 -0
  103. package/skill/deep-research/references/lsp-ops.md +44 -0
  104. package/skill/defense-in-depth/SKILL.md +29 -69
  105. package/skill/executing-plans/SKILL.md +25 -34
  106. package/skill/finishing-a-development-branch/SKILL.md +28 -89
  107. package/skill/playwright/SKILL.md +27 -22
  108. package/skill/playwright/mcp.json +20 -0
  109. package/skill/playwright/references/tool-reference.md +64 -0
  110. package/skill/receiving-code-review/SKILL.md +16 -27
  111. package/skill/requesting-code-review/SKILL.md +22 -26
  112. package/skill/ritual-workflow/SKILL.md +22 -82
  113. package/skill/root-cause-tracing/SKILL.md +30 -54
  114. package/skill/session-management/SKILL.md +21 -40
  115. package/skill/source-code-research/SKILL.md +33 -102
  116. package/skill/source-code-research/mcp.json +13 -0
  117. package/skill/source-code-research/references/quick-ref.md +65 -0
  118. package/skill/systematic-debugging/SKILL.md +28 -41
  119. package/skill/systematic-debugging/references/patterns.md +71 -0
  120. package/skill/test-driven-development/SKILL.md +16 -40
  121. package/skill/testing-anti-patterns/SKILL.md +36 -64
  122. package/skill/testing-anti-patterns/references/decision-matrix.md +55 -0
  123. package/skill/using-git-worktrees/SKILL.md +27 -103
  124. package/skill/vercel-react-best-practices/SKILL.md +50 -139
  125. package/skill/vercel-react-best-practices/references/patterns.md +70 -0
  126. package/skill/verification-before-completion/SKILL.md +19 -37
  127. package/skill/writing-plans/SKILL.md +20 -32
  128. package/skill/writing-skills/SKILL.md +52 -41
  129. package/skill/writing-skills/references/skill-anatomy.md +210 -0
  130. package/src/agents/AGENTS.md +48 -18
  131. package/src/agents/build.md +342 -93
  132. package/src/agents/explore.md +77 -60
  133. package/src/agents/index.ts +0 -0
  134. package/src/agents/oracle.md +154 -64
  135. package/src/agents/plan.md +275 -110
  136. package/src/agents/research.md +72 -54
  137. package/src/agents/review.md +183 -62
  138. package/src/agents/vision.md +7 -5
  139. package/command/plan.md +0 -152
  140. package/command/review-codebase.md +0 -228
  141. package/command/review.md +0 -135
  142. package/command/vision.md +0 -210
  143. package/dist/hooks/swarm-enforcer.d.ts +0 -31
  144. package/dist/hooks/swarm-enforcer.d.ts.map +0 -1
  145. package/dist/tools/beads-memory-sync.d.ts +0 -17
  146. package/dist/tools/beads-memory-sync.d.ts.map +0 -1
  147. package/dist/tools/quick-research.d.ts +0 -16
  148. package/dist/tools/quick-research.d.ts.map +0 -1
  149. package/dist/tools/swarm.d.ts +0 -57
  150. package/dist/tools/swarm.d.ts.map +0 -1
  151. package/skill/accessibility-audit/SKILL.md +0 -115
  152. package/skill/beads-bridge/SKILL.md +0 -45
  153. package/skill/brainstorming/SKILL.md +0 -41
  154. package/skill/cass-village/SKILL.md +0 -217
  155. package/skill/cloudflare/SKILL.md +0 -96
  156. package/skill/design-system-audit/SKILL.md +0 -136
  157. package/skill/development-lifecycle/SKILL.md +0 -58
  158. package/skill/dispatching-parallel-agents/SKILL.md +0 -94
  159. package/skill/figma/SKILL.md +0 -34
  160. package/skill/frontend-aesthetics/SKILL.md +0 -63
  161. package/skill/gemini-large-context/SKILL.md +0 -80
  162. package/skill/mockup-to-code/SKILL.md +0 -98
  163. package/skill/mqdh/SKILL.md +0 -54
  164. package/skill/notebooklm/SKILL.md +0 -71
  165. package/skill/playwriter/SKILL.md +0 -56
  166. package/skill/polar/SKILL.md +0 -39
  167. package/skill/resend/SKILL.md +0 -85
  168. package/skill/sharing-skills/SKILL.md +0 -50
  169. package/skill/subagent-driven-development/SKILL.md +0 -69
  170. package/skill/supabase/SKILL.md +0 -80
  171. package/skill/supabase-postgres-best-practices/SKILL.md +0 -168
  172. package/skill/swarm-coordination/SKILL.md +0 -54
  173. package/skill/testing-skills-with-subagents/SKILL.md +0 -102
  174. package/skill/ui-ux-research/SKILL.md +0 -93
  175. package/skill/v0/SKILL.md +0 -67
  176. package/skill/v1-run/SKILL.md +0 -85
  177. package/skill/visual-analysis/SKILL.md +0 -113
@@ -1,174 +1,85 @@
1
1
  ---
2
2
  name: vercel-react-best-practices
3
- description: Use when writing, reviewing, or refactoring React/Next.js code. Performance optimization patterns from Vercel Engineering.
3
+ description: Use when writing, reviewing, or refactoring React/Next.js code. Enforces Server Components first, parallel fetching, and bundle optimization.
4
4
  ---
5
5
 
6
- # Vercel React Best Practices Skill
6
+ # Vercel React Best Practices
7
7
 
8
- You are running the **vercel-react-best-practices** skill. Optimize React and Next.js applications.
8
+ ## Component Rules
9
9
 
10
- ## Core Principles
10
+ **Default to Server Components.** Use `'use client'` only when you need interactivity, browser APIs, or hooks.
11
11
 
12
- From Vercel Engineering team's production experience.
13
-
14
- ## Component Patterns
15
-
16
- ### 1. Composition Over Inheritance
12
+ **Composition over prop explosion:**
17
13
  ```jsx
18
- // Good: Composition
19
- function Card({ header, children, footer }) {
20
- return (
21
- <div className="card">
22
- {header}
23
- <div className="content">{children}</div>
24
- {footer}
25
- </div>
26
- );
27
- }
28
-
29
- // Avoid: Prop explosion
30
- function Card({ headerTitle, headerSubtitle, footerText, ... }) {}
31
- ```
14
+ // Good
15
+ function Card({ header, children, footer }) { … }
32
16
 
33
- ### 2. Colocate Components
34
- ```
35
- /components/
36
- Card/
37
- index.tsx # Export
38
- Card.tsx # Component
39
- Card.test.tsx # Test
40
- styles.ts # Styles
17
+ // Bad
18
+ function Card({ headerTitle, headerSubtitle, footerText, … }) { … }
41
19
  ```
42
20
 
43
- ### 3. Server Components First
44
- ```jsx
45
- // Default to Server Component
46
- async function UserProfile({ id }) {
47
- const user = await fetchUser(id); // Direct DB access
48
- return <div>{user.name}</div>;
49
- }
50
-
51
- // Use 'use client' only when needed
52
- 'use client';
53
- function InteractiveButton() {
54
- const [count, setCount] = useState(0);
55
- // ...
56
- }
21
+ **Colocate files:**
57
22
  ```
58
-
59
- ## Performance Patterns
60
-
61
- ### 1. Dynamic Imports
62
- ```jsx
63
- // Lazy load heavy components
64
- const HeavyChart = dynamic(() => import('./Chart'), {
65
- loading: () => <Skeleton />,
66
- ssr: false
67
- });
23
+ Card/
24
+ index.tsx Card.tsx Card.test.tsx styles.ts
68
25
  ```
69
26
 
70
- ### 2. Image Optimization
71
- ```jsx
72
- import Image from 'next/image';
73
-
74
- // Automatic optimization
75
- <Image
76
- src="/hero.jpg"
77
- alt="Hero"
78
- width={1200}
79
- height={600}
80
- priority // Above fold
81
- />
82
- ```
27
+ ## Performance
83
28
 
84
- ### 3. Font Optimization
85
29
  ```jsx
86
- import { Inter } from 'next/font/google';
30
+ // Dynamic import for heavy components
31
+ const HeavyChart = dynamic(() => import('./Chart'), { loading: () => <Skeleton />, ssr: false });
32
+
33
+ // next/image — always, no raw <img>
34
+ <Image src="/hero.jpg" width={1200} height={600} priority />
87
35
 
88
- const inter = Inter({
89
- subsets: ['latin'],
90
- display: 'swap'
91
- });
36
+ // next/font always
37
+ const inter = Inter({ subsets: ['latin'], display: 'swap' });
92
38
  ```
93
39
 
94
40
  ## Data Fetching
95
41
 
96
- ### 1. Parallel Requests
97
42
  ```jsx
98
- // Good: Parallel
99
- async function Page() {
100
- const [user, posts] = await Promise.all([
101
- fetchUser(),
102
- fetchPosts()
103
- ]);
104
- // ...
105
- }
106
-
107
- // Avoid: Waterfall
108
- async function Page() {
109
- const user = await fetchUser();
110
- const posts = await fetchPosts(); // Waits for user
111
- }
112
- ```
113
-
114
- ### 2. Cache Strategies
115
- ```jsx
116
- // Revalidate periodically
117
- fetch(url, { next: { revalidate: 60 } });
43
+ // Parallel — always
44
+ const [user, posts] = await Promise.all([fetchUser(), fetchPosts()]);
118
45
 
119
- // Skip cache
120
- fetch(url, { cache: 'no-store' });
121
-
122
- // Force cache
123
- fetch(url, { cache: 'force-cache' });
46
+ // Cache strategies
47
+ fetch(url, { next: { revalidate: 60 } }); // ISR
48
+ fetch(url, { cache: 'no-store' }); // SSR
49
+ fetch(url, { cache: 'force-cache' }); // static
124
50
  ```
125
51
 
126
- ## Rendering Strategies
52
+ ## Rendering Strategy
127
53
 
128
- | Strategy | Use When |
54
+ | Use When | Strategy |
129
55
  |----------|----------|
130
- | Static (SSG) | Content doesn't change often |
131
- | Dynamic (SSR) | Per-request data needed |
132
- | ISR | Periodic updates needed |
133
- | Edge | Low latency globally |
56
+ | Content rarely changes | SSG (static) |
57
+ | Per-request data | SSR (dynamic) |
58
+ | Periodic updates | ISR |
59
+ | Global low-latency | Edge |
134
60
 
135
- ## State Management
61
+ ## State
136
62
 
137
- ### 1. Start Local
138
- ```jsx
139
- // Keep state as local as possible
140
- function FilterableList({ items }) {
141
- const [filter, setFilter] = useState('');
142
- // Not in global store
143
- }
144
- ```
63
+ - Keep state as **local as possible** — no global store until proven necessary
64
+ - Use URL state (`useSearchParams`) for shareable/filterable state
145
65
 
146
- ### 2. URL State
147
- ```jsx
148
- // For shareable state
149
- import { useSearchParams } from 'next/navigation';
150
-
151
- function Search() {
152
- const searchParams = useSearchParams();
153
- const query = searchParams.get('q');
154
- }
155
- ```
66
+ ## Anti-Patterns
156
67
 
157
- ## Common Anti-Patterns
68
+ | Pattern | Fix |
69
+ |---------|-----|
70
+ | `'use client'` on static content | Remove — use Server Component |
71
+ | `import { everything } from 'lib'` | Use tree-shaking or dynamic import |
72
+ | Raw `<img>` | `next/image` |
73
+ | Sequential `await` for independent data | `Promise.all` |
74
+ | Prop drilling 3+ levels | Composition or context |
158
75
 
159
- | Anti-Pattern | Fix |
160
- |--------------|-----|
161
- | Client components for static content | Use Server Components |
162
- | Large bundle imports | Use tree-shaking or dynamic imports |
163
- | Unoptimized images | Use next/image |
164
- | Blocking requests | Use Promise.all |
165
- | Prop drilling | Use composition or context |
76
+ ## Pre-ship Checklist
166
77
 
167
- ## Checklist
168
-
169
- - [ ] Default to Server Components
170
- - [ ] Images use next/image
171
- - [ ] Fonts are optimized
78
+ - [ ] Server Components by default
79
+ - [ ] `next/image` for all images
80
+ - [ ] `next/font` for all fonts
172
81
  - [ ] Parallel data fetching
173
82
  - [ ] Dynamic imports for heavy code
174
- - [ ] Proper caching strategy
83
+ - [ ] Correct caching strategy per route
84
+
85
+ See [references/patterns.md](references/patterns.md) for extended examples.
@@ -0,0 +1,70 @@
1
+ # Vercel React — Extended Patterns
2
+
3
+ ## Server vs Client Decision Tree
4
+
5
+ ```
6
+ Does it need: onClick/onChange, useState/useEffect, browser-only APIs?
7
+ YES → 'use client'
8
+ NO → Server Component (default)
9
+ ```
10
+
11
+ ## Streaming with Suspense
12
+
13
+ ```jsx
14
+ export default function Page() {
15
+ return (
16
+ <Suspense fallback={<Loading />}>
17
+ <SlowComponent />
18
+ </Suspense>
19
+ );
20
+ }
21
+ ```
22
+
23
+ ## Error Boundaries
24
+
25
+ ```jsx
26
+ // app/error.tsx
27
+ 'use client';
28
+ export default function Error({ error, reset }) {
29
+ return (
30
+ <div>
31
+ <p>{error.message}</p>
32
+ <button onClick={reset}>Try again</button>
33
+ </div>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Route Handlers (API Routes)
39
+
40
+ ```ts
41
+ // app/api/users/route.ts
42
+ export async function GET(request: Request) {
43
+ const users = await db.user.findMany();
44
+ return Response.json(users);
45
+ }
46
+ ```
47
+
48
+ ## Metadata
49
+
50
+ ```tsx
51
+ // Static
52
+ export const metadata: Metadata = { title: 'Page' };
53
+
54
+ // Dynamic
55
+ export async function generateMetadata({ params }): Promise<Metadata> {
56
+ const product = await fetchProduct(params.id);
57
+ return { title: product.name };
58
+ }
59
+ ```
60
+
61
+ ## Server Actions
62
+
63
+ ```tsx
64
+ async function createUser(formData: FormData) {
65
+ 'use server';
66
+ const name = formData.get('name');
67
+ await db.user.create({ data: { name } });
68
+ revalidatePath('/users');
69
+ }
70
+ ```
@@ -1,55 +1,37 @@
1
1
  ---
2
2
  name: verification-before-completion
3
- description: Use when marking any task complete. Enforces fresh verification evidence.
3
+ description: Use before marking any task complete. Run verification commands first, show output, then claim the result.
4
4
  ---
5
5
 
6
- # Verification Before Completion Skill
7
-
8
- You are running the **verification-before-completion** skill. No claims without evidence.
6
+ # Verification Before Completion
9
7
 
10
8
  ## Process
11
9
 
12
- 1. **Run** the verification command
13
- 2. **Read** the FULL output
14
- 3. **Check** the exit code
15
- 4. **THEN** claim the result
10
+ ```
11
+ Run command read full output → check exit code → THEN claim result
12
+ ```
16
13
 
17
- ## Verification Commands
14
+ ## Commands by Task Type
18
15
 
19
- | Task Type | Command |
20
- |-----------|---------|
16
+ | Type | Command |
17
+ |------|---------|
21
18
  | TypeScript | `npm run typecheck` |
22
19
  | Tests | `npm test` |
23
20
  | Lint | `npm run lint` |
24
21
  | Build | `npm run build` |
25
- | All | `npm run typecheck && npm test && npm run lint && npm run build` |
26
-
27
- ## Red Flags
28
-
29
- These phrases indicate lack of verification:
22
+ | All gates | `npm run typecheck && npm test && npm run lint && npm run build` |
30
23
 
31
- | Phrase | Problem |
32
- |--------|---------|
33
- | "should work" | Not verified |
34
- | "probably fixed" | Not tested |
35
- | "looks good" | Not run |
36
- | "in theory" | No evidence |
37
- | Expressing satisfaction before running | Premature |
24
+ ## Evidence Block (required output)
38
25
 
39
- ## Evidence Format
40
-
41
- ```markdown
42
- ## Verification
43
-
44
- - [x] Type check: Passed
45
- - [x] Tests: 42 passed, 0 failed
46
- - [x] Lint: 0 errors
47
- - [x] Build: Successful
48
-
49
- Output:
50
- [paste relevant output]
51
26
  ```
27
+ - [x] typecheck: 0 errors
28
+ - [x] tests: N passed, 0 failed
29
+ - [x] lint: 0 errors
30
+ - [x] build: exit 0
31
+ ```
32
+
33
+ ## Phrases That Signal No Verification
52
34
 
53
- ## Rule
35
+ `"should work"` · `"probably fixed"` · `"looks good"` · `"in theory"` — **all invalid**.
54
36
 
55
- **Honesty is non-negotiable.** If something isn't verified, say so. Never claim completion without fresh evidence.
37
+ If not run, say so. Never claim completion without fresh evidence.
@@ -1,55 +1,43 @@
1
1
  ---
2
2
  name: writing-plans
3
- description: Use when requirements are clear and you need to create an implementation plan with bite-sized tasks.
3
+ description: Use when requirements are clear and you need to create an implementation plan with bite-sized tasks a junior engineer can execute with zero context.
4
4
  ---
5
5
 
6
- # Writing Plans Skill
7
-
8
- You are running the **writing-plans** skill. Create implementation plans that a junior engineer could follow with zero context.
6
+ # Writing Plans
9
7
 
10
8
  ## Task Requirements
11
9
 
12
- Each task must be:
13
- - **2-5 minutes** to complete
14
- - Has **exact file paths**
15
- - Has **complete code** (no "...", no "implement this")
16
- - Has **verification steps**
10
+ Every task must have:
11
+ - **Exact file path** no vague references
12
+ - **Complete code** no `...` or "implement this"
13
+ - **Verification command + expected output**
14
+ - Completable in **2–5 minutes**
17
15
 
18
16
  ## Task Format
19
17
 
20
18
  ```markdown
21
- ### Task: [Action verb] [what]
22
-
23
- **File**: `path/to/file.ts`
19
+ ### Task: [Verb] [what]
24
20
 
25
- **Action**: [create|edit|delete]
21
+ **File**: `src/foo/bar.ts`
22
+ **Action**: create | edit | delete
26
23
 
27
24
  **Code**:
28
- [Complete, copy-pasteable code]
25
+ [complete, copy-pasteable code]
29
26
 
30
27
  **Verification**:
31
- - [ ] Command: `npm test`
32
- - [ ] Expected: All tests pass
28
+ - [ ] `npm test src/foo/bar.test.ts` → passes
33
29
  ```
34
30
 
35
- ## Principles
36
-
37
- | Principle | Meaning |
38
- |-----------|---------|
39
- | YAGNI | Don't add "nice to have" features |
40
- | DRY | Extract shared logic immediately |
41
- | TDD | Write test before implementation |
42
-
43
31
  ## Plan Structure
44
32
 
45
- 1. **Prerequisites** — Setup, dependencies, baseline tests
46
- 2. **Core** — Main functionality, smallest working version
47
- 3. **Edge Cases** — Error handling, validation
48
- 4. **Polish** — Performance, documentation
33
+ 1. **Prerequisites** — deps, baseline tests
34
+ 2. **Core** — smallest working version
35
+ 3. **Edge Cases** — error handling, validation
36
+ 4. **Polish** — performance, docs
49
37
 
50
38
  ## Red Flags
51
39
 
52
- - Tasks longer than 5 minutesBreak down further
53
- - Vague file pathsBe specific
54
- - Missing verification → Add test commands
55
- - "Implement similar to" → Provide full code
40
+ - Task > 5 minbreak it down
41
+ - Vague file pathmake it exact
42
+ - Missing verification → add test command
43
+ - "Implement similar to X" → write the full code
@@ -1,68 +1,79 @@
1
1
  ---
2
2
  name: writing-skills
3
- description: Use when creating new skills. Follow TDD approach for skill development.
3
+ description: Use when creating a new skill. Produces a well-structured skill package with SKILL.md, optional references/, and optional mcp.json following the Agent Skills standard.
4
4
  ---
5
5
 
6
- # Writing Skills Skill
6
+ # Writing Skills
7
7
 
8
- You are running the **writing-skills** skill. Test-driven skill creation.
8
+ ## Skill Anatomy
9
9
 
10
- ## Skill File Structure
10
+ ```
11
+ skill-name/
12
+ ├── SKILL.md ← required: frontmatter + workflow
13
+ ├── mcp.json ← if skill calls MCP tools
14
+ └── references/
15
+ └── *.md ← knowledge details, loaded on-demand
16
+ ```
17
+
18
+ ## SKILL.md Format
11
19
 
12
20
  ```markdown
13
21
  ---
14
- name: skill-name
15
- description: Use when [specific trigger condition]. Brief purpose.
22
+ name: skill-name # lowercase, hyphens only, matches directory name
23
+ description: … # max 200 chars — trigger condition + what it does
16
24
  ---
17
25
 
18
26
  # Skill Title
19
27
 
20
- [Content]
21
- ```
28
+ ## Workflow / Process
29
+ [core steps — what the agent should do]
22
30
 
23
- ## TDD for Skills: RED-GREEN-REFACTOR
31
+ ## Rules / Checklist
32
+ [hard rules, decision tables]
24
33
 
25
- ### RED: Baseline Test
34
+ ## Red Flags
35
+ [what to watch for]
36
+
37
+ ## References ← only if references/ exist
38
+ - [name](references/file.md) — one-line description
39
+ - MCP: server-name — see [mcp.json](mcp.json)
40
+ ```
26
41
 
27
- Before writing the skill:
28
- 1. Identify the problem the skill solves
29
- 2. Document expected behavior
30
- 3. Note edge cases and failure modes
31
- 4. This is your "test" — does the skill handle these?
42
+ ## Decision: What Belongs Where
32
43
 
33
- ### GREEN: Write the Skill
44
+ | Content | Where |
45
+ |---------|-------|
46
+ | Trigger condition, workflow, rules | `SKILL.md` body |
47
+ | Tool signatures, long examples, lookup tables | `references/*.md` |
48
+ | MCP server connection + tool list | `mcp.json` |
49
+ | Nothing extra needed | `SKILL.md` only |
34
50
 
35
- Write the minimum skill content that:
36
- - Solves the identified problem
37
- - Handles documented edge cases
38
- - Provides clear guidance
51
+ ## When to Add references/
39
52
 
40
- ### REFACTOR: Close Loopholes
53
+ Split into a reference file when:
54
+ - Section exceeds ~20 lines and is reference-only (not workflow)
55
+ - Content is only needed for specific sub-tasks, not always
56
+ - Examples/tables that would bloat the main SKILL.md
41
57
 
42
- Review and improve:
43
- - Are there ambiguous instructions?
44
- - Could the skill be misinterpreted?
45
- - Does it handle the failure modes?
46
- - Is it concise and actionable?
58
+ Each reference file must be linked from SKILL.md so the agent knows it exists.
47
59
 
48
- ## Description Rules
60
+ ## When to Add mcp.json
49
61
 
50
- - Start with "Use when..." for trigger clarity
51
- - One clear purpose per skill
52
- - Avoid vague descriptions like "Helps with code"
62
+ Add `mcp.json` when the skill calls MCP tools directly.
63
+ List only the tools the skill actually uses — not all tools the server exposes.
53
64
 
54
65
  ## Quality Checklist
55
66
 
56
- - [ ] Name is clear and action-oriented
57
- - [ ] Description starts with "Use when..."
58
- - [ ] Covers when to invoke the skill
59
- - [ ] Provides actionable steps
60
- - [ ] Handles edge cases
61
- - [ ] Lists red flags or anti-patterns
67
+ - [ ] `name` matches directory name, lowercase-hyphen only
68
+ - [ ] `description` states *when to invoke* + *what it does* (≤ 200 chars)
69
+ - [ ] SKILL.md body has a clear workflow or process section
70
+ - [ ] No "You are running the X skill." boilerplate
71
+ - [ ] Long reference content split into `references/*.md`
72
+ - [ ] Each reference file linked from SKILL.md
73
+ - [ ] `mcp.json` present if and only if skill calls MCP tools
74
+ - [ ] `mcp.json` lists only tools this skill actually uses
75
+ - [ ] Red Flags section present
62
76
 
63
- ## Red Flags
77
+ ## References
64
78
 
65
- - Skills that are too broad (multiple purposes)
66
- - Missing trigger conditions
67
- - No actionable guidance
68
- - Emotional language instead of technical
79
+ - [Skill anatomy reference](references/skill-anatomy.md) full format spec for all three files