@masslessai/push-todo 4.4.0 → 4.5.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.
- package/SKILL.md +6 -0
- package/lib/cli.js +9 -1
- package/lib/cron.js +18 -4
- package/lib/daemon.js +1 -87
- package/package.json +2 -1
- package/scripts/postinstall.js +88 -4
- package/skills/skill-builder/SKILL.md +313 -0
- package/skills/skill-builder/agents/analyzer.md +274 -0
- package/skills/skill-builder/agents/comparator.md +202 -0
- package/skills/skill-builder/agents/grader.md +223 -0
- package/skills/skill-builder/references/description-optimization.md +212 -0
- package/skills/skill-builder/references/eval-framework.md +230 -0
- package/skills/skill-builder/references/json-schemas.md +430 -0
- package/skills/skill-builder/references/plugin-skill-patterns.md +122 -0
- package/skills/skill-builder/references/writing-guide.md +330 -0
- package/skills/skill-builder/scripts/__init__.py +0 -0
- package/skills/skill-builder/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-builder/scripts/generate_report.py +326 -0
- package/skills/skill-builder/scripts/improve_description.py +248 -0
- package/skills/skill-builder/scripts/quick_validate.py +103 -0
- package/skills/skill-builder/scripts/run_eval.py +310 -0
- package/skills/skill-builder/scripts/run_loop.py +332 -0
- package/skills/skill-builder/scripts/utils.py +47 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Plugin Skill Patterns
|
|
2
|
+
|
|
3
|
+
This document covers skill development specifically within Claude Code plugins.
|
|
4
|
+
|
|
5
|
+
## Skill Location in Plugins
|
|
6
|
+
|
|
7
|
+
Plugin skills live in the plugin's `skills/` directory:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
my-plugin/
|
|
11
|
+
├── .claude-plugin/
|
|
12
|
+
│ └── plugin.json
|
|
13
|
+
├── commands/
|
|
14
|
+
├── agents/
|
|
15
|
+
└── skills/
|
|
16
|
+
└── my-skill/
|
|
17
|
+
├── SKILL.md
|
|
18
|
+
├── references/
|
|
19
|
+
├── examples/
|
|
20
|
+
└── scripts/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Auto-Discovery
|
|
24
|
+
|
|
25
|
+
Claude Code automatically discovers skills within plugins:
|
|
26
|
+
- Scans `skills/` directory for subdirectories containing `SKILL.md`
|
|
27
|
+
- Loads skill metadata (name + description) always into context
|
|
28
|
+
- Loads SKILL.md body when skill triggers based on user request
|
|
29
|
+
- Loads references/examples when Claude determines they're needed
|
|
30
|
+
|
|
31
|
+
No registration or configuration required — just create the directory structure.
|
|
32
|
+
|
|
33
|
+
## No Packaging Needed
|
|
34
|
+
|
|
35
|
+
Plugin skills are distributed as part of the plugin. Users get skills when they install the plugin. Unlike standalone skills, there's no need to run `package_skill.py` or create ZIP files.
|
|
36
|
+
|
|
37
|
+
## Creating a Plugin Skill
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Create the skill directory within your plugin
|
|
41
|
+
mkdir -p my-plugin/skills/skill-name/{references,examples,scripts}
|
|
42
|
+
touch my-plugin/skills/skill-name/SKILL.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Write the SKILL.md following the standard skill creation process (see main SKILL.md).
|
|
46
|
+
|
|
47
|
+
## Testing Plugin Skills
|
|
48
|
+
|
|
49
|
+
Test skills by loading the plugin locally:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Launch Claude Code with local plugin
|
|
53
|
+
cc --plugin-dir /path/to/my-plugin
|
|
54
|
+
|
|
55
|
+
# Then ask questions that should trigger the skill
|
|
56
|
+
# Verify skill loads correctly and provides useful guidance
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Plugin-Dev Examples
|
|
60
|
+
|
|
61
|
+
The `plugin-dev` plugin itself contains excellent examples of well-crafted skills:
|
|
62
|
+
|
|
63
|
+
### hook-development
|
|
64
|
+
- Excellent trigger phrases: "create a hook", "add a PreToolUse hook", etc.
|
|
65
|
+
- Lean SKILL.md (~1,651 words)
|
|
66
|
+
- 3 references/ files for detailed content
|
|
67
|
+
- 3 examples/ of working hooks
|
|
68
|
+
- 3 scripts/ utilities
|
|
69
|
+
|
|
70
|
+
### agent-development
|
|
71
|
+
- Strong triggers: "create an agent", "agent frontmatter", etc.
|
|
72
|
+
- Focused SKILL.md (~1,438 words)
|
|
73
|
+
- References include the AI generation prompt from Claude Code
|
|
74
|
+
- Complete agent examples
|
|
75
|
+
|
|
76
|
+
### command-development
|
|
77
|
+
- Clear critical concepts
|
|
78
|
+
- Good references structure
|
|
79
|
+
|
|
80
|
+
### plugin-settings
|
|
81
|
+
- Specific triggers: "plugin settings", ".local.md files", "YAML frontmatter"
|
|
82
|
+
- References show real implementations (multi-agent-swarm, ralph-loop)
|
|
83
|
+
- Working parsing scripts
|
|
84
|
+
|
|
85
|
+
### mcp-integration
|
|
86
|
+
- Comprehensive references
|
|
87
|
+
- Multiple reference files for different MCP patterns
|
|
88
|
+
|
|
89
|
+
### plugin-structure
|
|
90
|
+
- Good organization
|
|
91
|
+
- Covers the complete plugin anatomy
|
|
92
|
+
|
|
93
|
+
Each demonstrates progressive disclosure and strong triggering. Study them as templates when building new plugin skills.
|
|
94
|
+
|
|
95
|
+
## Plugin vs Standalone Skills
|
|
96
|
+
|
|
97
|
+
| Aspect | Plugin Skill | Standalone Skill |
|
|
98
|
+
|--------|-------------|-----------------|
|
|
99
|
+
| Location | `plugin/skills/skill-name/` | `~/.claude/skills/skill-name/` |
|
|
100
|
+
| Distribution | With plugin install | Manual or symlink |
|
|
101
|
+
| Discovery | Auto from plugin scan | Auto from skills/ scan |
|
|
102
|
+
| Packaging | Not needed | Optional via `package_skill.py` |
|
|
103
|
+
| Updates | Plugin marketplace | Manual |
|
|
104
|
+
| Command prefix | `plugin-name:skill-name` | `skill-name` |
|
|
105
|
+
|
|
106
|
+
## Plugin Skill Validation
|
|
107
|
+
|
|
108
|
+
After creating a plugin skill:
|
|
109
|
+
|
|
110
|
+
1. **Check structure**: Skill directory in `plugin-name/skills/skill-name/`
|
|
111
|
+
2. **Validate SKILL.md**: Has frontmatter with name and description
|
|
112
|
+
3. **Check trigger phrases**: Description includes specific user queries
|
|
113
|
+
4. **Verify writing style**: Body uses imperative form
|
|
114
|
+
5. **Test progressive disclosure**: SKILL.md is lean, detailed content in references/
|
|
115
|
+
6. **Check references**: All referenced files exist
|
|
116
|
+
7. **Validate examples**: Examples are complete and correct
|
|
117
|
+
8. **Test scripts**: Scripts are executable and work correctly
|
|
118
|
+
|
|
119
|
+
Use the **skill-reviewer agent** from plugin-dev:
|
|
120
|
+
```
|
|
121
|
+
Ask: "Review my skill and check if it follows best practices"
|
|
122
|
+
```
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
# Skill Writing Guide
|
|
2
|
+
|
|
3
|
+
This document provides comprehensive guidance on writing effective skills, merging best practices from the Anthropic Skill Creator methodology with plugin-specific patterns.
|
|
4
|
+
|
|
5
|
+
## Writing Philosophy
|
|
6
|
+
|
|
7
|
+
### Theory of Mind Over Rigid Rules
|
|
8
|
+
|
|
9
|
+
The most important principle: **explain WHY, not just WHAT**.
|
|
10
|
+
|
|
11
|
+
Skills are instructions for another instance of Claude. Claude responds better to understanding the reasoning behind a rule than to a rigid mandate:
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# Good - explains the why
|
|
15
|
+
Keep SKILL.md under 500 lines. The context window is a shared resource between
|
|
16
|
+
the skill, the user's code, and Claude's reasoning. A 2000-line skill crowds
|
|
17
|
+
out the actual work.
|
|
18
|
+
|
|
19
|
+
# Bad - rigid mandate without reasoning
|
|
20
|
+
SKILL.md MUST be under 500 lines. NEVER exceed this limit.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Heavy-handed "MUST" and "NEVER" patterns without explanation often backfire — they make instructions feel arbitrary and don't help Claude make good judgment calls in edge cases.
|
|
24
|
+
|
|
25
|
+
### Set Appropriate Degrees of Freedom
|
|
26
|
+
|
|
27
|
+
Not everything needs to be locked down. Match the constraint level to the task:
|
|
28
|
+
|
|
29
|
+
| Freedom Level | When | Example |
|
|
30
|
+
|---------------|------|---------|
|
|
31
|
+
| **High** | Creative decisions, subjective quality | "Choose an appropriate visualization type" |
|
|
32
|
+
| **Medium** | Common patterns with acceptable variants | "Use imperative form, though brief explanations can use passive voice" |
|
|
33
|
+
| **Low** | Exact format requirements, API contracts | "Output MUST be valid JSON matching this schema exactly" |
|
|
34
|
+
|
|
35
|
+
Only lock things down when the consequences of deviation are real. For output format of an API? Lock it down. For prose style? Leave room for judgment.
|
|
36
|
+
|
|
37
|
+
### Concise is Key
|
|
38
|
+
|
|
39
|
+
The context window is a public good. Every token the skill consumes is a token unavailable for the user's actual work.
|
|
40
|
+
|
|
41
|
+
- Target 1,500-2,000 words for SKILL.md body
|
|
42
|
+
- Maximum 500 lines (including code blocks and tables)
|
|
43
|
+
- Move detailed content to `references/` files
|
|
44
|
+
- Use references for content over 300 lines that isn't always needed
|
|
45
|
+
|
|
46
|
+
If your SKILL.md is approaching the limit, add hierarchy:
|
|
47
|
+
- Table of contents for sections
|
|
48
|
+
- "When to read" annotations for references
|
|
49
|
+
- Grep patterns for large reference files
|
|
50
|
+
|
|
51
|
+
## Frontmatter Description
|
|
52
|
+
|
|
53
|
+
### The Most Important Field
|
|
54
|
+
|
|
55
|
+
The `description` field determines when Claude uses the skill. It is the ONLY thing Claude sees during the triggering decision (the body is never consulted).
|
|
56
|
+
|
|
57
|
+
### Format
|
|
58
|
+
|
|
59
|
+
Use third-person format with specific trigger phrases:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
---
|
|
63
|
+
name: skill-name
|
|
64
|
+
description: >
|
|
65
|
+
This skill should be used when the user asks to "specific phrase 1",
|
|
66
|
+
"specific phrase 2", or mentions related concepts. Use whenever...
|
|
67
|
+
version: 0.1.0
|
|
68
|
+
---
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Be "Pushy"
|
|
72
|
+
|
|
73
|
+
Skills undertrigger more often than they overtrigger. Combat this by being explicit about when the skill should activate:
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
# Good - pushy, catches near-misses
|
|
77
|
+
description: >
|
|
78
|
+
Build interactive dashboards for internal data. Make sure to use this skill
|
|
79
|
+
whenever the user mentions dashboards, data visualization, internal metrics,
|
|
80
|
+
KPI tracking, or wants to display any kind of company data, even if they
|
|
81
|
+
don't explicitly ask for a "dashboard."
|
|
82
|
+
|
|
83
|
+
# Bad - passive, will miss many valid triggers
|
|
84
|
+
description: Provides guidance for dashboard creation.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Include Distinguishing Context
|
|
88
|
+
|
|
89
|
+
When multiple skills could match, help Claude distinguish:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
description: >
|
|
93
|
+
...Use for interactive dashboards with filtering and drill-down.
|
|
94
|
+
Do NOT use for simple static charts (use data-visualization skill)
|
|
95
|
+
or for data analysis queries (use data-analysis skill).
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Common Description Mistakes
|
|
99
|
+
|
|
100
|
+
| Mistake | Example | Fix |
|
|
101
|
+
|---------|---------|-----|
|
|
102
|
+
| Vague | "Provides guidance for X" | "This skill should be used when..." |
|
|
103
|
+
| No trigger phrases | "Helps with development" | Include specific user phrases |
|
|
104
|
+
| Wrong person | "Use this skill when you..." | "This skill should be used when the user..." |
|
|
105
|
+
| Too narrow | "Used for creating PDF reports" | Include related queries users might make |
|
|
106
|
+
|
|
107
|
+
## Body Writing Style
|
|
108
|
+
|
|
109
|
+
### Imperative Form
|
|
110
|
+
|
|
111
|
+
Write using verb-first instructions, not second person:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
# Good (imperative)
|
|
115
|
+
Parse the frontmatter using YAML.
|
|
116
|
+
To accomplish X, do Y.
|
|
117
|
+
Configure the server with authentication.
|
|
118
|
+
|
|
119
|
+
# Bad (second person)
|
|
120
|
+
You should parse the frontmatter...
|
|
121
|
+
You need to configure the server...
|
|
122
|
+
If you want to do X, you can...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Objective, Instructional Language
|
|
126
|
+
|
|
127
|
+
Focus on what to do, not who should do it:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# Good
|
|
131
|
+
Start by reading the configuration file.
|
|
132
|
+
Validate the input before processing.
|
|
133
|
+
Use the grep tool to search for patterns.
|
|
134
|
+
|
|
135
|
+
# Bad
|
|
136
|
+
You can parse the frontmatter...
|
|
137
|
+
Claude should extract fields...
|
|
138
|
+
The user might validate values...
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### When to Break the Rules
|
|
142
|
+
|
|
143
|
+
The imperative form is a strong default, but brief explanations benefit from natural prose:
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
# Step 1: Initialize the Project
|
|
147
|
+
Create the directory structure and configure the build system.
|
|
148
|
+
|
|
149
|
+
Note: The build system uses incremental compilation, so initial setup
|
|
150
|
+
is slow but subsequent builds are fast. This is expected behavior.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The note uses passive voice and explanation — that's fine for a clarifying aside.
|
|
154
|
+
|
|
155
|
+
## Progressive Disclosure in Practice
|
|
156
|
+
|
|
157
|
+
### What Goes in SKILL.md
|
|
158
|
+
|
|
159
|
+
Content that is **always needed** when the skill triggers:
|
|
160
|
+
- Core concepts and overview
|
|
161
|
+
- Essential procedures and workflows
|
|
162
|
+
- Quick reference tables
|
|
163
|
+
- Pointers to references/examples/scripts
|
|
164
|
+
- Most common use cases
|
|
165
|
+
|
|
166
|
+
### What Goes in references/
|
|
167
|
+
|
|
168
|
+
Content that is **sometimes needed**:
|
|
169
|
+
- Detailed patterns and advanced techniques
|
|
170
|
+
- Comprehensive API documentation
|
|
171
|
+
- Migration guides and edge cases
|
|
172
|
+
- Extensive examples and walkthroughs
|
|
173
|
+
|
|
174
|
+
Each reference file can be large (2,000-5,000+ words).
|
|
175
|
+
|
|
176
|
+
### What Goes in scripts/
|
|
177
|
+
|
|
178
|
+
Executable utilities that are **used directly**:
|
|
179
|
+
- Validation tools
|
|
180
|
+
- Testing helpers
|
|
181
|
+
- Parsing utilities
|
|
182
|
+
- Automation scripts
|
|
183
|
+
|
|
184
|
+
Should be executable and documented.
|
|
185
|
+
|
|
186
|
+
### What Goes in assets/
|
|
187
|
+
|
|
188
|
+
Files that appear **in the output**:
|
|
189
|
+
- Templates (HTML, PPTX, etc.)
|
|
190
|
+
- Images and icons
|
|
191
|
+
- Boilerplate code
|
|
192
|
+
- Sample documents
|
|
193
|
+
|
|
194
|
+
### Referencing Resources
|
|
195
|
+
|
|
196
|
+
Always tell Claude where to find additional information and WHEN to read it:
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
## Additional Resources
|
|
200
|
+
|
|
201
|
+
For detailed patterns and techniques, consult:
|
|
202
|
+
- **`references/patterns.md`** - Read when implementing complex workflows
|
|
203
|
+
- **`references/advanced.md`** - Read for edge cases and optimization
|
|
204
|
+
- **`references/api-reference.md`** - Read when making API calls
|
|
205
|
+
|
|
206
|
+
Working examples in `examples/`:
|
|
207
|
+
- **`examples/basic.sh`** - Minimal working example
|
|
208
|
+
- **`examples/advanced.sh`** - Full-featured example
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Examples and Output Formats
|
|
212
|
+
|
|
213
|
+
### Example Pattern
|
|
214
|
+
|
|
215
|
+
Show input/output pairs to make expectations concrete:
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
## Format Example
|
|
219
|
+
|
|
220
|
+
**Example 1:**
|
|
221
|
+
Input: Added user authentication with JWT tokens
|
|
222
|
+
Output: feat(auth): implement JWT-based authentication
|
|
223
|
+
|
|
224
|
+
**Example 2:**
|
|
225
|
+
Input: Fixed null pointer exception in user profile page
|
|
226
|
+
Output: fix(profile): handle null user data gracefully
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Output Format Definition
|
|
230
|
+
|
|
231
|
+
When exact format matters, provide a template:
|
|
232
|
+
|
|
233
|
+
```markdown
|
|
234
|
+
## Report Structure
|
|
235
|
+
|
|
236
|
+
ALWAYS use this exact template:
|
|
237
|
+
|
|
238
|
+
# [Title]
|
|
239
|
+
## Executive Summary
|
|
240
|
+
## Key Findings
|
|
241
|
+
## Recommendations
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Common Mistakes to Avoid
|
|
245
|
+
|
|
246
|
+
### Mistake 1: Everything in SKILL.md
|
|
247
|
+
|
|
248
|
+
A single 8,000-word SKILL.md file bloats context every time the skill loads:
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
# Bad
|
|
252
|
+
skill-name/
|
|
253
|
+
└── SKILL.md (8,000 words)
|
|
254
|
+
|
|
255
|
+
# Good
|
|
256
|
+
skill-name/
|
|
257
|
+
├── SKILL.md (1,800 words)
|
|
258
|
+
└── references/
|
|
259
|
+
├── patterns.md (2,500 words)
|
|
260
|
+
└── advanced.md (3,700 words)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Mistake 2: Duplicated Content
|
|
264
|
+
|
|
265
|
+
Information should live in ONE place — either SKILL.md or a reference file, not both. If you summarize a reference in SKILL.md, make it a brief pointer, not a full reproduction.
|
|
266
|
+
|
|
267
|
+
### Mistake 3: Missing Resource References
|
|
268
|
+
|
|
269
|
+
Claude can't use files it doesn't know about:
|
|
270
|
+
|
|
271
|
+
```markdown
|
|
272
|
+
# Bad - Claude doesn't know references exist
|
|
273
|
+
[Core content with no mention of references/]
|
|
274
|
+
|
|
275
|
+
# Good - Claude knows where to find more
|
|
276
|
+
For detailed patterns, read `references/patterns.md`.
|
|
277
|
+
Run `scripts/validate.sh` to check your configuration.
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Mistake 4: Overly Rigid Instructions
|
|
281
|
+
|
|
282
|
+
```markdown
|
|
283
|
+
# Bad - rigid without reasoning
|
|
284
|
+
MUST use exactly 3 sections. NEVER include more than 5 bullet points.
|
|
285
|
+
ALL headings MUST be title case.
|
|
286
|
+
|
|
287
|
+
# Good - explains reasoning, allows judgment
|
|
288
|
+
Use 3-5 sections to keep reports scannable. More than 5 sections
|
|
289
|
+
makes it hard for stakeholders to find what matters. Title case
|
|
290
|
+
headings are preferred for consistency, but prioritize clarity.
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Minimal Skill Template
|
|
294
|
+
|
|
295
|
+
For simple skills (domain knowledge, no complex resources):
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
skill-name/
|
|
299
|
+
└── SKILL.md
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Standard Skill Template (Recommended)
|
|
303
|
+
|
|
304
|
+
For most skills:
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
skill-name/
|
|
308
|
+
├── SKILL.md
|
|
309
|
+
├── references/
|
|
310
|
+
│ └── detailed-guide.md
|
|
311
|
+
└── examples/
|
|
312
|
+
└── working-example.sh
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Complete Skill Template
|
|
316
|
+
|
|
317
|
+
For complex domains:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
skill-name/
|
|
321
|
+
├── SKILL.md
|
|
322
|
+
├── references/
|
|
323
|
+
│ ├── patterns.md
|
|
324
|
+
│ └── advanced.md
|
|
325
|
+
├── examples/
|
|
326
|
+
│ ├── basic.sh
|
|
327
|
+
│ └── advanced.json
|
|
328
|
+
└── scripts/
|
|
329
|
+
└── validate.sh
|
|
330
|
+
```
|
|
File without changes
|