@dennisrongo/skills 0.1.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.
- package/LICENSE +21 -0
- package/README.md +230 -0
- package/bin/claude-skills.js +189 -0
- package/lib/install.js +111 -0
- package/lib/list.js +63 -0
- package/lib/paths.js +39 -0
- package/lib/remove.js +52 -0
- package/lib/skills.js +121 -0
- package/package.json +48 -0
- package/skills/_template/SKILL.md +34 -0
- package/skills/conventional-commits/SKILL.md +136 -0
- package/skills/diagnose/SKILL.md +140 -0
- package/skills/dotnet-onion-api/SKILL.md +267 -0
- package/skills/dotnet-onion-api/references/anti-patterns.md +155 -0
- package/skills/dotnet-onion-api/references/solution-layout.md +113 -0
- package/skills/dotnet-onion-api/references/templates/appsettings.md +75 -0
- package/skills/dotnet-onion-api/references/templates/base-controller.cs.md +90 -0
- package/skills/dotnet-onion-api/references/templates/csproj-files.md +178 -0
- package/skills/dotnet-onion-api/references/templates/dbcontext.cs.md +149 -0
- package/skills/dotnet-onion-api/references/templates/exception-middleware.cs.md +101 -0
- package/skills/dotnet-onion-api/references/templates/feature-slice.md +349 -0
- package/skills/dotnet-onion-api/references/templates/program-cs.md +171 -0
- package/skills/dotnet-onion-api/references/templates/worker-program.cs.md +166 -0
- package/skills/grill-with-docs/SKILL.md +203 -0
- package/skills/handoff/SKILL.md +155 -0
- package/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
- package/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/skills/improve-codebase-architecture/SKILL.md +121 -0
- package/skills/nextjs-app-router/SKILL.md +328 -0
- package/skills/nextjs-app-router/references/anti-patterns.md +203 -0
- package/skills/nextjs-app-router/references/folder-layout.md +151 -0
- package/skills/nextjs-app-router/references/good-patterns.md +212 -0
- package/skills/nextjs-app-router/references/templates/api-base.md +62 -0
- package/skills/nextjs-app-router/references/templates/api-slice.md +75 -0
- package/skills/nextjs-app-router/references/templates/auth-slice.md +95 -0
- package/skills/nextjs-app-router/references/templates/ci-and-hooks.md +94 -0
- package/skills/nextjs-app-router/references/templates/components-json.md +41 -0
- package/skills/nextjs-app-router/references/templates/env-and-utils.md +110 -0
- package/skills/nextjs-app-router/references/templates/eslint-prettier.md +82 -0
- package/skills/nextjs-app-router/references/templates/feature-slice.md +184 -0
- package/skills/nextjs-app-router/references/templates/form-with-zod.md +192 -0
- package/skills/nextjs-app-router/references/templates/middleware.md +88 -0
- package/skills/nextjs-app-router/references/templates/next-config.md +42 -0
- package/skills/nextjs-app-router/references/templates/package.md +99 -0
- package/skills/nextjs-app-router/references/templates/providers-and-store.md +79 -0
- package/skills/nextjs-app-router/references/templates/root-layout.md +146 -0
- package/skills/nextjs-app-router/references/templates/route-group-layouts.md +90 -0
- package/skills/nextjs-app-router/references/templates/tailwind-config.md +89 -0
- package/skills/nextjs-app-router/references/templates/testing.md +137 -0
- package/skills/nextjs-app-router/references/templates/tsconfig.md +40 -0
- package/skills/plan-and-build/SKILL.md +214 -0
- package/skills/pr-review/SKILL.md +132 -0
- package/skills/write-a-skill/SKILL.md +191 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-review
|
|
3
|
+
description: Conduct a thorough, structured code review of a local branch, grouped by task number (#NNN) referenced in commit messages. Use this skill whenever the user asks to review a PR, asks for feedback on a diff or branch, mentions "review my changes", or pastes code asking what could be improved. Auto-detects all tasks on the branch and produces one verdict per task. Covers correctness, design, tests, security, performance, and readability in that priority order.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pull Request Review
|
|
7
|
+
|
|
8
|
+
A structured approach to reviewing local branch work that catches real issues without nitpicking style. Reviews are scoped per task (e.g. `#123`) so each unit of work gets its own verdict.
|
|
9
|
+
|
|
10
|
+
## Assumptions
|
|
11
|
+
|
|
12
|
+
- Work happens on a feature branch off `develop` (git-flow style). If a repo uses a different base, substitute accordingly.
|
|
13
|
+
- The branch carries one or more `#NNN` task references in its commit messages — typically one task per branch, occasionally several when work is naturally bundled.
|
|
14
|
+
- The review runs against the currently checked-out branch.
|
|
15
|
+
|
|
16
|
+
## Priority order
|
|
17
|
+
|
|
18
|
+
Review in this order — earlier categories matter more, and finding issues there often makes later ones moot:
|
|
19
|
+
|
|
20
|
+
1. **Correctness** — does it do what it claims?
|
|
21
|
+
2. **Design** — is the approach sound? Will it cause problems later?
|
|
22
|
+
3. **Tests** — are behaviors covered? Are tests meaningful or just for coverage?
|
|
23
|
+
4. **Security** — any new attack surface? Input validation? Secrets?
|
|
24
|
+
5. **Performance** — obvious inefficiencies? Will it scale?
|
|
25
|
+
6. **Readability** — naming, structure, comments where non-obvious.
|
|
26
|
+
7. **Style** — only mention if the project lacks a formatter/linter.
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
1. **Refresh the base branch ref.** Run `git fetch origin develop` so the diff baseline is current. Do **not** `git pull` or check out `develop` — fetching updates `origin/develop` without touching the working tree or the local `develop` branch. If there's no `origin` remote, fall back to local `develop` and note it in the output.
|
|
31
|
+
2. **List commits on the branch.** Run `git log origin/develop..HEAD --format="%h %s"` (substitute the actual base branch if not `develop`). This is the universe of work to review.
|
|
32
|
+
3. **Group commits by task number.** Scan each subject and body for `#NNN` tokens (use `git log origin/develop..HEAD --format="%H%n%B%n---"` to see full messages). Bucket commits by task:
|
|
33
|
+
- A commit referencing `#123` belongs to task `#123`.
|
|
34
|
+
- A commit referencing multiple tasks belongs to each (review it once, note it in both verdicts).
|
|
35
|
+
- A commit with no `#NNN` goes into an `unscoped` bucket — still review it, but flag the missing task reference.
|
|
36
|
+
4. **For each task, read its intent first.** What is `#123` trying to accomplish? Infer from the commit subjects/bodies in that bucket. If intent is unclear, ask the user before reviewing — "is the code correct" is unanswerable without it.
|
|
37
|
+
5. **Get the per-task diff.** For each task, view its commits with `git show <sha>` per commit, or `git diff <first>^..<last>` if the commits are contiguous. Don't merge tasks into one combined diff — keep them scoped.
|
|
38
|
+
6. **Skim each task once, top to bottom.** Get a mental model of what changed before commenting on specifics.
|
|
39
|
+
7. **Re-read each task with the priority list in mind.** Note issues as you go.
|
|
40
|
+
8. **Look at the tests in each task.** Do they test the new behavior or just exercise the new lines?
|
|
41
|
+
9. **Check what's *not* in each task's diff.** Missing error handling, missing tests for edge cases, missing migration for a schema change.
|
|
42
|
+
|
|
43
|
+
## How to phrase feedback
|
|
44
|
+
|
|
45
|
+
Categorize each comment so the author knows what's required vs optional:
|
|
46
|
+
|
|
47
|
+
- **`blocking`** — must fix before merge (bug, security issue, broken contract)
|
|
48
|
+
- **`suggestion`** — would improve the code, author can take or leave
|
|
49
|
+
- **`question`** — author may know something you don't; ask before asserting
|
|
50
|
+
- **`nit`** — minor style/preference; should not block merge
|
|
51
|
+
- **`praise`** — something done well, worth calling out
|
|
52
|
+
|
|
53
|
+
Lead with the *why*, not just the *what*. "This will deadlock if two callers hit it simultaneously" is more useful than "use a lock here".
|
|
54
|
+
|
|
55
|
+
## What to look for
|
|
56
|
+
|
|
57
|
+
### Correctness
|
|
58
|
+
- Off-by-one errors in loops and slicing
|
|
59
|
+
- Null/undefined handling at boundaries
|
|
60
|
+
- Concurrent access without synchronization
|
|
61
|
+
- Error paths that swallow exceptions silently
|
|
62
|
+
- Default values that change behavior unexpectedly
|
|
63
|
+
|
|
64
|
+
### Design
|
|
65
|
+
- New abstractions that don't pay for themselves
|
|
66
|
+
- Tight coupling that will be painful to undo
|
|
67
|
+
- Duplication that should be unified (or unification that should be duplication)
|
|
68
|
+
- Public API changes that aren't backwards-compatible
|
|
69
|
+
- State that should live elsewhere
|
|
70
|
+
|
|
71
|
+
### Tests
|
|
72
|
+
- Tests that pass even when the code is broken (assertion-free, mocked too aggressively)
|
|
73
|
+
- Missing edge cases: empty inputs, max sizes, unicode, timezones
|
|
74
|
+
- Tests that are flaky by design (timing, ordering, network)
|
|
75
|
+
|
|
76
|
+
### Security
|
|
77
|
+
- User input flowing into shell, SQL, or HTML without escaping
|
|
78
|
+
- Secrets in code, logs, or error messages
|
|
79
|
+
- Authn/authz checks missing on new endpoints
|
|
80
|
+
- Crypto: hand-rolled, weak algorithms, hardcoded keys/IVs
|
|
81
|
+
|
|
82
|
+
### Performance
|
|
83
|
+
- N+1 queries in loops
|
|
84
|
+
- Unbounded memory growth (caches without eviction, accumulating arrays)
|
|
85
|
+
- Synchronous I/O in hot paths
|
|
86
|
+
- Repeated work that could be hoisted out of a loop
|
|
87
|
+
|
|
88
|
+
## Output format
|
|
89
|
+
|
|
90
|
+
Produce one section per task, with comments grouped by file and line inside each. Each task gets its own verdict — tasks are independent units of work and should be approvable or blockable on their own.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## #123 — <inferred or stated task intent>
|
|
94
|
+
|
|
95
|
+
Commits:
|
|
96
|
+
- <sha> <subject>
|
|
97
|
+
- <sha> <subject>
|
|
98
|
+
|
|
99
|
+
Verdict: Approve with suggestions / Request changes / Comment
|
|
100
|
+
|
|
101
|
+
Strengths:
|
|
102
|
+
- ...
|
|
103
|
+
|
|
104
|
+
Blockers:
|
|
105
|
+
- ...
|
|
106
|
+
|
|
107
|
+
Suggestions:
|
|
108
|
+
- ...
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## #124 — ...
|
|
113
|
+
|
|
114
|
+
(same structure)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## unscoped — commits without a #NNN reference
|
|
119
|
+
|
|
120
|
+
(same structure; also flag the missing task reference as a blocker or nit depending on project convention)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
End with a one-line roll-up: e.g. `Overall: 2 approve, 1 request changes, 1 unscoped`.
|
|
124
|
+
|
|
125
|
+
## Anti-patterns
|
|
126
|
+
|
|
127
|
+
- ❌ Reviewing without understanding the goal of the change
|
|
128
|
+
- ❌ Reflexively requesting tests without saying what they should cover
|
|
129
|
+
- ❌ Drive-by style nits that derail the substantive discussion
|
|
130
|
+
- ❌ "I would have done it differently" without a concrete reason
|
|
131
|
+
- ❌ Collapsing multiple tasks into one verdict — each `#NNN` is independent and should stand or fall on its own
|
|
132
|
+
- ❌ Silently ignoring commits with no task reference — surface them in the `unscoped` bucket
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write-a-skill
|
|
3
|
+
description: Create a new Claude Code skill — scaffolds a properly-structured `SKILL.md` (with YAML frontmatter, trigger-rich description, workflow, examples, anti-patterns), drops it in the right location (this library's `skills/`, the project's `.claude/skills/`, or the global `~/.claude/skills/`), and — when adding to the `dennisrongo/claude-skills` library — also updates the README table. Use this skill whenever the user says "create a skill", "write a skill", "new skill", "add a skill", "make a skill", "/write-a-skill", or pastes a SKILL.md URL and asks for something similar — even if they don't explicitly say "skill author".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Write a Skill
|
|
7
|
+
|
|
8
|
+
Author a new Claude Code skill that Claude will actually trigger when it should. The description field is the **only** thing Claude sees when deciding whether to load the skill, so most of the effort goes into making that field specific and trigger-rich — not into the body.
|
|
9
|
+
|
|
10
|
+
## When to use this skill
|
|
11
|
+
|
|
12
|
+
- The user says any of: "create a skill", "write a skill", "new skill", "add a skill", "make a skill", "scaffold a skill", "/write-a-skill".
|
|
13
|
+
- The user pastes a URL to an existing `SKILL.md` (e.g. a GitHub link to someone else's skill) and asks for "one like this" / "similar to this" / "based on this".
|
|
14
|
+
- The user describes a recurring workflow ("every time I do X, I want you to Y") that should be packaged as a skill rather than dropped into `CLAUDE.md`.
|
|
15
|
+
|
|
16
|
+
Do **not** auto-trigger when the user is just *discussing* skills, asking how skills work in general, or editing an existing skill's body. Wait for an explicit author-a-new-skill cue.
|
|
17
|
+
|
|
18
|
+
## Detect the target location first
|
|
19
|
+
|
|
20
|
+
Before scaffolding anything, figure out where the new skill belongs. The CWD usually tells you:
|
|
21
|
+
|
|
22
|
+
| Signal | Target |
|
|
23
|
+
|---|---|
|
|
24
|
+
| CWD is the `dennisrongo/claude-skills` repo (has `bin/claude-skills.js` + `skills/_template/`) | `skills/<name>/SKILL.md` in this library — and update README table |
|
|
25
|
+
| CWD is some other project, user says "project skill" / "for this repo" | `./.claude/skills/<name>/SKILL.md` |
|
|
26
|
+
| User says "global" / "every project" / "all my sessions" | `~/.claude/skills/<name>/SKILL.md` |
|
|
27
|
+
| Ambiguous | Ask once with `AskUserQuestion` — don't guess |
|
|
28
|
+
|
|
29
|
+
If you're in the library repo, prefer that destination — the user can install it elsewhere later with `claude-skills install <name>`.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
1. **Confirm the trigger.** Restate in one sentence what the skill is for and the phrases that should trigger it. Bail and ask if either is fuzzy.
|
|
34
|
+
2. **Gather requirements** with `AskUserQuestion` (one question at a time, max 3–4 total). Pull from this menu — skip ones already answered:
|
|
35
|
+
- **Trigger phrases** — what does the user actually say when they want this? Collect 3+ concrete phrases / commands.
|
|
36
|
+
- **Inputs** — does Claude need a file? A URL? Just a free-form description?
|
|
37
|
+
- **Outputs** — files written, commands run, a structured response, a PR?
|
|
38
|
+
- **Scripts / references** — does the skill need bundled executable helpers or long reference docs, or is plain `SKILL.md` enough?
|
|
39
|
+
- **Anti-patterns** — what should Claude explicitly *not* do? (Most-overlooked input — ask for it.)
|
|
40
|
+
3. **Pick the name.** kebab-case, 2–4 words, matches what the user says. Use the leading-verb form when the skill *does* something (`write-a-skill`, `diagnose`, `handoff`); use the noun form when it *defines* something (`conventional-commits`, `pr-review`).
|
|
41
|
+
4. **Check for collisions.** `ls` the target skills directory. If a skill with the same name exists, stop and ask the user whether to overwrite, rename, or extend the existing one.
|
|
42
|
+
5. **Scaffold from `_template/`** if it exists in the destination, otherwise from the template embedded below. Create the parent directory if missing.
|
|
43
|
+
6. **Draft the SKILL.md** using the section structure in [Required structure](#required-structure). Write the description LAST — it depends on the body.
|
|
44
|
+
7. **Write the description carefully** — see [Writing the description](#writing-the-description). This is the single highest-leverage part of the file.
|
|
45
|
+
8. **Self-review** against the [Review checklist](#review-checklist) before showing the user.
|
|
46
|
+
9. **If targeting the library repo, update `README.md`** — add a row to the skills table in alphabetical order with a one-paragraph "what it does" hook matching the existing voice. Verify the row by re-reading the file after the edit.
|
|
47
|
+
10. **Report back**: skill path, the description verbatim, and the install command the user can run on other machines (`npx --yes github:dennisrongo/claude-skills install <name>` for library skills).
|
|
48
|
+
|
|
49
|
+
## Required structure
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
---
|
|
53
|
+
name: <kebab-case-name>
|
|
54
|
+
description: <see "Writing the description">
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
# <Title Case Name>
|
|
58
|
+
|
|
59
|
+
<1–2 sentence elevator pitch — what this skill does and why it exists.>
|
|
60
|
+
|
|
61
|
+
## When to use this skill
|
|
62
|
+
|
|
63
|
+
- <Concrete trigger phrase or condition>
|
|
64
|
+
- <Concrete trigger phrase or condition>
|
|
65
|
+
- <Concrete trigger phrase or condition>
|
|
66
|
+
|
|
67
|
+
<Optional: "Do **not** auto-trigger when …" — explicit non-triggers if the skill has near-neighbors.>
|
|
68
|
+
|
|
69
|
+
## Workflow
|
|
70
|
+
|
|
71
|
+
1. <Imperative step>
|
|
72
|
+
2. <Imperative step>
|
|
73
|
+
3. <Imperative step>
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
### Example 1: <scenario name>
|
|
78
|
+
|
|
79
|
+
**User:** "<exact phrasing>"
|
|
80
|
+
|
|
81
|
+
**Claude:** <what the ideal behavior looks like — 1–3 bullets, not a full transcript>
|
|
82
|
+
|
|
83
|
+
## Anti-patterns
|
|
84
|
+
|
|
85
|
+
- ❌ <Thing Claude would plausibly do that's wrong>
|
|
86
|
+
- ❌ <Thing Claude would plausibly do that's wrong>
|
|
87
|
+
- ✅ <The right thing, contrasted>
|
|
88
|
+
|
|
89
|
+
## Notes
|
|
90
|
+
|
|
91
|
+
<Caveats, edge cases, things that only matter occasionally. Optional.>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Skip sections that would be empty. Reorder only if there's a real reason. Keep the file under ~150 lines — split into `references/` if a section grows past that.
|
|
95
|
+
|
|
96
|
+
## Writing the description
|
|
97
|
+
|
|
98
|
+
The description is the **only** field Claude reads when deciding whether to consult the skill. Optimize it for that decision:
|
|
99
|
+
|
|
100
|
+
- **First sentence** — what the skill produces or does, named concretely (not "helps with X").
|
|
101
|
+
- **Second sentence** — `Use this skill whenever the user says "<phrase 1>", "<phrase 2>", "<phrase 3>", … — even if they don't explicitly say "<skill name>".`
|
|
102
|
+
- **Third sentence (optional)** — explicit non-triggers if there's a near-neighbor skill it could be confused with.
|
|
103
|
+
- **Length** — max 1024 chars. Use the budget for trigger phrases, not adjectives.
|
|
104
|
+
- **Voice** — third person, present tense.
|
|
105
|
+
|
|
106
|
+
**Good:**
|
|
107
|
+
|
|
108
|
+
> Capture a session hand-off so work can resume cleanly in a new Claude session before context runs out. Writes a canonical dated Markdown file (objective, progress, decisions, files, open issues, and a ready-to-paste "Next Session Prompt") AND a lightweight project-memory pointer to it. Use this skill whenever the user says "/handoff", "hand off", "handoff", "save context", "preserve context", "running out of context", …
|
|
109
|
+
|
|
110
|
+
**Bad:**
|
|
111
|
+
|
|
112
|
+
> Helps the user create handoffs.
|
|
113
|
+
|
|
114
|
+
(The bad one tells Claude nothing about *when* — it'll under-trigger and the skill effectively doesn't exist.)
|
|
115
|
+
|
|
116
|
+
The most common failure mode is **under-triggering** (Claude doesn't load the skill when it should). Err on the side of *more* trigger phrases — three is the floor, not the ceiling.
|
|
117
|
+
|
|
118
|
+
## When to add scripts or reference files
|
|
119
|
+
|
|
120
|
+
Default to a single `SKILL.md`. Only escalate when:
|
|
121
|
+
|
|
122
|
+
- **Scripts** (`scripts/*.{js,sh,py}`) — the operation is deterministic and Claude would otherwise regenerate the same code each call (validators, formatters, scaffolders). Scripts save tokens and improve reliability.
|
|
123
|
+
- **References** (`references/*.md`) — long lookup tables, exhaustive option lists, or domain glossaries that Claude only needs occasionally. Link from `SKILL.md` rather than inlining.
|
|
124
|
+
|
|
125
|
+
If you do add either, mention them by relative path from the `SKILL.md` body so Claude knows they exist.
|
|
126
|
+
|
|
127
|
+
## Review checklist
|
|
128
|
+
|
|
129
|
+
Before showing the draft to the user:
|
|
130
|
+
|
|
131
|
+
- [ ] `name:` matches the directory name exactly
|
|
132
|
+
- [ ] `description:` starts with what the skill does, then "Use this skill whenever the user says …"
|
|
133
|
+
- [ ] Description includes ≥ 3 concrete trigger phrases / commands
|
|
134
|
+
- [ ] Description ends with "— even if they don't explicitly say …" escape hatch
|
|
135
|
+
- [ ] `## When to use this skill` lists the same triggers as bullets (so the body reinforces the description)
|
|
136
|
+
- [ ] Workflow steps are imperative and verifiable, not vibes ("Verify X exists", not "Be careful")
|
|
137
|
+
- [ ] At least one concrete example
|
|
138
|
+
- [ ] Anti-patterns section names plausible wrong behaviors, not strawmen
|
|
139
|
+
- [ ] No time-sensitive info (specific dates, "as of 2026", model version numbers) unless load-bearing
|
|
140
|
+
- [ ] File is under ~150 lines; longer content is split into `references/`
|
|
141
|
+
- [ ] If targeting the library repo, README table row is added in alphabetical order
|
|
142
|
+
|
|
143
|
+
## Examples
|
|
144
|
+
|
|
145
|
+
### Example 1: Library skill from scratch
|
|
146
|
+
|
|
147
|
+
**User:** "/write-a-skill — I want one that runs eslint --fix and stages the changes whenever I say 'lint this'"
|
|
148
|
+
|
|
149
|
+
**Claude:**
|
|
150
|
+
1. Confirms the trigger phrases ("lint this", "fix lint", "/lint-and-stage") via `AskUserQuestion`.
|
|
151
|
+
2. Names it `lint-and-stage`, scaffolds `skills/lint-and-stage/SKILL.md` from `_template/`.
|
|
152
|
+
3. Fills in the workflow (run `eslint --fix`, run `git add -u`, summarize changed files).
|
|
153
|
+
4. Writes a description with all three trigger phrases.
|
|
154
|
+
5. Adds a row to `README.md` skills table.
|
|
155
|
+
6. Reports the path and the install command.
|
|
156
|
+
|
|
157
|
+
### Example 2: "One like this" from a pasted URL
|
|
158
|
+
|
|
159
|
+
**User:** "Create a skill like https://github.com/mattpocock/skills/blob/main/skills/productivity/write-a-skill/SKILL.md but for our repo"
|
|
160
|
+
|
|
161
|
+
**Claude:**
|
|
162
|
+
1. Fetches the URL, reads the source skill.
|
|
163
|
+
2. Identifies what to keep (process, description requirements, checklist) and what to adapt (directory structure, README updates, this repo's voice).
|
|
164
|
+
3. Scaffolds the adapted version, gets user sign-off, writes the file.
|
|
165
|
+
|
|
166
|
+
### Example 3: Project-scoped skill
|
|
167
|
+
|
|
168
|
+
**User:** "Add a skill just for this repo that reminds me to run `pnpm changeset` before any feat/fix commit"
|
|
169
|
+
|
|
170
|
+
**Claude:**
|
|
171
|
+
1. Detects CWD is not the library repo → targets `./.claude/skills/changeset-reminder/SKILL.md`.
|
|
172
|
+
2. Creates `.claude/skills/` if missing.
|
|
173
|
+
3. Drafts a tiny skill keyed on `git commit` / "commit" triggers that checks for a changeset file and warns if missing.
|
|
174
|
+
4. Does **not** touch the library README.
|
|
175
|
+
|
|
176
|
+
## Anti-patterns
|
|
177
|
+
|
|
178
|
+
- ❌ Writing a vague description like "Helps with commits." — Claude won't trigger it. Always include explicit trigger phrases.
|
|
179
|
+
- ❌ Inventing trigger phrases the user didn't confirm — ask, don't guess.
|
|
180
|
+
- ❌ Padding `SKILL.md` with motivational prose. Every line should change Claude's behavior; if removing it changes nothing, cut it.
|
|
181
|
+
- ❌ Hard-coding model names, package versions, or dates that will rot. Resolve at runtime when possible.
|
|
182
|
+
- ❌ Putting executable behavior in `SKILL.md` prose when a 10-line script would be deterministic and cheaper.
|
|
183
|
+
- ❌ For library skills: drafting the SKILL.md but forgetting to update the README table — the skill is invisible to anyone browsing the repo.
|
|
184
|
+
- ❌ Overwriting an existing skill without confirmation when the names collide.
|
|
185
|
+
- ✅ Trigger-rich description, imperative workflow, one concrete example, explicit anti-patterns, under 150 lines.
|
|
186
|
+
|
|
187
|
+
## Notes
|
|
188
|
+
|
|
189
|
+
- The library repo's `_template/SKILL.md` is the canonical starting point when working inside `dennisrongo/claude-skills`. The `_` prefix excludes it from installation, so it's safe to leave as-is.
|
|
190
|
+
- When adapting a skill from an external source (e.g. another GitHub repo), credit the inspiration in a `## Notes` line — don't copy verbatim if the voice doesn't match this repo's existing skills.
|
|
191
|
+
- Skills installed to `~/.claude/skills/` are picked up by every Claude Code session globally; `.claude/skills/` in a project is scoped to that repo. The library repo's `skills/<name>/` is the *source* — not where Claude reads from at runtime.
|