claude-skills-cli 0.0.1

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.
@@ -0,0 +1,403 @@
1
+ # Skill Examples for devhub-crm
2
+
3
+ Real examples showing effective skill patterns for this project.
4
+
5
+ ## Example 1: Database Patterns Skill
6
+
7
+ ### Use Case
8
+
9
+ Repeatedly providing database schema, query patterns, and transaction handling.
10
+
11
+ ### Structure
12
+
13
+ ```
14
+ database-patterns/
15
+ ├── SKILL.md # Core query patterns
16
+ ├── references/
17
+ │ ├── schema.md # Complete database schema
18
+ │ ├── relationships.md # Table relationships diagram
19
+ │ └── query-examples.md # 20+ common queries
20
+ └── scripts/
21
+ ├── validate_timestamps.py # Check data consistency
22
+ └── analyze_schema.py # Generate relationship graph
23
+ ```
24
+
25
+ ### SKILL.md Excerpt
26
+
27
+ ````markdown
28
+ ---
29
+ name: database-patterns
30
+ description: SQLite database operations using better-sqlite3 for contacts, companies, interactions, and social_links tables. Use when writing SELECT, INSERT, UPDATE, DELETE operations with prepared statements, handling timestamps, or managing relationships.
31
+ ---
32
+
33
+ # Database Patterns
34
+
35
+ ## Quick Start
36
+
37
+ ```typescript
38
+ import { db } from '$lib/server/db';
39
+
40
+ // SELECT single row
41
+ const stmt = db.prepare('SELECT * FROM contacts WHERE id = ? AND user_id = ?');
42
+ const contact = stmt.get(id, user_id) as Contact | undefined;
43
+ ```
44
+ ````
45
+
46
+ For complete schema: [references/schema.md](references/schema.md)
47
+
48
+ ```
49
+
50
+ ### Why It Works
51
+ - ✅ Description includes table names for keyword matching
52
+ - ✅ Quick Start shows most common pattern
53
+ - ✅ Complete schema in references (not inline)
54
+ - ✅ Scripts validate data consistency
55
+ - ✅ Keyword-rich: "SELECT, INSERT, UPDATE, DELETE"
56
+
57
+ ---
58
+
59
+ ## Example 2: SvelteKit Component Patterns
60
+
61
+ ### Use Case
62
+ Creating type-safe Svelte 5 components with proper runes and snippets.
63
+
64
+ ### Structure
65
+ ```
66
+
67
+ sveltekit-patterns/
68
+ ├── SKILL.md # Core patterns and conventions
69
+ ├── references/
70
+ │ ├── component-library.md # Catalog of existing components
71
+ │ ├── reactive-stores.md # SvelteKit load/invalidate patterns
72
+ │ └── routing-conventions.md # File-based routing guide
73
+ └── assets/
74
+ └── component-templates/
75
+ ├── basic-component.svelte
76
+ ├── form-component.svelte
77
+ └── list-component.svelte
78
+
79
+ ````
80
+
81
+ ### SKILL.md Excerpt
82
+ ```markdown
83
+ ---
84
+ name: sveltekit-patterns
85
+ description: Create type-safe Svelte 5 components with $props(), $derived, and snippets following devhub-crm conventions. Use when building components, implementing forms, or working with reactive stores and SvelteKit routing.
86
+ ---
87
+
88
+ # SvelteKit Patterns
89
+
90
+ ## Component Template
91
+
92
+ ```svelte
93
+ <script lang="ts">
94
+ interface Props {
95
+ title: string;
96
+ items: Array<{id: string; label: string}>;
97
+ }
98
+
99
+ let { title, items }: Props = $props();
100
+ </script>
101
+ ````
102
+
103
+ For complete component library: [references/component-library.md](references/component-library.md)
104
+
105
+ ```
106
+
107
+ ### Why It Works
108
+ - ✅ Shows current Svelte 5 syntax ($props, $derived)
109
+ - ✅ Type-safe patterns emphasized
110
+ - ✅ Component catalog in references
111
+ - ✅ Templates in assets for copying
112
+ - ✅ Keywords: "components, forms, reactive stores"
113
+
114
+ ---
115
+
116
+ ## Example 3: GitHub Integration
117
+
118
+ ### Use Case
119
+ Implementing GitHub OAuth, fetching profiles, managing connections.
120
+
121
+ ### Structure
122
+ ```
123
+
124
+ github-integration/
125
+ ├── SKILL.md # Auth patterns, common operations
126
+ ├── references/
127
+ │ ├── api-endpoints.md # GitHub API reference
128
+ │ └── oauth-flow.md # Complete OAuth implementation
129
+ └── scripts/
130
+ ├── test_connection.py # Validate GitHub credentials
131
+ └── check_rate_limit.py # Monitor API usage
132
+
133
+ ````
134
+
135
+ ### SKILL.md Excerpt
136
+ ```markdown
137
+ ---
138
+ name: github-integration
139
+ description: GitHub API integration with better-auth OAuth for fetching user profiles, repositories, and connections. Use when implementing GitHub features, OAuth flows, or working with GitHub data in contacts.
140
+ ---
141
+
142
+ # GitHub Integration
143
+
144
+ ## Authentication
145
+
146
+ ```typescript
147
+ import { GITHUB_TOKEN } from '$env/static/private';
148
+
149
+ const response = await fetch('https://api.github.com/user', {
150
+ headers: {
151
+ 'Authorization': `Bearer ${GITHUB_TOKEN}`,
152
+ 'Accept': 'application/vnd.github.v3+json',
153
+ },
154
+ });
155
+ ````
156
+
157
+ Check rate limits: `python scripts/check_rate_limit.py`
158
+
159
+ ```
160
+
161
+ ### Why It Works
162
+ - ✅ Auth pattern shown immediately
163
+ - ✅ Operational scripts (rate limit check)
164
+ - ✅ Complete OAuth flow in references
165
+ - ✅ Practical utilities included
166
+ - ✅ Keywords: "OAuth, GitHub data, contacts"
167
+
168
+ ---
169
+
170
+ ## Example 4: DaisyUI Conventions
171
+
172
+ ### Use Case
173
+ Consistent component styling, theme usage, form patterns.
174
+
175
+ ### Structure
176
+ ```
177
+
178
+ daisyui-conventions/
179
+ ├── SKILL.md # Core components and patterns
180
+ ├── references/
181
+ │ ├── component-reference.md # All DaisyUI components
182
+ │ └── theme-tokens.md # Color system and usage
183
+ └── assets/
184
+ └── theme-preview.html # Visual reference
185
+
186
+ ````
187
+
188
+ ### SKILL.md Excerpt
189
+ ```markdown
190
+ ---
191
+ name: daisyui-conventions
192
+ description: DaisyUI v5 component styling for cards, forms, buttons, and layouts with theme color tokens. Use when styling components, implementing forms, or applying consistent visual design.
193
+ ---
194
+
195
+ # DaisyUI Conventions
196
+
197
+ ## Card Pattern
198
+
199
+ ```svelte
200
+ <div class="card bg-base-100 shadow-md">
201
+ <div class="card-body">
202
+ <h2 class="card-title">Title</h2>
203
+ <p>Content</p>
204
+ </div>
205
+ </div>
206
+ ````
207
+
208
+ For all components: [references/component-reference.md](references/component-reference.md)
209
+
210
+ ````
211
+
212
+ ### Why It Works
213
+ - ✅ Shows actual DaisyUI classes used in project
214
+ - ✅ Theme tokens documented
215
+ - ✅ Visual reference for colors (assets/)
216
+ - ✅ Form patterns included
217
+ - ✅ Keywords: "cards, forms, buttons, layouts"
218
+
219
+ ---
220
+
221
+ ## Pattern: Description Keywords
222
+
223
+ Good descriptions include:
224
+ - **Technology names**: "SQLite", "GitHub API", "DaisyUI v5"
225
+ - **Operations**: "SELECT, INSERT, UPDATE", "OAuth flow"
226
+ - **Data types**: "contacts, companies, interactions"
227
+ - **Triggers**: "Use when...", "implementing", "working with"
228
+
229
+ ### Before (Vague)
230
+ ```yaml
231
+ description: Helps with database stuff
232
+ ````
233
+
234
+ ### After (Specific)
235
+
236
+ ```yaml
237
+ description: SQLite database operations using better-sqlite3 for contacts, companies, interactions, and social_links tables. Use when writing SELECT, INSERT, UPDATE, DELETE operations with prepared statements.
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Pattern: Progressive Disclosure
243
+
244
+ ### Level 1: Metadata (Always)
245
+
246
+ ```yaml
247
+ name: database-patterns
248
+ description: [50-100 words with keywords]
249
+ ```
250
+
251
+ **Token cost**: ~100 tokens
252
+
253
+ ### Level 2: SKILL.md Body (When Triggered)
254
+
255
+ - Quick Start example
256
+ - 3-5 core patterns
257
+ - Links to references
258
+ - Script descriptions
259
+
260
+ **Token cost**: ~3-5k tokens
261
+
262
+ ### Level 3: Resources (As Needed)
263
+
264
+ - references/schema.md (complete schema)
265
+ - references/query-examples.md (20+ queries)
266
+ - scripts/validate.py (runs without loading)
267
+
268
+ **Token cost**: Only what's accessed
269
+
270
+ ---
271
+
272
+ ## Pattern: Scripts for Efficiency
273
+
274
+ ### Without Script
275
+
276
+ ```markdown
277
+ Claude generates validation code every time:
278
+ "Check that all timestamps are valid..."
279
+ [Claude writes 50 lines of Python]
280
+ ```
281
+
282
+ **Cost**: ~500 tokens each time
283
+
284
+ ### With Script
285
+
286
+ ```bash
287
+ python scripts/validate_timestamps.py
288
+ ```
289
+
290
+ **Cost**: ~50 tokens (just output)
291
+
292
+ ### Script Types
293
+
294
+ - **Validation**: Check data consistency
295
+ - **Generation**: Create boilerplate
296
+ - **Analysis**: Parse and report
297
+ - **Testing**: Verify configuration
298
+
299
+ ---
300
+
301
+ ## Pattern: Assets for Templates
302
+
303
+ ### Without Assets
304
+
305
+ ```markdown
306
+ "Create a basic Svelte component..."
307
+ [Claude writes boilerplate each time]
308
+ ```
309
+
310
+ ### With Assets
311
+
312
+ ```bash
313
+ cp assets/component-templates/basic-component.svelte \
314
+ src/lib/components/new-component.svelte
315
+ # Modify as needed
316
+ ```
317
+
318
+ ### Asset Types
319
+
320
+ - Component templates (.svelte)
321
+ - SQL schemas (.sql)
322
+ - Configuration files (.json)
323
+ - Images and logos (.png, .svg)
324
+
325
+ ---
326
+
327
+ ## Anti-Patterns to Avoid
328
+
329
+ ### ❌ Generic Description
330
+
331
+ ```yaml
332
+ description: Database helper tool
333
+ ```
334
+
335
+ **Fix**: Include table names, operations, when to use
336
+
337
+ ### ❌ Everything Inline
338
+
339
+ ```markdown
340
+ # Database Skill
341
+
342
+ ## Complete Schema (1000 lines)
343
+
344
+ ## All Queries (500 lines)
345
+ ```
346
+
347
+ **Fix**: Move to references/schema.md
348
+
349
+ ### ❌ Second Person
350
+
351
+ ```markdown
352
+ You should use prepared statements...
353
+ ```
354
+
355
+ **Fix**: "Use prepared statements for all queries"
356
+
357
+ ### ❌ Missing Keywords
358
+
359
+ ```yaml
360
+ description: Helps with frontend stuff
361
+ ```
362
+
363
+ **Fix**: "Svelte 5 components with $props(), forms, routing"
364
+
365
+ ---
366
+
367
+ ## Skill Composition Example
368
+
369
+ **User Request**: "Create a GitHub contact card with database-backed favorites"
370
+
371
+ **Skills Activated**:
372
+
373
+ 1. `github-integration` - Fetch profile
374
+ 2. `database-patterns` - Query favorites
375
+ 3. `sveltekit-patterns` - Build component
376
+ 4. `daisyui-conventions` - Style card
377
+
378
+ **Result**: Skills work together naturally, each handling its domain.
379
+
380
+ ---
381
+
382
+ ## Quick Checklist
383
+
384
+ Before considering a skill "done":
385
+
386
+ - [ ] Description includes keywords and "when to use"
387
+ - [ ] Quick Start shows most common pattern
388
+ - [ ] Core patterns (3-5) in SKILL.md
389
+ - [ ] Detailed docs in references/
390
+ - [ ] Scripts for repeated code
391
+ - [ ] Assets for templates
392
+ - [ ] Validated with validate_skill.py
393
+ - [ ] Tested in real conversations
394
+ - [ ] No TODO placeholders
395
+ - [ ] Imperative voice throughout
396
+
397
+ ---
398
+
399
+ ## Resources
400
+
401
+ - See main [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) for system design
402
+ - See [SKILL-EXAMPLES.md](../../../docs/SKILL-EXAMPLES.md) for Anthropic examples
403
+ - See skill-creator SKILL.md for 6-step process