clikit-plugin 0.2.45 → 0.2.46
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.
- package/AGENTS.md +69 -3
- package/README.md +128 -92
- package/command/commit.md +1 -1
- package/command/create.md +65 -8
- package/command/debug.md +1 -1
- package/command/design.md +183 -43
- package/command/handoff.md +1 -1
- package/command/import-plan.md +2 -2
- package/command/init.md +1 -1
- package/command/issue.md +3 -4
- package/command/pr.md +1 -1
- package/command/research.md +5 -7
- package/command/resume.md +1 -1
- package/command/ship.md +29 -32
- package/command/start.md +38 -27
- package/command/{status-beads.md → status.md} +2 -3
- package/command/verify.md +132 -48
- package/dist/.tsbuildinfo +1 -1
- package/dist/agents/index.d.ts +0 -0
- package/dist/agents/index.d.ts.map +0 -0
- package/dist/beads-context.test.d.ts +2 -0
- package/dist/beads-context.test.d.ts.map +1 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.d.ts.map +0 -0
- package/dist/cli.js +5 -0
- package/dist/cli.test.d.ts +0 -0
- package/dist/cli.test.d.ts.map +0 -0
- package/dist/clikit.schema.json +32 -11
- package/dist/clilog.test.d.ts +0 -0
- package/dist/clilog.test.d.ts.map +0 -0
- package/dist/commands/index.d.ts +0 -0
- package/dist/commands/index.d.ts.map +0 -0
- package/dist/config.d.ts +15 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.test.d.ts +0 -0
- package/dist/config.test.d.ts.map +0 -0
- package/dist/hooks/beads-context.d.ts +2 -0
- package/dist/hooks/beads-context.d.ts.map +1 -1
- package/dist/hooks/empty-message-sanitizer.d.ts +0 -0
- package/dist/hooks/empty-message-sanitizer.d.ts.map +0 -0
- package/dist/hooks/error-logger.d.ts +0 -0
- package/dist/hooks/error-logger.d.ts.map +0 -0
- package/dist/hooks/git-guard.d.ts +0 -0
- package/dist/hooks/git-guard.d.ts.map +0 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/memory-digest.d.ts +1 -0
- package/dist/hooks/memory-digest.d.ts.map +1 -1
- package/dist/hooks/security-check.d.ts +0 -0
- package/dist/hooks/security-check.d.ts.map +0 -0
- package/dist/hooks/subagent-question-blocker.d.ts +0 -0
- package/dist/hooks/subagent-question-blocker.d.ts.map +0 -0
- package/dist/hooks/todo-beads-sync.d.ts +1 -0
- package/dist/hooks/todo-beads-sync.d.ts.map +1 -1
- package/dist/hooks/todo-enforcer.d.ts +1 -1
- package/dist/hooks/todo-enforcer.d.ts.map +1 -1
- package/dist/hooks/truncator.d.ts +0 -0
- package/dist/hooks/truncator.d.ts.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +250 -576
- package/dist/skills/index.d.ts +0 -0
- package/dist/skills/index.d.ts.map +0 -0
- package/dist/tools/cass-memory.d.ts +0 -0
- package/dist/tools/cass-memory.d.ts.map +0 -0
- package/dist/tools/context-summary.d.ts +0 -0
- package/dist/tools/context-summary.d.ts.map +0 -0
- package/dist/tools/index.d.ts +0 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/memory-db.d.ts +0 -0
- package/dist/tools/memory-db.d.ts.map +0 -0
- package/dist/tools/memory.d.ts +0 -0
- package/dist/tools/memory.d.ts.map +0 -0
- package/dist/tools/observation.d.ts +0 -0
- package/dist/tools/observation.d.ts.map +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.d.ts.map +0 -0
- package/memory/_digest.md +1 -1
- package/memory/_templates/handoff.md +0 -0
- package/memory/_templates/plan.md +35 -0
- package/memory/_templates/prd.md +0 -0
- package/memory/_templates/research.md +0 -0
- package/memory/_templates/review.md +0 -0
- package/memory/_templates/spec.md +12 -0
- package/memory/beads/.gitkeep +0 -0
- package/memory/handoffs/.gitkeep +0 -0
- package/memory/memory.db +0 -0
- package/memory/plans/.gitkeep +0 -0
- package/memory/prds/.gitkeep +0 -0
- package/memory/research/.gitkeep +0 -0
- package/memory/reviews/.gitkeep +0 -0
- package/memory/specs/.gitkeep +0 -0
- package/package.json +4 -4
- package/skill/beads/SKILL.md +42 -43
- package/skill/beads/mcp.json +26 -0
- package/skill/beads/references/api-reference.md +64 -0
- package/skill/chrome-devtools/SKILL.md +22 -23
- package/skill/chrome-devtools/mcp.json +17 -0
- package/skill/chrome-devtools/references/tool-reference.md +63 -0
- package/skill/condition-based-waiting/SKILL.md +28 -66
- package/skill/deep-research/SKILL.md +34 -103
- package/skill/deep-research/mcp.json +21 -0
- package/skill/deep-research/references/lsp-ops.md +44 -0
- package/skill/defense-in-depth/SKILL.md +29 -69
- package/skill/executing-plans/SKILL.md +25 -34
- package/skill/finishing-a-development-branch/SKILL.md +28 -89
- package/skill/playwright/SKILL.md +27 -22
- package/skill/playwright/mcp.json +20 -0
- package/skill/playwright/references/tool-reference.md +64 -0
- package/skill/receiving-code-review/SKILL.md +16 -27
- package/skill/requesting-code-review/SKILL.md +22 -26
- package/skill/ritual-workflow/SKILL.md +22 -82
- package/skill/root-cause-tracing/SKILL.md +30 -54
- package/skill/session-management/SKILL.md +21 -40
- package/skill/source-code-research/SKILL.md +33 -102
- package/skill/source-code-research/mcp.json +13 -0
- package/skill/source-code-research/references/quick-ref.md +65 -0
- package/skill/systematic-debugging/SKILL.md +28 -41
- package/skill/systematic-debugging/references/patterns.md +71 -0
- package/skill/test-driven-development/SKILL.md +16 -40
- package/skill/testing-anti-patterns/SKILL.md +36 -64
- package/skill/testing-anti-patterns/references/decision-matrix.md +55 -0
- package/skill/using-git-worktrees/SKILL.md +27 -103
- package/skill/vercel-react-best-practices/SKILL.md +50 -139
- package/skill/vercel-react-best-practices/references/patterns.md +70 -0
- package/skill/verification-before-completion/SKILL.md +19 -37
- package/skill/writing-plans/SKILL.md +20 -32
- package/skill/writing-skills/SKILL.md +52 -41
- package/skill/writing-skills/references/skill-anatomy.md +210 -0
- package/src/agents/AGENTS.md +48 -18
- package/src/agents/build.md +342 -93
- package/src/agents/explore.md +77 -60
- package/src/agents/index.ts +0 -0
- package/src/agents/oracle.md +153 -63
- package/src/agents/plan.md +275 -110
- package/src/agents/research.md +71 -53
- package/src/agents/review.md +182 -61
- package/src/agents/vision.md +7 -5
- package/command/plan.md +0 -152
- package/command/review-codebase.md +0 -228
- package/command/review.md +0 -135
- package/command/vision.md +0 -210
- package/dist/hooks/swarm-enforcer.d.ts +0 -31
- package/dist/hooks/swarm-enforcer.d.ts.map +0 -1
- package/dist/tools/beads-memory-sync.d.ts +0 -17
- package/dist/tools/beads-memory-sync.d.ts.map +0 -1
- package/dist/tools/quick-research.d.ts +0 -16
- package/dist/tools/quick-research.d.ts.map +0 -1
- package/dist/tools/swarm.d.ts +0 -57
- package/dist/tools/swarm.d.ts.map +0 -1
- package/skill/accessibility-audit/SKILL.md +0 -115
- package/skill/beads-bridge/SKILL.md +0 -45
- package/skill/brainstorming/SKILL.md +0 -41
- package/skill/cass-village/SKILL.md +0 -217
- package/skill/cloudflare/SKILL.md +0 -96
- package/skill/design-system-audit/SKILL.md +0 -136
- package/skill/development-lifecycle/SKILL.md +0 -58
- package/skill/dispatching-parallel-agents/SKILL.md +0 -94
- package/skill/figma/SKILL.md +0 -34
- package/skill/frontend-aesthetics/SKILL.md +0 -63
- package/skill/gemini-large-context/SKILL.md +0 -80
- package/skill/mockup-to-code/SKILL.md +0 -98
- package/skill/mqdh/SKILL.md +0 -54
- package/skill/notebooklm/SKILL.md +0 -71
- package/skill/playwriter/SKILL.md +0 -56
- package/skill/polar/SKILL.md +0 -39
- package/skill/resend/SKILL.md +0 -85
- package/skill/sharing-skills/SKILL.md +0 -50
- package/skill/subagent-driven-development/SKILL.md +0 -69
- package/skill/supabase/SKILL.md +0 -80
- package/skill/supabase-postgres-best-practices/SKILL.md +0 -168
- package/skill/swarm-coordination/SKILL.md +0 -54
- package/skill/testing-skills-with-subagents/SKILL.md +0 -102
- package/skill/ui-ux-research/SKILL.md +0 -93
- package/skill/v0/SKILL.md +0 -67
- package/skill/v1-run/SKILL.md +0 -85
- 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.
|
|
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
|
|
6
|
+
# Vercel React Best Practices
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Component Rules
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Default to Server Components.** Use `'use client'` only when you need interactivity, browser APIs, or hooks.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Component Patterns
|
|
15
|
-
|
|
16
|
-
### 1. Composition Over Inheritance
|
|
12
|
+
**Composition over prop explosion:**
|
|
17
13
|
```jsx
|
|
18
|
-
// Good
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
89
|
-
|
|
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
|
-
//
|
|
99
|
-
|
|
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
|
-
//
|
|
120
|
-
fetch(url, {
|
|
121
|
-
|
|
122
|
-
|
|
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
|
|
52
|
+
## Rendering Strategy
|
|
127
53
|
|
|
128
|
-
|
|
|
54
|
+
| Use When | Strategy |
|
|
129
55
|
|----------|----------|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
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
|
|
61
|
+
## State
|
|
136
62
|
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
- [ ]
|
|
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
|
-
- [ ]
|
|
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
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
4. **THEN** claim the result
|
|
10
|
+
```
|
|
11
|
+
Run command → read full output → check exit code → THEN claim result
|
|
12
|
+
```
|
|
16
13
|
|
|
17
|
-
##
|
|
14
|
+
## Commands by Task Type
|
|
18
15
|
|
|
19
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
`"should work"` · `"probably fixed"` · `"looks good"` · `"in theory"` — **all invalid**.
|
|
54
36
|
|
|
55
|
-
|
|
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
|
|
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
|
-
|
|
13
|
-
- **
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
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: [
|
|
22
|
-
|
|
23
|
-
**File**: `path/to/file.ts`
|
|
19
|
+
### Task: [Verb] [what]
|
|
24
20
|
|
|
25
|
-
**
|
|
21
|
+
**File**: `src/foo/bar.ts`
|
|
22
|
+
**Action**: create | edit | delete
|
|
26
23
|
|
|
27
24
|
**Code**:
|
|
28
|
-
[
|
|
25
|
+
[complete, copy-pasteable code]
|
|
29
26
|
|
|
30
27
|
**Verification**:
|
|
31
|
-
- [ ]
|
|
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** —
|
|
46
|
-
2. **Core** —
|
|
47
|
-
3. **Edge Cases** —
|
|
48
|
-
4. **Polish** —
|
|
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
|
-
-
|
|
53
|
-
- Vague file
|
|
54
|
-
- Missing verification →
|
|
55
|
-
- "Implement similar to" →
|
|
40
|
+
- Task > 5 min → break it down
|
|
41
|
+
- Vague file path → make 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
|
|
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
|
|
6
|
+
# Writing Skills
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Skill Anatomy
|
|
9
9
|
|
|
10
|
-
|
|
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:
|
|
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
|
-
|
|
21
|
-
|
|
28
|
+
## Workflow / Process
|
|
29
|
+
[core steps — what the agent should do]
|
|
22
30
|
|
|
23
|
-
##
|
|
31
|
+
## Rules / Checklist
|
|
32
|
+
[hard rules, decision tables]
|
|
24
33
|
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
36
|
-
- Solves the identified problem
|
|
37
|
-
- Handles documented edge cases
|
|
38
|
-
- Provides clear guidance
|
|
51
|
+
## When to Add references/
|
|
39
52
|
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
60
|
+
## When to Add mcp.json
|
|
49
61
|
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
- [ ]
|
|
57
|
-
- [ ]
|
|
58
|
-
- [ ]
|
|
59
|
-
- [ ]
|
|
60
|
-
- [ ]
|
|
61
|
-
- [ ]
|
|
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
|
-
##
|
|
77
|
+
## References
|
|
64
78
|
|
|
65
|
-
-
|
|
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
|