claude-dev-env 1.4.0 → 1.7.0

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.
@@ -1,270 +1,204 @@
1
1
  ---
2
2
  name: skill-writer
3
- description: Guide users through creating Agent Skills for Codex. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
3
+ description: >-
4
+ Write, create, or improve Claude Code skills (SKILL.md files) with correct
5
+ frontmatter, progressive disclosure, and prompt-engineering principles.
6
+ Covers workflow skills, enforcement rules, advisory guidance, reference
7
+ lookups, and automation scripts.
4
8
  ---
9
+ @packages/claude-dev-env/skills/skill-writer/REFERENCE.md
5
10
 
6
- # Writing Skills
11
+ # Skill writer
7
12
 
8
- ## Overview
13
+ **Core principle:** A skill is a prompt -- the SKILL.md body is injected into Claude's context when triggered. The same principles that make prompts effective make skills effective.
9
14
 
10
- Create well-structured Agent Skills for Codex that follow superpowers patterns and validation requirements.
15
+ **Canonical source:** https://platform.claude.com/docs/en/claude-code/skills -- the official reference for skill structure, frontmatter fields, progressive disclosure, and string substitutions.
11
16
 
12
- **Core principle:** Skills encode expertise. A good skill prevents the same mistake from happening twice.
17
+ ## Skill-only output rule (overrides all other delivery instructions)
13
18
 
14
- **Announce at start:** "I'm using the skill-writer skill to create a new skill."
19
+ This skill produces skill artifacts. It does not perform the underlying task the skill would automate.
15
20
 
16
- **Context:** Skills complement agents. Skills are invoked inline; agents run as subprocesses. Use skills for workflows that need conversation context.
21
+ When this skill is active, your response contains exactly one of:
22
+ 1. **Clarifying questions** to gather information needed to write a better skill (Step 3) -- then stop and wait.
23
+ 2. **The skill artifact** in fenced code blocks (SKILL.md and optionally REFERENCE.md) -- then stop.
17
24
 
18
- ## The Process
25
+ Prohibited responses: executing the task the skill would automate, proposing implementation changes unrelated to skill authoring, explaining what *you would do* to accomplish the underlying task.
19
26
 
20
- ### Step 1: Understand the Need
27
+ ## When this skill applies
21
28
 
22
- Ask clarifying questions (one at a time):
29
+ Trigger for any request to **author**, **refine**, or **restructure** a Claude Code skill: SKILL.md files, skill frontmatter, skill body content, reference files, or skill directory structure.
23
30
 
24
- 1. What specific capability should this Skill provide?
25
- 2. When should Codex use this Skill?
26
- 3. Is this critical (must follow exactly) or advisory (adapt to context)?
27
- 4. Does this fit in an existing workflow pipeline?
31
+ Use this skill when the user needs a structured skill artifact; for quick answers about skill syntax, answer directly in plain text.
28
32
 
29
- **Keep it focused:** One Skill = one capability
30
- - Good: "PDF form filling", "plan review", "TDD enforcement"
31
- - Too broad: "Document processing", "code quality"
33
+ When invoked with arguments (e.g. `/skill-writer improve this: [paste]`), treat `$ARGUMENTS` as the skill content to refine.
32
34
 
33
- ### Step 2: Choose Format
35
+ ## Workflow (run in order)
34
36
 
35
- **CRITICAL DECISION:** Advisory vs Superpowers format.
37
+ ### 1. Classify the skill type
36
38
 
37
- | Format | When to Use | Key Signals |
38
- |--------|-------------|-------------|
39
- | **Superpowers** | Rules that MUST be followed | Production failures if violated, anti-patterns to block, non-negotiable workflows |
40
- | **Advisory** | Helpful guidance | Best practices, tips, adaptable to context |
39
+ Pick one primary:
41
40
 
42
- **If in doubt:** If you're tempted to say "should" instead of "MUST", it's advisory.
41
+ | Type | Purpose | Example |
42
+ |------|---------|---------|
43
+ | `workflow` | Multi-step process with sequential phases | TDD enforcement, plan review, PR submission |
44
+ | `enforcement` | Rules that constrain behavior | Code standards, comment preservation, commit rules |
45
+ | `advisory` | Guidance where multiple approaches are valid | Best practices, design patterns, optimization tips |
46
+ | `reference` | Lookup material loaded on demand | API docs, field mappings, configuration tables |
47
+ | `automation` | Script-driven with tool calls | PDF form filling, browser automation, file processing |
43
48
 
44
- ### Step 3: Choose Location
49
+ ### 2. Set degree of freedom
45
50
 
46
- **Personal Skills** (`~/.Codex/skills/`):
47
- - Individual workflows
48
- - Experimental skills
51
+ Match specificity to task fragility:
49
52
 
50
- **Project Skills** (`.Codex/skills/`):
51
- - Team conventions
52
- - Project-specific expertise
53
- - Committed to git
53
+ - **High:** Multiple valid approaches; use numbered goals and acceptance criteria. The skill states *what* to achieve, not *how*.
54
+ - **Medium:** Preferred pattern exists; use structured steps with room for adaptation. The skill states a recommended approach but allows deviation when justified.
55
+ - **Low:** Fragile or safety-critical; use exact steps, exact field names, and boundary constraints. The skill states precisely what to do and what not to do.
54
56
 
55
- ### Step 4: Write Frontmatter
57
+ ### 3. Collect missing facts
56
58
 
57
- ```yaml
58
- ---
59
- name: skill-name
60
- description: [What it does] + [When to use it] + [Trigger phrases]
61
- ---
62
- ```
59
+ Ask 1-3 short questions if needed. Focus on:
60
+ - What capability does the skill provide? (one skill = one capability)
61
+ - When should the skill trigger? (specific phrases, file patterns, workflow position)
62
+ - What tools does the skill need? (Bash, Read, Grep, MCP tools)
63
+ - What does the skill produce? (output format, files created, state changes)
64
+ - Where does it fit in existing workflows? (before/after other skills)
63
65
 
64
- **Name rules:**
65
- - Lowercase, hyphens only, max 64 chars
66
- - Must match directory name
66
+ ### 4. Choose location
67
67
 
68
- **Description formula:** `[What] + [When] + [Triggers]`
68
+ **Personal skills** (`~/.claude/skills/` or package-managed):
69
+ - Individual workflows, experimental skills, cross-project utilities
69
70
 
70
- ```yaml
71
- # Good
72
- description: Review implementation plans against AGENTS.md standards. Use after writing-plans and before executing-plans to validate TDD compliance and right-sized engineering.
71
+ **Project skills** (`.claude/skills/`):
72
+ - Team conventions, project-specific expertise, committed to git
73
73
 
74
- # Bad
75
- description: Helps with plans
76
- ```
77
-
78
- ### Step 5: Write Content
79
-
80
- #### Superpowers Format Structure
74
+ ### 5. Write frontmatter
81
75
 
82
- ```markdown
83
- # Skill Name
76
+ Apply official constraints from the canonical source:
84
77
 
85
- ## Overview
86
-
87
- Brief description.
88
-
89
- **Core principle:** [One sentence that captures the essential insight]
90
-
91
- **Announce at start:** "I'm using the [skill] skill to [purpose]."
92
-
93
- **Context:** [Where this fits in the workflow pipeline]
94
-
95
- ## The Process
96
-
97
- ### Step 1: [First Action]
98
- [Narrative instructions, not verbose checklists]
78
+ ```yaml
79
+ ---
80
+ name: skill-name-here
81
+ description: >-
82
+ [What it does] in third person. [When to use it].
83
+ Triggers: '[phrase 1]', '[phrase 2]', '[phrase 3]'.
84
+ ---
85
+ ```
99
86
 
100
- ### Step 2: [Second Action]
101
- [Continue with clear steps]
87
+ **Name:** lowercase, hyphens, numbers only. Max 64 chars. No `anthropic` or `claude`. Must match directory name.
102
88
 
103
- ## Output Format
89
+ **Description:** max 1024 chars. Third person. No XML tags. Include trigger phrases that match how users naturally ask for this capability.
104
90
 
105
- [What the skill produces - be specific]
91
+ **Optional fields** -- include only when needed:
92
+ - `allowed-tools` -- when the skill requires specific tools (e.g., `Bash(node *), Read`)
93
+ - `argument-hint` -- when the skill accepts arguments (e.g., `[filename] [format]`)
94
+ - `paths` -- when the skill applies only to certain file types (e.g., `"*.py"` or `["*.ts", "*.tsx"]`)
95
+ - `context: fork` -- when the skill needs isolated execution without conversation history
96
+ - `disable-model-invocation: true` -- when the skill should only trigger via explicit `/name` invocation
97
+ - `effort` -- when the skill benefits from a specific thinking depth (`low`, `medium`, `high`, `max`)
106
98
 
107
- ## After Completion
99
+ See REFERENCE.md for the complete field table with types, defaults, and constraints.
108
100
 
109
- [What happens next - reference sub-skills if applicable]
101
+ ### 6. Build the skill body
110
102
 
111
- **If [condition]:**
112
- - [Action]
113
- - **REQUIRED SUB-SKILL:** Use [skill-name]
103
+ Apply prompt-engineering principles -- a skill body is a prompt. Source: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
114
104
 
115
- ## Red Flags - STOP
105
+ **Structure with XML section tags** where content mixes instructions, context, and examples. Anthropic: "Use consistent, descriptive tag names across your prompts. Nest tags when content has a natural hierarchy." For skills under ~20 lines, use concise plain structure instead.
116
106
 
117
- [List signals that mean something is wrong]
107
+ **Set a role** when the skill benefits from focused behavior. Anthropic: "Setting a role in the system prompt focuses Claude's behavior and tone for your use case. Even a single sentence makes a difference."
118
108
 
119
- - [Red flag 1]
120
- - [Red flag 2]
109
+ **Add motivation behind constraints.** Anthropic: "Providing context or motivation behind your instructions... can help Claude better understand your goals and deliver more targeted responses." State *why* a rule exists, not just *what* it forbids.
121
110
 
122
- ## Rationalization Prevention
111
+ **Frame positively.** State the desired behavior directly. Anthropic: "Your response should be composed of smoothly flowing prose paragraphs" provides clearer guidance than a prohibition-only instruction. Write "validate field names before filling" rather than "never guess field names."
123
112
 
124
- | Excuse | Reality |
125
- |--------|---------|
126
- | "[Common shortcut]" | [Why it fails] |
127
- | "[Another excuse]" | [Why it fails] |
113
+ **Emotion-informed framing.** Anthropic's emotion concepts research (2026) found internal activation patterns that causally influence output quality. Apply to skill writing: (1) provide clear success criteria and escape routes; (2) use collaborative framing; (3) frame tasks as interesting problems; (4) invite transparency -- include "say so if you're unsure" when appropriate; (5) use constructive, forward-looking tone.
128
114
 
129
- ## Remember
115
+ **Golden rule check.** Anthropic: "Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they'd be confused, Claude will be too." Apply the same test to the skill body.
130
116
 
131
- - [Key point 1]
132
- - [Key point 2]
133
- - [Key point 3]
134
- ```
117
+ **Progressive disclosure.** Keep the SKILL.md body under 500 lines. Move heavy content (field tables, long examples, lookup data, scripts) into REFERENCE.md or separate files that load only when referenced.
135
118
 
136
- #### Advisory Format Structure
119
+ #### Body structure template
137
120
 
138
121
  ```markdown
139
122
  # Skill Name
140
123
 
141
- ## Overview
124
+ **Core principle:** [One sentence capturing the essential insight]
142
125
 
143
- Brief description of what this Skill does.
126
+ ## When this skill applies
127
+ [Trigger conditions, workflow position]
144
128
 
145
- **Announce at start:** "I'm using the [skill] skill."
146
-
147
- ## Instructions
148
-
149
- Step-by-step guidance:
150
- 1. First step
151
- 2. Second step
152
- 3. Handle edge cases
129
+ ## The Process
153
130
 
154
- ## Examples
131
+ ### Step 1: [First Action]
132
+ [Instructions -- narrative, not verbose checklists]
155
133
 
156
- Concrete usage examples.
134
+ ### Step 2: [Second Action]
135
+ [Continue with clear sequential steps]
157
136
 
158
- ## Best practices
137
+ ## Output Format
138
+ [What the skill produces -- be specific]
159
139
 
160
- - Key conventions
161
- - Common pitfalls
140
+ ## Examples
141
+ [3-5 concrete scenarios with inputs and expected outputs]
162
142
  ```
163
143
 
164
- #### Ironclad Format (Critical Rules)
165
-
166
- For skills where violations cause production failures:
167
-
168
- ```markdown
169
- <EXTREMELY_IMPORTANT>
170
- # Skill Name
144
+ ### 7. Control output format
171
145
 
172
- **This skill is MANDATORY for [context].**
146
+ If the skill produces structured output, specify the format explicitly. Use XML format indicators when the skill should produce tagged sections. Match the formatting style in the skill body to the desired output style -- Anthropic notes the prompt's own formatting influences the response.
173
147
 
174
- IF you are [doing task], YOU DO NOT HAVE A CHOICE. YOU MUST FOLLOW THIS SKILL.
148
+ ### 8. Add examples
175
149
 
176
- ## MANDATORY FIRST RESPONSE PROTOCOL
150
+ Include 3-5 concrete examples showing the skill in action. Wrap in `<example>` tags with diverse, representative inputs. Anthropic: "Include 3-5 examples for best results. You can also ask Claude to evaluate your examples for relevance and diversity."
177
151
 
178
- Before doing ANYTHING:
152
+ Examples should cover:
153
+ - A typical use case
154
+ - An edge case or boundary condition
155
+ - A case where the skill should decline or ask for clarification
179
156
 
180
- 1. [ ] [First verification]
181
- 2. [ ] [Second verification]
182
- 3. [ ] [Third verification]
157
+ ### 9. Self-check
183
158
 
184
- **Responding WITHOUT completing this checklist = automatic failure.**
159
+ Before delivering, verify against this rubric:
185
160
 
186
- ## Critical Rules - NO EXCEPTIONS
161
+ - [ ] Description is third person with trigger phrases
162
+ - [ ] Under 500 lines
163
+ - [ ] States what to do in positive terms (not prohibition-heavy)
164
+ - [ ] Degree of freedom matches task fragility
165
+ - [ ] Progressive disclosure used (heavy content in REFERENCE.md)
166
+ - [ ] No time-sensitive claims unless clearly dated
167
+ - [ ] Examples are concrete, not abstract
168
+ - [ ] Frontmatter fields are valid per official docs
169
+ - [ ] If tools needed: specifies `allowed-tools`
170
+ - [ ] If arguments expected: includes `argument-hint`
171
+ - [ ] Workflow steps are sequential and numbered
172
+ - [ ] Golden rule: a colleague could follow this skill without extra context
173
+ - [ ] Motivation provided for constraints (why, not just what)
174
+ - [ ] One skill = one capability (not a bundle of loosely related features)
175
+ - [ ] String substitutions used correctly (`$ARGUMENTS`, `${CLAUDE_SKILL_DIR}`, etc.)
187
176
 
188
- ### Rule 1: [Rule Name]
177
+ ### 10. Deliver
189
178
 
190
- **NEVER [forbidden action].**
179
+ Final artifact as **fenced code blocks** the user can paste as-is: one block for SKILL.md, optionally one for REFERENCE.md. The fenced blocks are your entire response -- no surrounding commentary or explanation.
191
180
 
192
- - [ ] FORBIDDEN: [specific example]
193
- - [x] REQUIRED: [correct approach]
181
+ ## Claude 4.6 considerations
194
182
 
195
- **WHY:** [Production consequence]
183
+ When writing skills for current Claude models, apply these patterns:
196
184
 
197
- ## Common Rationalizations That Mean You're About To Fail
185
+ - **Overtriggering:** Dial back aggressive language. Anthropic: "Where you might have said 'CRITICAL: You MUST use this tool when...', you can use more normal prompting like 'Use this tool when...'." Skills that shout get ignored or cause erratic behavior -- write in a direct, conversational tone.
186
+ - **Overeagerness:** Include scope constraints. Anthropic: "Claude Opus 4.5 and Claude Opus 4.6 have a tendency to overengineer by creating extra files, adding unnecessary abstractions, or building in flexibility that wasn't requested." Skills should state their boundary clearly.
187
+ - **Overthinking:** Anthropic: "Replace blanket defaults with more targeted instructions. Instead of 'Default to using [tool],' add guidance like 'Use [tool] when it would enhance your understanding of the problem.'" Write conditional triggers, not blanket rules.
188
+ - **Conservative vs proactive action:** For skills that should act, use explicit language. For skills that should advise, include: "Default to providing information and recommendations. Proceed with changes only when the user explicitly requests them."
198
189
 
199
- - **"[Excuse 1]"** -> WRONG. [Reality]
200
- - **"[Excuse 2]"** -> WRONG. [Reality]
190
+ ## Autonomy and safety pattern
201
191
 
202
- </EXTREMELY_IMPORTANT>
192
+ For `automation` and `enforcement` skill types, include reversibility guidance. Anthropic provides this pattern:
203
193
 
204
- ---
194
+ ```text
195
+ Consider the reversibility and potential impact of your actions. You are encouraged to take local, reversible actions like editing files or running tests, but for actions that are hard to reverse, affect shared systems, or could be destructive, ask the user before proceeding.
196
+ ```
205
197
 
206
- ## Implementation Guide
198
+ ## Conflict resolution
207
199
 
208
- [Supporting material outside the critical wrapper]
209
- ```
200
+ When skill-writing guidance conflicts across sources, defer to the authority tier:
210
201
 
211
- ### Step 6: Validate
212
-
213
- **Structure:**
214
- - [ ] SKILL.md in correct location
215
- - [ ] Directory name matches `name` field
216
- - [ ] Valid YAML frontmatter
217
-
218
- **Content (Superpowers format):**
219
- - [ ] Has Overview with Core principle
220
- - [ ] Has "Announce at start"
221
- - [ ] Has Context (pipeline placement)
222
- - [ ] Steps are narrative, not verbose checklists
223
- - [ ] Has Red Flags section
224
- - [ ] Has Rationalization Prevention table
225
- - [ ] Has Remember section
226
- - [ ] References sub-skills where appropriate
227
-
228
- **Content (Ironclad format):**
229
- - [ ] `<EXTREMELY_IMPORTANT>` wrapper
230
- - [ ] Absolute language ("MUST", "NEVER", "NO EXCEPTIONS")
231
- - [ ] Checkbox protocol
232
- - [ ] WHY explanations with consequences
233
- - [ ] Rationalizations are specific, not generic
234
-
235
- ### Step 7: Test
236
-
237
- 1. Restart Codex to load the skill
238
- 2. Ask questions that should trigger it
239
- 3. Verify activation and behavior
240
-
241
- ## Red Flags - STOP
242
-
243
- - Skill is too broad ("handles documents")
244
- - No clear trigger phrases in description
245
- - Steps say "consider" or "might" in Ironclad format
246
- - No workflow context (where does this fit?)
247
- - Rationalizations are generic ("I'll do it later")
248
- - Missing WHY explanations for rules
249
-
250
- ## Rationalization Prevention
251
-
252
- | Excuse | Reality |
253
- |--------|---------|
254
- | "This skill is simple, doesn't need structure" | Simple skills become complex. Structure prevents drift. |
255
- | "I'll add the rationalization section later" | Later never comes. Add it now. |
256
- | "Nobody will try to shortcut this" | Developers always shortcut. Block it proactively. |
257
- | "The description is good enough" | Vague descriptions mean skill never activates. |
258
- | "Advisory format is fine for critical rules" | Critical rules need Ironclad format or they get ignored. |
259
-
260
- ## Remember
261
-
262
- - **Core principle first** - captures the essential insight
263
- - **Announce at start** - makes skill usage visible
264
- - **Context placement** - skills fit in pipelines
265
- - **Red flags** - catch problems early
266
- - **Rationalizations** - block shortcuts proactively
267
- - **Sub-skill references** - connect to related workflows
268
- - One skill = one capability
269
- - Specific triggers in description
270
- - Test activation before shipping
202
+ 1. **Tier 1 (primary):** Anthropic -- the model provider's own documentation is authoritative for Claude behavior
203
+ 2. **Tier 2 (strong secondary):** OpenAI, Google DeepMind, Microsoft Research -- major lab guidance often transfers across models
204
+ 3. **Tier 3 (supplementary):** Community resources, courses, individual blogs -- valuable for patterns and intuition, not authoritative on model specifics
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Jon Lombardi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.