cc-dev-template 0.1.50 → 0.1.52
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/bin/install.js +30 -6
- package/package.json +1 -1
- package/src/skills/claude-md/SKILL.md +8 -43
- package/src/skills/claude-md/references/audit.md +33 -85
- package/src/skills/claude-md/references/create.md +2 -2
- package/src/skills/claude-md/references/modify.md +52 -0
- package/src/skills/initialize-project/SKILL.md +17 -68
- package/src/skills/initialize-project/templates/CLAUDE.md.template +10 -0
- package/src/skills/initialize-project/templates/CURRENT_WORK.md.template +13 -0
- package/src/skills/initialize-project/templates/INDEX.md.template +7 -0
- package/src/skills/prompting/SKILL.md +9 -116
- package/src/skills/prompting/references/create.md +59 -0
- package/src/skills/prompting/references/principles.md +60 -0
- package/src/skills/prompting/references/review.md +78 -0
- package/src/skills/research/SKILL.md +14 -0
- package/src/skills/research/references/step-1-check-existing.md +25 -0
- package/src/skills/research/references/step-2-conduct-research.md +63 -0
- package/src/skills/spec-interview/SKILL.md +4 -26
- package/src/skills/spec-interview/references/step-1-opening.md +21 -0
- package/src/skills/spec-interview/references/step-2-deep-dive.md +77 -0
- package/src/skills/spec-interview/references/step-3-research-needs.md +44 -0
- package/src/skills/spec-interview/references/step-4-finalize.md +19 -0
- package/src/skills/spec-review/SKILL.md +12 -14
- package/src/skills/spec-to-tasks/SKILL.md +3 -85
- package/src/skills/spec-to-tasks/references/step-1-identify-spec.md +30 -0
- package/src/skills/spec-to-tasks/references/step-2-explore.md +25 -0
- package/src/skills/spec-to-tasks/references/step-3-generate.md +31 -0
- package/src/skills/spec-to-tasks/templates/tasks.yaml +25 -0
- package/src/mcp-servers/qa-server/README.md +0 -122
- package/src/mcp-servers/qa-server/package-lock.json +0 -2015
- package/src/mcp-servers/qa-server/package.json +0 -28
- package/src/mcp-servers/qa-server/src/index.ts +0 -220
- package/src/mcp-servers/qa-server/tsconfig.json +0 -17
- package/src/skills/spec-interview/references/interview-guide.md +0 -123
- package/src/skills/youtube-to-notes/SKILL.md +0 -11
- package/src/skills/youtube-to-notes/references/step-1-setup.md +0 -15
- package/src/skills/youtube-to-notes/references/step-2-download-transcribe.md +0 -13
- package/src/skills/youtube-to-notes/references/step-3-create-documents.md +0 -31
package/bin/install.js
CHANGED
|
@@ -255,6 +255,32 @@ if (fs.existsSync(mergeSettingsPath)) {
|
|
|
255
255
|
console.log('\nCleanup:');
|
|
256
256
|
let cleanupPerformed = false;
|
|
257
257
|
|
|
258
|
+
// Remove deprecated skills
|
|
259
|
+
const deprecatedSkills = ['youtube-to-notes'];
|
|
260
|
+
deprecatedSkills.forEach(skill => {
|
|
261
|
+
const skillPath = path.join(CLAUDE_DIR, 'skills', skill);
|
|
262
|
+
if (fs.existsSync(skillPath)) {
|
|
263
|
+
fs.rmSync(skillPath, { recursive: true });
|
|
264
|
+
console.log(`✓ Removed deprecated skill: ${skill}`);
|
|
265
|
+
cleanupPerformed = true;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// Remove deprecated MCP servers
|
|
270
|
+
const deprecatedMcpServers = ['qa-server'];
|
|
271
|
+
deprecatedMcpServers.forEach(server => {
|
|
272
|
+
const serverPath = path.join(CLAUDE_DIR, 'mcp-servers', server);
|
|
273
|
+
if (fs.existsSync(serverPath)) {
|
|
274
|
+
fs.rmSync(serverPath, { recursive: true });
|
|
275
|
+
// Unregister from Claude Code
|
|
276
|
+
try {
|
|
277
|
+
execSync(`claude mcp remove ${server} 2>/dev/null || true`, { stdio: 'pipe' });
|
|
278
|
+
} catch (e) {}
|
|
279
|
+
console.log(`✓ Removed deprecated MCP server: ${server}`);
|
|
280
|
+
cleanupPerformed = true;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
258
284
|
// Remove deprecated bash wrapper files
|
|
259
285
|
const deprecatedFiles = [
|
|
260
286
|
path.join(CLAUDE_DIR, 'hooks', 'bash-precheck.sh'),
|
|
@@ -341,13 +367,11 @@ These settings are available globally across all your projects.
|
|
|
341
367
|
Commands:
|
|
342
368
|
/prime - Start a session (orientation, scaffolding for new projects)
|
|
343
369
|
/done - End a session (sync docs, commit work)
|
|
344
|
-
|
|
345
|
-
MCP Server Notes:
|
|
346
|
-
- qa-server: Spawns a sub-agent for frontend visual inspection
|
|
347
|
-
Saves ~20k tokens by offloading browser tools to sub-agent
|
|
348
|
-
If you have chrome-devtools MCP installed, consider removing it:
|
|
349
|
-
claude mcp remove chrome-devtools
|
|
350
370
|
`);
|
|
351
371
|
}
|
|
352
372
|
|
|
373
|
+
console.log(`Note: This installer contains no API keys, credentials, or private data.
|
|
374
|
+
It's safe to share and anyone can run it.
|
|
375
|
+
`);
|
|
376
|
+
|
|
353
377
|
console.log('Restart Claude Code to pick up changes.');
|
package/package.json
CHANGED
|
@@ -1,55 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claude-md
|
|
3
|
-
description:
|
|
3
|
+
description: Manages CLAUDE.md files in a project. Activates when the user says "audit CLAUDE.md files", "update CLAUDE.md", "add to CLAUDE.md", or invokes /claude-md. With no arguments, audits all CLAUDE.md files. With arguments, intelligently updates the appropriate file.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CLAUDE.md Management
|
|
7
7
|
|
|
8
8
|
Base directory for this skill: ~/.claude/skills/claude-md
|
|
9
9
|
|
|
10
|
-
## When This Activates
|
|
11
|
-
|
|
12
|
-
- User asks to audit, create, update, or clean up CLAUDE.md files
|
|
13
|
-
- You are about to create or modify any CLAUDE.md file
|
|
14
|
-
|
|
15
|
-
**If you're about to touch a CLAUDE.md file, read this skill first.**
|
|
16
|
-
|
|
17
10
|
## What To Do
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| Task | Action |
|
|
22
|
-
|------|--------|
|
|
23
|
-
| **Creating** a new CLAUDE.md | Read `references/create.md` |
|
|
24
|
-
| **Modifying** an existing CLAUDE.md | Read `references/principles.md`, then edit |
|
|
25
|
-
| **Auditing** a project's CLAUDE.md files | Read `references/audit.md` |
|
|
26
|
-
|
|
27
|
-
## Core Principle
|
|
28
|
-
|
|
29
|
-
CLAUDE.md files are **orientation prompts**. They answer: "Where am I? What matters here? What should I know that I can't read from the code?"
|
|
30
|
-
|
|
31
|
-
The test: **Would Claude know where it is and what matters?**
|
|
32
|
-
|
|
33
|
-
## Quick Reference
|
|
34
|
-
|
|
35
|
-
**Belongs in CLAUDE.md:**
|
|
36
|
-
- Why this folder/repo exists
|
|
37
|
-
- Current focus (what matters NOW)
|
|
38
|
-
- Where to find things (progressive disclosure)
|
|
39
|
-
- Tribal knowledge, gotchas, non-obvious learnings
|
|
40
|
-
- Project conventions not obvious from code
|
|
41
|
-
|
|
42
|
-
**Does NOT belong:**
|
|
43
|
-
- Content duplicated from parent CLAUDE.md (hierarchy is automatic)
|
|
44
|
-
- Step-by-step workflows (put in docs or skills)
|
|
45
|
-
- Detailed examples (trust the model)
|
|
46
|
-
- Operational runbooks
|
|
47
|
-
- Anything over ~100 lines (suspect)
|
|
48
|
-
|
|
49
|
-
## Hierarchy Rule
|
|
50
|
-
|
|
51
|
-
Claude automatically reads CLAUDE.md files up through the directory tree. A child file inherits everything from its parents.
|
|
12
|
+
Check if arguments were provided:
|
|
52
13
|
|
|
53
|
-
|
|
14
|
+
| Condition | Action |
|
|
15
|
+
|-----------|--------|
|
|
16
|
+
| No arguments | Read `references/audit.md` |
|
|
17
|
+
| Arguments provided (add, update, modify request) | Read `references/modify.md` |
|
|
18
|
+
| Explicitly asked to create a new CLAUDE.md | Read `references/create.md` |
|
|
54
19
|
|
|
55
|
-
For
|
|
20
|
+
For principles reference: `references/principles.md`
|
|
@@ -1,93 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Audit CLAUDE.md Files
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Perform a full audit of all CLAUDE.md files in this project. Fix issues automatically.
|
|
4
4
|
|
|
5
|
-
1
|
|
6
|
-
2. **Map hierarchy** - Understand parent-child relationships
|
|
7
|
-
3. **Check each file** - Against principles
|
|
8
|
-
4. **Fix issues** - Automatically apply best practices
|
|
5
|
+
## Step 1: Discover and Map
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
Find all CLAUDE.md files: `Glob("**/CLAUDE.md")`
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
Read every file found. Build a mental map of the hierarchy — which files are parents, which are children. Content flows down: children inherit from parents.
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
find . -name "CLAUDE.md" -type f | head -20
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Or use Glob:
|
|
19
|
-
```
|
|
20
|
-
**/CLAUDE.md
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Step 2: Map Hierarchy
|
|
24
|
-
|
|
25
|
-
For each file, identify:
|
|
26
|
-
- Its parent CLAUDE.md files (walking up the tree)
|
|
27
|
-
- Its child CLAUDE.md files (in subdirectories)
|
|
28
|
-
|
|
29
|
-
This matters because content flows down. Children inherit from parents.
|
|
11
|
+
## Step 2: Check Each File
|
|
30
12
|
|
|
31
|
-
|
|
13
|
+
Evaluate each file against these criteria:
|
|
32
14
|
|
|
33
|
-
|
|
15
|
+
**Length**
|
|
16
|
+
- Over 100 lines → bloated, needs pruning
|
|
17
|
+
- Over 150 lines → severely bloated
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
**Content that doesn't belong**
|
|
20
|
+
- Step-by-step workflows → move to docs/ or skills/
|
|
21
|
+
- Detailed examples → remove, trust the model
|
|
22
|
+
- Credentials/passwords → move to dedicated docs
|
|
23
|
+
- Content duplicated from parent → remove entirely
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| Step-by-step workflows | Doesn't belong | Move to docs/ or skills/, leave pointer |
|
|
45
|
-
| Detailed examples | Over-explaining | Remove, trust the model |
|
|
46
|
-
| Credentials/passwords | Security + bloat | Move to dedicated docs |
|
|
47
|
-
| Duplicate of parent | Redundant | Remove entirely |
|
|
25
|
+
**Structure**
|
|
26
|
+
- Missing purpose statement at top → add one-line description
|
|
27
|
+
- Walls of text → break into sections, use bullets
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
| Missing "Current Focus" | For active projects | Add if this is active work |
|
|
54
|
-
| Walls of text | Hard to scan | Break into sections, use bullets |
|
|
29
|
+
**Hierarchy violations**
|
|
30
|
+
- Child repeats parent content → remove from child
|
|
31
|
+
- Child has general project info → move to root CLAUDE.md
|
|
32
|
+
- Deep file (3+ levels) with no unique content → consider removing
|
|
55
33
|
|
|
56
|
-
|
|
57
|
-
| Check | Issue | Fix |
|
|
58
|
-
|-------|-------|-----|
|
|
59
|
-
| Child repeats parent content | Duplication | Remove from child |
|
|
60
|
-
| Child has general project info | Wrong level | Move to root CLAUDE.md |
|
|
61
|
-
| Deep file (3+ levels) exists | Probably unnecessary | Consider removing |
|
|
34
|
+
## Step 3: Fix Issues
|
|
62
35
|
|
|
63
|
-
|
|
36
|
+
For each issue:
|
|
37
|
+
1. Read the file
|
|
38
|
+
2. Apply the fix using Edit
|
|
39
|
+
3. Move extracted content to appropriate location if needed
|
|
64
40
|
|
|
65
|
-
|
|
41
|
+
**Extracting workflows:** Create `docs/workflows/[topic].md`, replace inline content with pointer.
|
|
66
42
|
|
|
67
|
-
|
|
68
|
-
2. **Apply the fix** using Edit tool
|
|
69
|
-
3. **Move extracted content** to appropriate location (docs/, etc.)
|
|
70
|
-
4. **Verify** the result
|
|
43
|
+
**Removing duplication:** Verify parent has content, delete from child.
|
|
71
44
|
|
|
72
|
-
|
|
45
|
+
**Pruning over-explanation:** Reduce to 1-2 lines that trust the model.
|
|
73
46
|
|
|
74
|
-
|
|
75
|
-
1. Create `docs/workflows/[topic].md` with the detailed content
|
|
76
|
-
2. Replace in CLAUDE.md with: "See `docs/workflows/[topic].md` for [description]"
|
|
47
|
+
## Step 4: Report
|
|
77
48
|
|
|
78
|
-
|
|
79
|
-
1. Check parent file has the content
|
|
80
|
-
2. Delete the duplicated section from child
|
|
81
|
-
3. Optionally add: "Inherits [topic] from parent CLAUDE.md"
|
|
82
|
-
|
|
83
|
-
**Pruning over-explanation:**
|
|
84
|
-
1. Identify the core point
|
|
85
|
-
2. Reduce to 1-2 lines that trust the model
|
|
86
|
-
3. Remove examples, edge cases, detailed instructions
|
|
87
|
-
|
|
88
|
-
## Audit Report
|
|
89
|
-
|
|
90
|
-
After checking all files, summarize:
|
|
49
|
+
After all fixes, summarize:
|
|
91
50
|
|
|
92
51
|
```
|
|
93
52
|
CLAUDE.md Audit Summary
|
|
@@ -98,18 +57,7 @@ Issues fixed: Z
|
|
|
98
57
|
|
|
99
58
|
Changes made:
|
|
100
59
|
- [file]: [what was fixed]
|
|
101
|
-
- [file]: [what was fixed]
|
|
102
60
|
|
|
103
61
|
Remaining concerns:
|
|
104
|
-
- [any issues
|
|
62
|
+
- [any issues needing human decision]
|
|
105
63
|
```
|
|
106
|
-
|
|
107
|
-
## Red Flags
|
|
108
|
-
|
|
109
|
-
These indicate a CLAUDE.md that needs significant rework:
|
|
110
|
-
|
|
111
|
-
- **200+ lines** - Needs major pruning
|
|
112
|
-
- **Code blocks with >10 lines** - Workflows belong in docs
|
|
113
|
-
- **Tables with >5 rows** - Probably too detailed
|
|
114
|
-
- **Multiple "how to" sections** - Wrong content type
|
|
115
|
-
- **Same content in parent and child** - Hierarchy violation
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
2. **Read them** - Understand what's already covered
|
|
7
7
|
3. **Identify the gap** - What does this folder need that parents don't provide?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Skip creating a new CLAUDE.md if parent files already cover everything needed.
|
|
10
10
|
|
|
11
11
|
## Structure Template
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Starting template. Include only sections that add value.
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
16
|
# [Folder/Project Name]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Modify CLAUDE.md
|
|
2
|
+
|
|
3
|
+
The user provided a request to add, update, or modify something in the project's CLAUDE.md files. Determine the appropriate file and make the change.
|
|
4
|
+
|
|
5
|
+
## Step 1: Understand the Request
|
|
6
|
+
|
|
7
|
+
Parse what the user wants:
|
|
8
|
+
- What content to add or change?
|
|
9
|
+
- Is it project-wide or specific to a folder/component?
|
|
10
|
+
- Is it a gotcha, convention, current focus, or structural info?
|
|
11
|
+
|
|
12
|
+
## Step 2: Discover Existing Files
|
|
13
|
+
|
|
14
|
+
Find all CLAUDE.md files: `Glob("**/CLAUDE.md")`
|
|
15
|
+
|
|
16
|
+
Read each file to understand:
|
|
17
|
+
- What scope each file covers
|
|
18
|
+
- The hierarchy (root → subdirectories)
|
|
19
|
+
- What content already exists
|
|
20
|
+
|
|
21
|
+
## Step 3: Determine the Right File
|
|
22
|
+
|
|
23
|
+
Match the request to the appropriate level:
|
|
24
|
+
|
|
25
|
+
| Request Type | Appropriate File |
|
|
26
|
+
|--------------|------------------|
|
|
27
|
+
| Project-wide convention | Root CLAUDE.md |
|
|
28
|
+
| Folder-specific rule | That folder's CLAUDE.md (create if needed) |
|
|
29
|
+
| Component gotcha | Nearest parent CLAUDE.md covering that area |
|
|
30
|
+
| Current focus/priority | Root CLAUDE.md (or active work area) |
|
|
31
|
+
|
|
32
|
+
**Hierarchy principle:** Place content at the highest level where it applies. Child files only contain what's specific to that folder.
|
|
33
|
+
|
|
34
|
+
If unsure which file is appropriate, ask the user.
|
|
35
|
+
|
|
36
|
+
## Step 4: Make the Change
|
|
37
|
+
|
|
38
|
+
Read the target file, then edit:
|
|
39
|
+
|
|
40
|
+
- Add gotchas to a "Gotchas" section (create if missing)
|
|
41
|
+
- Add conventions to relevant existing sections
|
|
42
|
+
- Add current focus to "Current Focus" section
|
|
43
|
+
- Keep additions concise — 1-2 lines, trust the model
|
|
44
|
+
|
|
45
|
+
If the content would make the file exceed ~100 lines, consider:
|
|
46
|
+
- Is this the right level? Maybe it belongs deeper.
|
|
47
|
+
- Can existing content be pruned?
|
|
48
|
+
- Should a workflow be extracted to docs/?
|
|
49
|
+
|
|
50
|
+
## Step 5: Confirm
|
|
51
|
+
|
|
52
|
+
Tell the user what was added and where. If creating a new CLAUDE.md file, explain why that location was chosen.
|
|
@@ -1,84 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: initialize-project
|
|
3
|
-
description: Scaffold docs structure for Claude Code sessions. Use when starting a new project
|
|
3
|
+
description: Scaffold docs structure for Claude Code sessions. Use when starting a new project, when "docs/CURRENT_WORK.md is missing", or when user says "initialize this project" or "set up session tracking".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Initialize Project
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Ask the user:
|
|
9
|
+
- "What is this project? (1-2 sentences)"
|
|
10
|
+
- "Primary language/framework?" (optional)
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Create the Docs Structure
|
|
11
13
|
|
|
12
|
-
Create
|
|
14
|
+
Create `docs/INDEX.md` using `templates/INDEX.md.template`. Replace `{{PROJECT_NAME}}` with the project name.
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
Create `docs/CURRENT_WORK.md` using `templates/CURRENT_WORK.md.template`.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Handle CLAUDE.md
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
- "What is this project? (1-2 sentences)"
|
|
20
|
-
- "Primary language/framework?" (optional, for CLAUDE.md context)
|
|
20
|
+
Check if CLAUDE.md exists and has content.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**If missing or empty:** Create using `templates/CLAUDE.md.template`. Replace placeholders with user's answers.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
```markdown
|
|
26
|
-
# [Project Name] Documentation
|
|
24
|
+
**If exists with content:** Leave unchanged.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- [Current Work](CURRENT_WORK.md) - Active tasks and project status
|
|
26
|
+
## Confirm Completion
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
Report what was created:
|
|
29
|
+
- `docs/INDEX.md` - documentation hub
|
|
30
|
+
- `docs/CURRENT_WORK.md` - status tracking
|
|
31
|
+
- `CLAUDE.md` - created or unchanged
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
# Current Work
|
|
38
|
-
|
|
39
|
-
## In Progress
|
|
40
|
-
- (none)
|
|
41
|
-
|
|
42
|
-
## Up Next
|
|
43
|
-
- (add your first task)
|
|
44
|
-
|
|
45
|
-
## Blocked / Waiting
|
|
46
|
-
- (none)
|
|
47
|
-
|
|
48
|
-
## Open Questions
|
|
49
|
-
- (none)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
4. **Handle CLAUDE.md:**
|
|
53
|
-
|
|
54
|
-
Check if CLAUDE.md exists and has content.
|
|
55
|
-
|
|
56
|
-
**If missing or empty**, create a minimal starter:
|
|
57
|
-
```markdown
|
|
58
|
-
# [Project Name]
|
|
59
|
-
|
|
60
|
-
[User's project description from step 2]
|
|
61
|
-
|
|
62
|
-
## Tech Stack
|
|
63
|
-
[Language/framework from step 2, if provided]
|
|
64
|
-
|
|
65
|
-
## Structure
|
|
66
|
-
- `docs/` - Documentation and status tracking
|
|
67
|
-
- `docs/CURRENT_WORK.md` - What's in progress and up next
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**If CLAUDE.md exists with content**, leave it alone - the user has already configured it.
|
|
71
|
-
|
|
72
|
-
5. **Confirm completion:**
|
|
73
|
-
"Project initialized with:
|
|
74
|
-
- `docs/INDEX.md` - documentation hub
|
|
75
|
-
- `docs/CURRENT_WORK.md` - status tracking
|
|
76
|
-
- `CLAUDE.md` - [created/unchanged]
|
|
77
|
-
|
|
78
|
-
Run `/prime` to start your session."
|
|
79
|
-
|
|
80
|
-
## Success Criteria
|
|
81
|
-
|
|
82
|
-
- `docs/` directory exists with INDEX.md and CURRENT_WORK.md
|
|
83
|
-
- CLAUDE.md exists (created if missing, preserved if present)
|
|
84
|
-
- User understands the `/prime` → work → `/done` workflow
|
|
33
|
+
End with: "Run `/prime` to start a session."
|
|
@@ -1,123 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prompting
|
|
3
|
-
description:
|
|
3
|
+
description: Invoked when user says "review my prompt", "help me write a prompt", "improve this prompt", or "create a prompt for...". Guides prompt creation and improvement using Claude 4.x best practices.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Prompting
|
|
6
|
+
# Prompting
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Determine Intent
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
| User Intent | Action |
|
|
11
|
+
|-------------|--------|
|
|
12
|
+
| Has an existing prompt to review or improve | Read `references/review.md` |
|
|
13
|
+
| Needs to create a new prompt from scratch | Read `references/create.md` |
|
|
14
|
+
| Unclear | Ask: "Do you have an existing prompt to improve, or are you creating one from scratch?" |
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### 1. Explain WHY, Not Just WHAT (Most Important)
|
|
15
|
-
|
|
16
|
-
Provide purpose and context rather than exhaustive implementation details. Trust Claude's intelligence.
|
|
17
|
-
|
|
18
|
-
**Mental Model**: Treat Claude like a brilliant senior colleague, not a junior who needs hand-holding.
|
|
19
|
-
|
|
20
|
-
**Provide**:
|
|
21
|
-
- The goal or purpose of the task
|
|
22
|
-
- Why this matters (business context, use case)
|
|
23
|
-
- Constraints that exist (technical, business, regulatory)
|
|
24
|
-
- What success looks like
|
|
25
|
-
|
|
26
|
-
**Avoid providing**:
|
|
27
|
-
- Every possible edge case
|
|
28
|
-
- Step-by-step implementation unless genuinely needed
|
|
29
|
-
- Obvious best practices for the domain
|
|
30
|
-
|
|
31
|
-
### 2. Use Positive Framing
|
|
32
|
-
|
|
33
|
-
Tell Claude what TO do, not what NOT to do. Negatives require extra processing and can prime unwanted behavior.
|
|
34
|
-
|
|
35
|
-
| Negative Framing | Positive Framing |
|
|
36
|
-
|------------------|------------------|
|
|
37
|
-
| "Don't hallucinate facts" | "Only use information from the provided documents" |
|
|
38
|
-
| "Don't be too formal" | "Write in a conversational, friendly tone" |
|
|
39
|
-
| "Avoid long paragraphs" | "Keep paragraphs to 3-4 sentences" |
|
|
40
|
-
| "Don't skip error handling" | "Include comprehensive error handling" |
|
|
41
|
-
| "Don't make it complicated" | "Keep the solution simple and maintainable" |
|
|
42
|
-
| "Avoid making assumptions" | "Base responses on the provided data" |
|
|
43
|
-
|
|
44
|
-
### 3. Be Clear and Direct
|
|
45
|
-
|
|
46
|
-
Claude 4.x models are more literal than previous versions. State exactly what you want without hedging.
|
|
47
|
-
|
|
48
|
-
| Vague | Clear |
|
|
49
|
-
|-------|-------|
|
|
50
|
-
| "Can you maybe help me think about..." | "Redesign the authentication flow to support SSO" |
|
|
51
|
-
| "It might be nice to have..." | "Add rate limiting to the login endpoint" |
|
|
52
|
-
| "Create a dashboard" | "Create a fully-featured dashboard with charts, filters, export, and user preferences" |
|
|
53
|
-
|
|
54
|
-
### 4. Provide Context
|
|
55
|
-
|
|
56
|
-
Answer these questions:
|
|
57
|
-
1. **Why does this matter?** (Purpose, goal, business context)
|
|
58
|
-
2. **Who is this for?** (Audience, user type, skill level)
|
|
59
|
-
3. **What does success look like?** (Outcomes, metrics, acceptance criteria)
|
|
60
|
-
4. **What constraints exist?** (Technical limits, requirements, policies)
|
|
61
|
-
|
|
62
|
-
## The Complete Framework Checklist
|
|
63
|
-
|
|
64
|
-
Every good prompt should answer:
|
|
65
|
-
|
|
66
|
-
- [ ] **WHAT** are you asking Claude to do?
|
|
67
|
-
- [ ] **WHY** does this matter? (Purpose, goal)
|
|
68
|
-
- [ ] **WHO** is this for? (Audience, user type)
|
|
69
|
-
- [ ] **SUCCESS** looks like what?
|
|
70
|
-
- [ ] Frame everything **POSITIVELY** (what TO do, not what NOT to do)
|
|
71
|
-
|
|
72
|
-
Then trust Claude to:
|
|
73
|
-
- Handle edge cases intelligently
|
|
74
|
-
- Apply best practices for the domain
|
|
75
|
-
- Make reasonable implementation choices
|
|
76
|
-
- Ask clarifying questions if truly ambiguous
|
|
77
|
-
|
|
78
|
-
## Quick Diagnostics
|
|
79
|
-
|
|
80
|
-
When Claude's response is problematic:
|
|
81
|
-
|
|
82
|
-
| Problem | Likely Cause | Fix |
|
|
83
|
-
|---------|--------------|-----|
|
|
84
|
-
| Too minimal/basic | Not explicit about expectations | Add "Create a fully-featured..." or "Go beyond basics..." |
|
|
85
|
-
| Off-topic | Missing context about purpose | Explain WHY you need this and what it's for |
|
|
86
|
-
| Inconsistent | Vague or ambiguous instructions | Be more direct and specific about requirements |
|
|
87
|
-
| Overly cautious | Negative framing ("don't do X") | Reframe positively ("do Y instead") |
|
|
88
|
-
| Missing key details | Didn't explain what success looks like | Define concrete success criteria |
|
|
89
|
-
|
|
90
|
-
## Common Antipatterns
|
|
91
|
-
|
|
92
|
-
### The Micromanager
|
|
93
|
-
Providing step-by-step implementation instead of goals.
|
|
94
|
-
|
|
95
|
-
**Fix**: Explain the goal, let Claude handle implementation.
|
|
96
|
-
|
|
97
|
-
### The Negative Nancy
|
|
98
|
-
String of "don't do X" instructions.
|
|
99
|
-
|
|
100
|
-
**Fix**: Reframe every negative as a positive instruction.
|
|
101
|
-
|
|
102
|
-
### The Context-Free Zone
|
|
103
|
-
Bare instruction with no purpose or audience.
|
|
104
|
-
|
|
105
|
-
**Fix**: Explain who will use it, why it exists, what success looks like.
|
|
106
|
-
|
|
107
|
-
### The Vague Suggestion
|
|
108
|
-
Hedged language like "maybe we could possibly..."
|
|
109
|
-
|
|
110
|
-
**Fix**: Be direct and explicit about what you want.
|
|
111
|
-
|
|
112
|
-
## Structural Elements
|
|
113
|
-
|
|
114
|
-
For multi-step tasks where order matters, use numbered lists.
|
|
115
|
-
|
|
116
|
-
For complex prompts with distinct sections, consider XML-style tags:
|
|
117
|
-
- `<instructions>`, `<context>`, `<data>`
|
|
118
|
-
- `<examples>`, `<input>`, `<output>`
|
|
119
|
-
- `<requirements>`, `<constraints>`
|
|
120
|
-
|
|
121
|
-
## ADR Compliance
|
|
122
|
-
|
|
123
|
-
This skill implements the practices mandated by ADR-002 (Structured Prompting Practices for Agents and Commands). All agents and commands in this framework must follow these principles.
|
|
16
|
+
Route to the appropriate path before proceeding.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Create a New Prompt
|
|
2
|
+
|
|
3
|
+
## Step 1: Gather Requirements
|
|
4
|
+
|
|
5
|
+
Ask the user these questions (skip any already answered):
|
|
6
|
+
|
|
7
|
+
1. **What should Claude do?** (The core task)
|
|
8
|
+
2. **Why does this matter?** (Purpose, business context)
|
|
9
|
+
3. **Who will use the output?** (Audience)
|
|
10
|
+
4. **What does success look like?** (Concrete outcomes)
|
|
11
|
+
5. **What constraints exist?** (Technical limits, policies, format requirements)
|
|
12
|
+
|
|
13
|
+
## Step 2: Draft the Prompt
|
|
14
|
+
|
|
15
|
+
Structure the prompt with these elements:
|
|
16
|
+
|
|
17
|
+
### Opening: Task and Purpose
|
|
18
|
+
State the task directly in imperative form. Include why it matters.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
[Task in imperative form]. This [purpose/context].
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Context Section (if needed)
|
|
25
|
+
For complex tasks, add structured context:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
<context>
|
|
29
|
+
- Audience: [who]
|
|
30
|
+
- Constraints: [limits]
|
|
31
|
+
- Success criteria: [outcomes]
|
|
32
|
+
</context>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Requirements (if specific)
|
|
36
|
+
List concrete requirements as bullet points. Keep to essentials only.
|
|
37
|
+
|
|
38
|
+
### Output Format (if specific)
|
|
39
|
+
Specify format only when it genuinely matters. Otherwise trust Claude's judgment.
|
|
40
|
+
|
|
41
|
+
## Step 3: Self-Review
|
|
42
|
+
|
|
43
|
+
Before presenting, verify:
|
|
44
|
+
|
|
45
|
+
- [ ] All instructions use positive framing (what TO do)
|
|
46
|
+
- [ ] Language is direct, no hedging
|
|
47
|
+
- [ ] Purpose and context are clear
|
|
48
|
+
- [ ] No over-specification of obvious practices
|
|
49
|
+
- [ ] Success criteria are concrete
|
|
50
|
+
|
|
51
|
+
Read `references/principles.md` if any check fails and apply the relevant fix.
|
|
52
|
+
|
|
53
|
+
## Step 4: Present and Iterate
|
|
54
|
+
|
|
55
|
+
Present the draft prompt to the user.
|
|
56
|
+
|
|
57
|
+
Ask: "Does this capture what you need? Any adjustments?"
|
|
58
|
+
|
|
59
|
+
Incorporate feedback until the user is satisfied.
|