Skip to content

Commit 48c487c

Browse files
authored
refactor: move example/ into skills/<name>/examples/ for self-contained installs (#19)
Each skill now ships its sample input files and reference analysis outputs inside its own directory, so installs via `cp -r skills/* ~/.claude/skills/` include the examples without requiring the full repo clone. All references in CLAUDE.md, README.md, HOW_TO_USE.md, SKILL.md files, evals/evals.json, analysis .md files, and scripts/verify-docs.sh updated to reflect the new paths.
1 parent c32faaf commit 48c487c

62 files changed

Lines changed: 84 additions & 83 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ Provides sixteen slash-command skills — fifteen specialised review skills plus
8181

8282
| Path | What it demonstrates |
8383
|------|---------------------|
84-
| [example/sqlplan-review/horrible.sqlplan](example/sqlplan-review/horrible.sqlplan) | Reference bad plan: parameter sniffing, spills, implicit conversion, key lookups |
85-
| [example/sqlplan-review/horrible-analysis.md](example/sqlplan-review/horrible-analysis.md) | Reference output of `/sqlplan-review` on the above plan |
86-
| [example/tsql-review/](example/tsql-review/) | `slow_proc.sql` with 12 anti-patterns + expected analysis |
87-
| [example/sqlstats-review/](example/sqlstats-review/) | SSMS STATISTICS IO/TIME output + expected analysis |
88-
| [example/sqlplan-compare/](example/sqlplan-compare/) | Baseline + regression `.sqlplan` pair + diff analysis |
89-
| [example/sqlplan-deadlock/](example/sqlplan-deadlock/) | P1 lock-order deadlock XML + analysis |
90-
| [example/sqltrace-review/](example/sqltrace-review/) | `fn_trace_gettable` output with N+1, sniffing, spills + analysis |
91-
| [example/sqlwait-review/](example/sqlwait-review/) | `sys.dm_os_wait_stats` output with I/O, lock, memory, CXPACKET + analysis |
92-
| [example/sqlplan-index-advisor/](example/sqlplan-index-advisor/) | Index advisor output for `horrible.sqlplan` |
93-
| [example/sqlplan-batch/](example/sqlplan-batch/) | Aggregate dashboard for a 3-plan batch |
94-
| [example/query-store-review/](example/query-store-review/) | Query Store DMV output with plan instability, forced plan failure, N+1 + analysis |
95-
| [example/procstats-review/](example/procstats-review/) | Q1 report output with CPU hotspot, parameter sniffing, N+1 caller, blocking signal + analysis |
96-
| [example/clusterlog-review/](example/clusterlog-review/) | CLUSTER.LOG with lease timeout, heartbeat loss, AG offline transition, VerboseLogging=0 + analysis |
97-
| [example/hadr-health-review/](example/hadr-health-review/) | 3-replica AG with disconnected secondary, 620 MB redo queue, secondary lag 85 sec + analysis |
98-
| [example/errorlog-review/](example/errorlog-review/) | ERRORLOG with I/O slow → AG lease expiry → failover sequence, login failure burst, trace flags + analysis |
99-
| [example/spn-review/](example/spn-review/) | setspn + AD attribute output: duplicate SPN, unconstrained delegation, missing delegation target SPN, end-user in Protected Users + analysis |
84+
| [skills/sqlplan-review/examples/horrible.sqlplan](skills/sqlplan-review/examples/horrible.sqlplan) | Reference bad plan: parameter sniffing, spills, implicit conversion, key lookups |
85+
| [skills/sqlplan-review/examples/horrible-analysis.md](skills/sqlplan-review/examples/horrible-analysis.md) | Reference output of `/sqlplan-review` on the above plan |
86+
| [skills/tsql-review/examples/](skills/tsql-review/examples/) | `slow_proc.sql` with 12 anti-patterns + expected analysis |
87+
| [skills/sqlstats-review/examples/](skills/sqlstats-review/examples/) | SSMS STATISTICS IO/TIME output + expected analysis |
88+
| [skills/sqlplan-compare/examples/](skills/sqlplan-compare/examples/) | Baseline + regression `.sqlplan` pair + diff analysis |
89+
| [skills/sqlplan-deadlock/examples/](skills/sqlplan-deadlock/examples/) | P1 lock-order deadlock XML + analysis |
90+
| [skills/sqltrace-review/examples/](skills/sqltrace-review/examples/) | `fn_trace_gettable` output with N+1, sniffing, spills + analysis |
91+
| [skills/sqlwait-review/examples/](skills/sqlwait-review/examples/) | `sys.dm_os_wait_stats` output with I/O, lock, memory, CXPACKET + analysis |
92+
| [skills/sqlplan-index-advisor/examples/](skills/sqlplan-index-advisor/examples/) | Index advisor output for `horrible.sqlplan` |
93+
| [skills/sqlplan-batch/examples/](skills/sqlplan-batch/examples/) | Aggregate dashboard for a 3-plan batch |
94+
| [skills/query-store-review/examples/](skills/query-store-review/examples/) | Query Store DMV output with plan instability, forced plan failure, N+1 + analysis |
95+
| [skills/procstats-review/examples/](skills/procstats-review/examples/) | Q1 report output with CPU hotspot, parameter sniffing, N+1 caller, blocking signal + analysis |
96+
| [skills/clusterlog-review/examples/](skills/clusterlog-review/examples/) | CLUSTER.LOG with lease timeout, heartbeat loss, AG offline transition, VerboseLogging=0 + analysis |
97+
| [skills/hadr-health-review/examples/](skills/hadr-health-review/examples/) | 3-replica AG with disconnected secondary, 620 MB redo queue, secondary lag 85 sec + analysis |
98+
| [skills/errorlog-review/examples/](skills/errorlog-review/examples/) | ERRORLOG with I/O slow → AG lease expiry → failover sequence, login failure burst, trace flags + analysis |
99+
| [skills/spn-review/examples/](skills/spn-review/examples/) | setspn + AD attribute output: duplicate SPN, unconstrained delegation, missing delegation target SPN, end-user in Protected Users + analysis |
100100

101101
## Installing Skills
102102

@@ -138,7 +138,7 @@ These steps apply to any skill. Replace `<skill>` with the skill directory name
138138
5. Add a full `## <skill-name>` section to [README.md](README.md) with triggers, usage, and output sample
139139
6. Add the skill to [PERFORMANCE_TUNING_GUIDE.md](PERFORMANCE_TUNING_GUIDE.md) Skills at a Glance, Skill Scope Comparison, and relevant scenario sections
140140
7. Add the skill file size row to [LLM_COST_ESTIMATION.md](LLM_COST_ESTIMATION.md)
141-
8. Add example input + analysis files to `example/<skill-name>/`
141+
8. Add example input + analysis files to `skills/<skill-name>/examples/`
142142
9. Add `tsql-review` as companion in `sqlplan-review/SKILL.md` (or the relevant existing companion)
143143

144144
## Git Hooks

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ A collection of Claude Code skills covering the full SQL Server performance tuni
4444
**5 minutes to your first analysis:**
4545

4646
1. Install the skills (see [Installation](#installation) below)
47-
2. In SSMS, open [example/sqlplan-review/horrible.sqlplan](example/sqlplan-review/horrible.sqlplan)
47+
2. In SSMS, open [skills/sqlplan-review/examples/horrible.sqlplan](skills/sqlplan-review/examples/horrible.sqlplan)
4848
3. In Claude Code, type:
4949
```
50-
/sqlplan-review example/sqlplan-review/horrible.sqlplan
50+
/sqlplan-review skills/sqlplan-review/examples/horrible.sqlplan
5151
```
52-
4. Compare the output to [example/sqlplan-review/horrible-analysis.md](example/sqlplan-review/horrible-analysis.md) — that's the reference gold-standard output showing the expected Critical / Warning / Info findings and Passed Checks table.
52+
4. Compare the output to [skills/sqlplan-review/examples/horrible-analysis.md](skills/sqlplan-review/examples/horrible-analysis.md) — that's the reference gold-standard output showing the expected Critical / Warning / Info findings and Passed Checks table.
5353

5454
**Don't have a plan yet?** Use the symptom-based routing in [PERFORMANCE_TUNING_GUIDE.md](PERFORMANCE_TUNING_GUIDE.md) to pick the right skill for what you have.
5555

@@ -1209,7 +1209,7 @@ R11–R15 (pattern detection), R16–R20 (trend analysis, requires ≥ 3 snapsho
12091209
EXECUTE collect.usp_CollectProcStats;
12101210
```
12111211

1212-
**Sample output:** See [`example/procstats-review/proc_stats_output-analysis.md`](example/procstats-review/proc_stats_output-analysis.md).
1212+
**Sample output:** See [`skills/procstats-review/examples/proc_stats_output-analysis.md`](skills/procstats-review/examples/proc_stats_output-analysis.md).
12131213

12141214
---
12151215

@@ -1296,10 +1296,10 @@ symptom ──► /sql-triage ──► capture bundle ◄──┘ (if artifact
12961296

12971297
**Sample outputs:**
12981298

1299-
- [`example/mssql-performance-review/mixed-artifacts-analysis.md`](example/mssql-performance-review/mixed-artifacts-analysis.md) — artifact-driven review with full report
1300-
- [`example/mssql-performance-review/symptom-first-analysis.md`](example/mssql-performance-review/symptom-first-analysis.md) — symptom-only triage with capture-bundle response
1301-
- [`example/mssql-performance-review/capture-bundle-example/`](example/mssql-performance-review/capture-bundle-example/) — sample bundle (README, scripts, paste-back template, manifest.json)
1302-
- [`example/mssql-performance-review/baseline-diff-analysis.md`](example/mssql-performance-review/baseline-diff-analysis.md) — verification report 24h after deploy with recommendation tags
1299+
- [`skills/mssql-performance-review/examples/mixed-artifacts-analysis.md`](skills/mssql-performance-review/examples/mixed-artifacts-analysis.md) — artifact-driven review with full report
1300+
- [`skills/mssql-performance-review/examples/symptom-first-analysis.md`](skills/mssql-performance-review/examples/symptom-first-analysis.md) — symptom-only triage with capture-bundle response
1301+
- [`skills/mssql-performance-review/examples/capture-bundle-example/`](skills/mssql-performance-review/examples/capture-bundle-example/) — sample bundle (README, scripts, paste-back template, manifest.json)
1302+
- [`skills/mssql-performance-review/examples/baseline-diff-analysis.md`](skills/mssql-performance-review/examples/baseline-diff-analysis.md) — verification report 24h after deploy with recommendation tags
13031303

13041304
**When to use this vs a specialised skill directly:**
13051305

@@ -1346,7 +1346,7 @@ The orchestrator does not duplicate the specialised skills — it composes them.
13461346

13471347
## Example
13481348

1349-
See [`example/sqlplan-review/horrible-analysis.md`](example/sqlplan-review/horrible-analysis.md) for a full analysis of [`example/sqlplan-review/horrible.sqlplan`](example/sqlplan-review/horrible.sqlplan) — a deliberately bad plan demonstrating parameter sniffing, memory grant failure, TempDb spills, leading-wildcard LIKE, implicit conversion, and 5M-row key lookups.
1349+
See [`skills/sqlplan-review/examples/horrible-analysis.md`](skills/sqlplan-review/examples/horrible-analysis.md) for a full analysis of [`skills/sqlplan-review/examples/horrible.sqlplan`](skills/sqlplan-review/examples/horrible.sqlplan) — a deliberately bad plan demonstrating parameter sniffing, memory grant failure, TempDb spills, leading-wildcard LIKE, implicit conversion, and 5M-row key lookups.
13501350

13511351
---
13521352

mcp-server/src/skills-data.ts

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

scripts/verify-docs.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,19 @@ else
105105
fi
106106

107107
# ---------------------------------------------------------------------------
108-
# Check 6: Every skill has an example/ subfolder
108+
# Check 6: Every skill has an examples/ subfolder
109109
# ---------------------------------------------------------------------------
110110
echo ""
111111
echo "[ 6 ] Example folders"
112112
check6_ok=1
113113
for skill_dir in skills/*/; do
114114
name=$(basename "$skill_dir")
115-
if [ ! -d "example/$name" ]; then
116-
warn "example/$name/ is missing — add an input file and -analysis.md"
115+
if [ ! -d "skills/$name/examples" ]; then
116+
warn "skills/$name/examples/ is missing — add an input file and -analysis.md"
117117
check6_ok=0
118118
fi
119119
done
120-
[ "$check6_ok" -eq 1 ] && pass "All skills have example/ subfolders"
120+
[ "$check6_ok" -eq 1 ] && pass "All skills have examples/ subfolders"
121121

122122
# ---------------------------------------------------------------------------
123123
# Check 7: Check prefix uniqueness — no letter used by two different skills
@@ -260,12 +260,13 @@ done
260260
[ "$check14_ok" -eq 1 ] && pass "Frontmatter description check counts match actual (for skills that declare them)"
261261

262262
# ---------------------------------------------------------------------------
263-
# Check 15: Each example subfolder has at least one *-analysis.md
263+
# Check 15: Each skill's examples/ subfolder has at least one *-analysis.md
264264
# ---------------------------------------------------------------------------
265265
echo ""
266266
echo "[15 ] Example subfolders contain an analysis file"
267267
check15_ok=1
268-
for d in example/*/; do
268+
for skill_dir in skills/*/; do
269+
d="${skill_dir}examples/"
269270
[ ! -d "$d" ] && continue
270271
analysis_count=$(ls "$d"*-analysis.md 2>/dev/null | wc -l | tr -d ' ')
271272
if [ "$analysis_count" -eq 0 ]; then

skills/clusterlog-review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ These checks fire on SQL Server AG-specific resource events within the WSFC log
192192
## Output Format
193193

194194
Structure the report as follows. The reference output in
195-
`example/clusterlog-review/cluster-analysis.md` demonstrates the expected quality level.
195+
`skills/clusterlog-review/examples/cluster-analysis.md` demonstrates the expected quality level.
196196

197197
```
198198
## Cluster Log Analysis

example/clusterlog-review/cluster-analysis.md renamed to skills/clusterlog-review/examples/cluster-analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# /clusterlog-review — Example Output
22

3-
Input: `example/clusterlog-review/cluster.log`
3+
Input: `skills/clusterlog-review/examples/cluster.log`
44

55
---
66

File renamed without changes.
File renamed without changes.

example/hadr-health-review/hadr_dmv_output-analysis.md renamed to skills/hadr-health-review/examples/hadr_dmv_output-analysis.md

File renamed without changes.

0 commit comments

Comments
 (0)