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,345 @@
1
+ ---
2
+ name: skill-creator
3
+ description: Guide for creating effective Claude skills for devhub-crm. Use when users want to create a new skill or update an existing skill that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
4
+ ---
5
+
6
+ # Skill Creator
7
+
8
+ Guide for creating effective Claude skills following Anthropic's best practices, adapted for devhub-crm.
9
+
10
+ ## Overview
11
+
12
+ Skills are modular packages that extend Claude's capabilities with specialized knowledge, workflows, and tools. Think of them as onboarding guides for specific domains that transform Claude from a general-purpose agent into a specialist equipped with procedural knowledge.
13
+
14
+ ## The 6-Step Creation Process
15
+
16
+ ### Step 1: Understanding with Concrete Examples
17
+
18
+ **Goal**: Clearly understand how the skill will be used in practice.
19
+
20
+ **Questions to ask**:
21
+
22
+ - "What specific task needs this skill?"
23
+ - "Can you give 3-5 concrete examples of using this?"
24
+ - "What would trigger Claude to use this skill?"
25
+ - "What context are you repeatedly providing?"
26
+
27
+ **Example**:
28
+
29
+ ```
30
+ User: "I need a database skill"
31
+ Claude: "What specific database operations would you use this for?"
32
+ User: "Querying contacts, managing relationships, writing migrations"
33
+ Claude: "Can you give me actual query examples you use frequently?"
34
+ ```
35
+
36
+ **Output**: 3-5 concrete usage examples before proceeding.
37
+
38
+ ---
39
+
40
+ ### Step 2: Planning Reusable Contents
41
+
42
+ **Goal**: Determine what goes in the skill.
43
+
44
+ **For each example, identify**:
45
+
46
+ 1. What code is rewritten repeatedly? → `scripts/`
47
+ 2. What context is repeated? → `SKILL.md` or `references/`
48
+ 3. What templates are reused? → `assets/`
49
+
50
+ **Decision Matrix**:
51
+
52
+ | Content | Location | Example |
53
+ | -------------- | ----------- | -------------------------------- |
54
+ | Core workflows | SKILL.md | "Use prepared statements" |
55
+ | Detailed docs | references/ | Complete schema with all columns |
56
+ | Repeated code | scripts/ | Validation logic, generators |
57
+ | Templates | assets/ | Boilerplate files, images |
58
+
59
+ **Output**: List of files to create with their purposes.
60
+
61
+ ---
62
+
63
+ ### Step 3: Initialize the Skill
64
+
65
+ **Use the init script**:
66
+
67
+ ```bash
68
+ python .claude/scripts/init_skill.py \
69
+ --name skill-name \
70
+ --description "What it does and when to use it"
71
+ ```
72
+
73
+ **This creates**:
74
+
75
+ ```
76
+ .claude/skills/skill-name/
77
+ ├── SKILL.md
78
+ ├── README.md
79
+ ├── references/detailed-guide.md
80
+ ├── scripts/example.py
81
+ └── assets/
82
+ ```
83
+
84
+ **Next**: Customize or delete example files as needed.
85
+
86
+ ---
87
+
88
+ ### Step 4: Edit the Skill
89
+
90
+ **Writing Guidelines**:
91
+
92
+ - ✅ Use imperative voice: "Use prepared statements"
93
+ - ❌ Not second person: "You should use prepared statements"
94
+ - ✅ Be specific: "Generate IDs with nanoid()"
95
+ - ❌ Not vague: "Use appropriate IDs"
96
+
97
+ **SKILL.md Structure**:
98
+
99
+ ```markdown
100
+ ---
101
+ name: skill-name
102
+ description: [What it does + when to use it, keywords for discovery]
103
+ ---
104
+
105
+ # Skill Title
106
+
107
+ ## Overview
108
+
109
+ [2-3 sentences on purpose]
110
+
111
+ ## Quick Start
112
+
113
+ [Minimal working example]
114
+
115
+ ## Core Patterns
116
+
117
+ ### Pattern 1
118
+
119
+ [Common workflow with code]
120
+
121
+ ### Pattern 2
122
+
123
+ [Another common workflow]
124
+
125
+ ## Advanced Usage
126
+
127
+ For detailed information:
128
+
129
+ - [references/file1.md](references/file1.md)
130
+ - [references/file2.md](references/file2.md)
131
+
132
+ ## Scripts
133
+
134
+ - `scripts/validate.py`: Description
135
+ - `scripts/generate.py`: Description
136
+
137
+ ## Notes
138
+
139
+ - Important consideration 1
140
+ - Important consideration 2
141
+ ```
142
+
143
+ **Key Questions to Answer**:
144
+
145
+ 1. What is the purpose? (2-3 sentences)
146
+ 2. When should this be used? (triggers/contexts)
147
+ 3. How should Claude use this? (step-by-step)
148
+ 4. What resources are bundled? (references, scripts, assets)
149
+
150
+ **References Guidelines**:
151
+
152
+ - One topic per file
153
+ - Descriptive names: `authentication-flow.md` not `auth.md`
154
+ - Include examples and code
155
+ - Link from SKILL.md
156
+
157
+ **Scripts Guidelines**:
158
+
159
+ - Include shebang (`#!/usr/bin/env python3`)
160
+ - Make executable (`chmod +x`)
161
+ - Add usage documentation
162
+ - Handle errors gracefully
163
+
164
+ **Assets Guidelines**:
165
+
166
+ - Templates that get copied/modified
167
+ - Images used in output
168
+ - Boilerplate code
169
+ - Configuration files
170
+
171
+ ---
172
+
173
+ ### Step 5: Validate and Package
174
+
175
+ **Validate first**:
176
+
177
+ ```bash
178
+ python .claude/scripts/validate_skill.py .claude/skills/skill-name
179
+ ```
180
+
181
+ **Fix any errors**, then package:
182
+
183
+ ```bash
184
+ python .claude/scripts/package_skill.py .claude/skills/skill-name
185
+ ```
186
+
187
+ **Creates**: `dist/skill-name.zip` ready for distribution.
188
+
189
+ **Validation checks**:
190
+
191
+ - YAML frontmatter format
192
+ - Required fields present
193
+ - Name matches directory
194
+ - References mentioned in SKILL.md
195
+ - Scripts are executable
196
+ - No TODO placeholders
197
+
198
+ ---
199
+
200
+ ### Step 6: Test and Iterate
201
+
202
+ **Testing**:
203
+
204
+ 1. Use skill in real conversations
205
+ 2. Notice struggles or inefficiencies
206
+ 3. Update based on observations
207
+
208
+ **Iteration workflow**:
209
+
210
+ ```bash
211
+ # Edit skill
212
+ vim .claude/skills/skill-name/SKILL.md
213
+
214
+ # Validate
215
+ python .claude/scripts/validate_skill.py .claude/skills/skill-name
216
+
217
+ # Test in conversation
218
+ # (Skills auto-reload in Claude Code)
219
+
220
+ # Package if sharing
221
+ python .claude/scripts/package_skill.py .claude/skills/skill-name
222
+ ```
223
+
224
+ **Common improvements**:
225
+
226
+ - Add more examples
227
+ - Move details to references
228
+ - Create scripts for repeated patterns
229
+ - Clarify confusing instructions
230
+ - Enhance "when to use" guidance
231
+
232
+ ---
233
+
234
+ ## Progressive Disclosure Principle
235
+
236
+ Skills load in three levels:
237
+
238
+ ### Level 1: Metadata (~100 tokens)
239
+
240
+ **Always in context**
241
+
242
+ ```yaml
243
+ name: skill-name
244
+ description: What it does and when to use it
245
+ ```
246
+
247
+ ### Level 2: Instructions (<5k tokens)
248
+
249
+ **Loaded when triggered**
250
+
251
+ - SKILL.md body with core patterns
252
+ - Links to references and scripts
253
+
254
+ ### Level 3: Resources (unlimited)
255
+
256
+ **Loaded as needed**
257
+
258
+ - references/: Documentation Claude reads
259
+ - scripts/: Code Claude executes
260
+ - assets/: Files Claude uses in output
261
+
262
+ ## Best Practices
263
+
264
+ ### Do:
265
+
266
+ ✅ Start with concrete examples
267
+ ✅ Use imperative voice
268
+ ✅ Keep SKILL.md under 5k words
269
+ ✅ Link to references for details
270
+ ✅ Include "when to use" in description
271
+ ✅ Test on real tasks
272
+ ✅ Iterate based on usage
273
+
274
+ ### Don't:
275
+
276
+ ❌ Use second person ("you")
277
+ ❌ Duplicate content across files
278
+ ❌ Include everything inline
279
+ ❌ Use generic descriptions
280
+ ❌ Leave TODO placeholders
281
+ ❌ Skip validation
282
+
283
+ ## devhub-crm Skill Patterns
284
+
285
+ ### Database Skills
286
+
287
+ - Schema in references/schema.md
288
+ - Query patterns in SKILL.md
289
+ - Validation scripts for consistency
290
+ - Migration helpers
291
+
292
+ ### Component Skills
293
+
294
+ - Basic templates in SKILL.md
295
+ - Component catalog in references/
296
+ - Example components in assets/
297
+ - Type definitions included
298
+
299
+ ### Integration Skills
300
+
301
+ - Auth patterns in SKILL.md
302
+ - API docs in references/
303
+ - Connection tests in scripts/
304
+ - Rate limit handling
305
+
306
+ ### Styling Skills
307
+
308
+ - Core conventions in SKILL.md
309
+ - Complete reference in references/
310
+ - Theme examples in assets/
311
+ - Validation for consistency
312
+
313
+ ## Quick Reference Commands
314
+
315
+ ```bash
316
+ # Create new skill
317
+ python .claude/scripts/init_skill.py --name my-skill --description "..."
318
+
319
+ # Validate skill
320
+ python .claude/scripts/validate_skill.py .claude/skills/my-skill
321
+
322
+ # Package skill
323
+ python .claude/scripts/package_skill.py .claude/skills/my-skill
324
+
325
+ # Validate strictly (warnings = errors)
326
+ python .claude/scripts/validate_skill.py .claude/skills/my-skill --strict
327
+ ```
328
+
329
+ ## Resources
330
+
331
+ See also:
332
+
333
+ - [references/skill-examples.md](references/skill-examples.md) - Real examples from Anthropic
334
+ - [references/writing-guide.md](references/writing-guide.md) - Detailed writing guidelines
335
+ - [../../docs/SKILLS-ARCHITECTURE.md](../../docs/SKILLS-ARCHITECTURE.md) - Complete architecture
336
+ - [../../docs/SKILL-DEVELOPMENT.md](../../docs/SKILL-DEVELOPMENT.md) - Development workflow
337
+
338
+ ## Notes
339
+
340
+ - Skills are never truly "done" - iterate based on usage
341
+ - Start minimal, add complexity as needed
342
+ - Test early and often
343
+ - Real examples beat invented ones
344
+ - Write for Claude, not humans
345
+ - Description drives discovery - make it count