/project:skill-scripts
Analyze plugin skills to identify opportunities where supporting scripts would improve performance (fewer tokens, faster execution, consistent results), then optionally create those scripts.
When to Use This Skill
| Use this skill when... |
Use alternative when... |
| Analyzing skill improvement opportunities |
Need to create a single script for a skill |
| Bulk script creation across plugins |
One-off script for one specific need |
| Measuring coverage of scripts across portfolio |
Script generation is already done |
Context
- Plugin root: !
git rev-parse --show-toplevel
- Total plugins: !
find . -maxdepth 2 -name 'plugin.json' -type f
- Skills with scripts: !
find . -name 'scripts/*.sh' -type f
Parameters
Parse $ARGUMENTS for:
--analyze: Scan all skills, report candidates (default)
--create <plugin/skill>: Create script for specific skill only
--all: Analyze and create scripts for all high-scoring candidates
Execution
Execute this skill script analysis and creation workflow:
Step 1: Run analysis script
Execute analyzer to get structured data on all skills:
- Run analyzer:
bash "${CLAUDE_PLUGIN_ROOT}/skills/project-discovery/scripts/analyze-skills.sh" $(git rev-parse --show-toplevel 2>/dev/null || echo '.')
- Parse output to identify:
- Current coverage (skills with scripts)
- High-scoring candidates (score >= 8)
- Script type recommendations
Step 2: Analyze candidates (--create or --all modes)
For each candidate skill:
- Read SKILL.md to understand the workflow
- Identify script opportunity patterns:
- Multiple sequential git/gh commands → context-gather script
- Multi-phase workflow → workflow script
- Project type detection + conditional execution → multi-tool script
- Repeated command with different args → utility script
- Evaluate benefit: >= 4 tool calls, consistency, error handling, reuse frequency
- Skip if: single simple commands, interactive/creative, already well-structured
Step 3: Create scripts
For approved candidates:
- Use standard script template with structured output (KEY=value, section markers)
- Follow design principles: structured output, error resilience, bounded output, portable
- Place in
<plugin>/skills/<skill-name>/scripts/<script-name>.sh
- Make executable:
chmod +x <path>
- Update SKILL.md with "Recommended" section referencing the script
- Update
modified: date in frontmatter
Step 4: Report results
Present findings:
- Current coverage (X/Y skills have scripts)
- Scripts created (plugin, skill, script, type, commands replaced)
- Remaining candidates (plugin, skill, score, type, recommendation)
- Next steps (test, commit)
Step 5: Commit changes
If scripts created:
feat(<affected-plugins>): add supporting scripts to skills
Include in body:
- Which scripts were created
- What they replace (token/call savings)
- Which SKILL.md files were updated
Examples
Analyze Only
$ /project:skill-scripts --analyze
Skill Scripts Analysis
Current Coverage: 5/191 skills have supporting scripts
Top Candidates:
git-plugin/gh-cli-agentic score=14 type=context-gather
kubernetes-plugin/kubectl-debugging score=12 type=multi-tool
testing-plugin/playwright-testing score=10 type=workflow
Create for Specific Skill
$ /project:skill-scripts --create testing-plugin/playwright-testing
Analyzing testing-plugin/playwright-testing...
Found: 6 bash blocks, 3 phases, 12 commands
Creating scripts/run-tests.sh...
- Consolidates: test discovery, execution, report parsing
- Replaces: 5 individual tool calls
- Output: structured test results with file:line references
Updated SKILL.md with "Recommended" section.
Error Handling
| Situation |
Action |
| Skill has no bash patterns |
Skip, report "no script opportunity" |
| Script already exists |
Report existing, ask to overwrite |
| SKILL.md is read-only |
Report error, suggest manual update |
| Plugin not found |
List available plugins |
1---
2name: project-skill-scripts
3description: Find and create supporting scripts for plugin skills. Use when auditing skills for script opportunities, improving token efficiency, or extracting bash blocks from SKILL.md.
4args: "[--analyze] [--create <plugin/skill>] [--all]"
5allowed-tools: Bash(chmod *), Bash(mkdir *), Read, Write, Edit, Glob, Grep, TodoWrite
6argument-hint: "--analyze | --create git-plugin/git-commit-workflow | --all"
7created: 2026-01-24
8modified: 2026-05-09
9reviewed: 2026-02-14
10---
11
12# /project:skill-scripts
13
14Analyze plugin skills to identify opportunities where supporting scripts would improve performance (fewer tokens, faster execution, consistent results), then optionally create those scripts.
15
16## When to Use This Skill
17
18| Use this skill when... | Use alternative when... |
19|------------------------|--------------------------|
20| Analyzing skill improvement opportunities | Need to create a single script for a skill |
21| Bulk script creation across plugins | One-off script for one specific need |
22| Measuring coverage of scripts across portfolio | Script generation is already done |
23
24## Context
25
26- Plugin root: !`git rev-parse --show-toplevel`
27- Total plugins: !`find . -maxdepth 2 -name 'plugin.json' -type f`
28- Skills with scripts: !`find . -name 'scripts/*.sh' -type f`
29
30## Parameters
31
32Parse `$ARGUMENTS` for:
33
34- `--analyze`: Scan all skills, report candidates (default)
35- `--create <plugin/skill>`: Create script for specific skill only
36- `--all`: Analyze and create scripts for all high-scoring candidates
37
38## Execution
39
40Execute this skill script analysis and creation workflow:
41
42### Step 1: Run analysis script
43
44Execute analyzer to get structured data on all skills:
45
461. Run analyzer: `bash "${CLAUDE_PLUGIN_ROOT}/skills/project-discovery/scripts/analyze-skills.sh" $(git rev-parse --show-toplevel 2>/dev/null || echo '.')`
472. Parse output to identify:
48 - Current coverage (skills with scripts)
49 - High-scoring candidates (score >= 8)
50 - Script type recommendations
51
52### Step 2: Analyze candidates (--create or --all modes)
53
54For each candidate skill:
55
561. Read SKILL.md to understand the workflow
572. Identify script opportunity patterns:
58 - Multiple sequential git/gh commands → context-gather script
59 - Multi-phase workflow → workflow script
60 - Project type detection + conditional execution → multi-tool script
61 - Repeated command with different args → utility script
623. Evaluate benefit: >= 4 tool calls, consistency, error handling, reuse frequency
634. Skip if: single simple commands, interactive/creative, already well-structured
64
65### Step 3: Create scripts
66
67For approved candidates:
68
691. Use standard script template with structured output (KEY=value, section markers)
702. Follow design principles: structured output, error resilience, bounded output, portable
713. Place in `<plugin>/skills/<skill-name>/scripts/<script-name>.sh`
724. Make executable: `chmod +x <path>`
735. Update SKILL.md with "Recommended" section referencing the script
746. Update `modified:` date in frontmatter
75
76### Step 4: Report results
77
78Present findings:
79- Current coverage (X/Y skills have scripts)
80- Scripts created (plugin, skill, script, type, commands replaced)
81- Remaining candidates (plugin, skill, score, type, recommendation)
82- Next steps (test, commit)
83
84### Step 5: Commit changes
85
86If scripts created:
87
88```
89feat(<affected-plugins>): add supporting scripts to skills
90```
91
92Include in body:
93- Which scripts were created
94- What they replace (token/call savings)
95- Which SKILL.md files were updated
96
97## Examples
98
99### Analyze Only
100
101```
102$ /project:skill-scripts --analyze
103
104Skill Scripts Analysis
105
106Current Coverage: 5/191 skills have supporting scripts
107
108Top Candidates:
109 git-plugin/gh-cli-agentic score=14 type=context-gather
110 kubernetes-plugin/kubectl-debugging score=12 type=multi-tool
111 testing-plugin/playwright-testing score=10 type=workflow
112```
113
114### Create for Specific Skill
115
116```
117$ /project:skill-scripts --create testing-plugin/playwright-testing
118
119Analyzing testing-plugin/playwright-testing...
120Found: 6 bash blocks, 3 phases, 12 commands
121
122Creating scripts/run-tests.sh...
123- Consolidates: test discovery, execution, report parsing
124- Replaces: 5 individual tool calls
125- Output: structured test results with file:line references
126
127Updated SKILL.md with "Recommended" section.
128```
129
130## Error Handling
131
132| Situation | Action |
133|-----------|--------|
134| Skill has no bash patterns | Skip, report "no script opportunity" |
135| Script already exists | Report existing, ask to overwrite |
136| SKILL.md is read-only | Report error, suggest manual update |
137| Plugin not found | List available plugins |