@complexthings/superpowers-agent 8.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/.agents/docs/SUPERPOWERS.md +108 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/001-copilot-tool-mapping-do.md +116 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/SUMMARY.md +72 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/copilot-tool-mapping-do-output.md +83 -0
- package/.agents/prompts/001-release-management-do/001-release-management-do.md +161 -0
- package/.agents/prompts/001-release-management-do/SUMMARY.md +19 -0
- package/.agents/prompts/001-release-management-do/completed/001-release-management-do.md +161 -0
- package/.agents/prompts/002-pull-command-do/SUMMARY.md +28 -0
- package/.agents/prompts/002-pull-command-do/completed/002-pull-command-do.md +122 -0
- package/.agents/prompts/002-pull-command-do/pull-command-do-output.md +174 -0
- package/.agents/prompts/command_updates_prompt.md +69 -0
- package/.agents/prompts/current_prompt.md +8 -0
- package/.agents/prompts/refactor.prompt.md +57 -0
- package/.agents/skills/.gitkeep +0 -0
- package/.agents/superpowers-agent +355 -0
- package/.agents/superpowers-bootstrap.md +42 -0
- package/.agents/templates/AGENTS.md.template +40 -0
- package/.agents/templates/SUPERPOWERS.md.template +108 -0
- package/.agents/templates/TOOLS.md.template +15 -0
- package/.github/workflows/main.yaml +32 -0
- package/AGENTS.md +60 -0
- package/LICENSE +21 -0
- package/README.md +724 -0
- package/hooks/hooks.json +15 -0
- package/hooks/session-start.sh +27 -0
- package/package.json +51 -0
- package/skills/architecture/ABOUT.md +20 -0
- package/skills/architecture/preserving-productive-tensions/SKILL.md +146 -0
- package/skills/architecture/preserving-productive-tensions/skill.json +9 -0
- package/skills/collaboration/brainstorming/SKILL.md +166 -0
- package/skills/collaboration/brainstorming/skill.json +9 -0
- package/skills/collaboration/brainstorming/spec-document-reviewer-prompt.md +50 -0
- package/skills/collaboration/brainstorming/visual-companion.md +277 -0
- package/skills/collaboration/dispatching-parallel-agents/SKILL.md +174 -0
- package/skills/collaboration/dispatching-parallel-agents/skill.json +9 -0
- package/skills/collaboration/executing-plans/SKILL.md +130 -0
- package/skills/collaboration/executing-plans/skill.json +9 -0
- package/skills/collaboration/finishing-a-development-branch/SKILL.md +261 -0
- package/skills/collaboration/finishing-a-development-branch/skill.json +9 -0
- package/skills/collaboration/leveraging-cli-tools/SKILL.md +132 -0
- package/skills/collaboration/leveraging-cli-tools/skill.json +9 -0
- package/skills/collaboration/receiving-code-review/SKILL.md +233 -0
- package/skills/collaboration/receiving-code-review/skill.json +9 -0
- package/skills/collaboration/requesting-code-review/SKILL.md +110 -0
- package/skills/collaboration/requesting-code-review/code-reviewer.md +146 -0
- package/skills/collaboration/requesting-code-review/skill.json +12 -0
- package/skills/collaboration/subagent-driven-development/SKILL.md +255 -0
- package/skills/collaboration/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/collaboration/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/collaboration/subagent-driven-development/skill.json +15 -0
- package/skills/collaboration/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/collaboration/using-git-worktrees/SKILL.md +366 -0
- package/skills/collaboration/using-git-worktrees/skill.json +9 -0
- package/skills/collaboration/writing-plans/SKILL.md +121 -0
- package/skills/collaboration/writing-plans/plan-document-reviewer-prompt.md +52 -0
- package/skills/collaboration/writing-plans/skill.json +9 -0
- package/skills/debugging/defense-in-depth/SKILL.md +380 -0
- package/skills/debugging/defense-in-depth/skill.json +9 -0
- package/skills/debugging/root-cause-tracing/SKILL.md +361 -0
- package/skills/debugging/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/debugging/root-cause-tracing/skill.json +12 -0
- package/skills/debugging/systematic-debugging/SKILL.md +299 -0
- package/skills/debugging/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/debugging/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/debugging/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/debugging/systematic-debugging/find-polluter.sh +63 -0
- package/skills/debugging/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/debugging/systematic-debugging/skill.json +9 -0
- package/skills/debugging/systematic-debugging/test-academic.md +14 -0
- package/skills/debugging/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/debugging/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/debugging/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/debugging/verification-before-completion/SKILL.md +143 -0
- package/skills/debugging/verification-before-completion/skill.json +9 -0
- package/skills/finding-skills/SKILL.md +101 -0
- package/skills/finding-skills/skill.json +8 -0
- package/skills/meta/create-skill-json/SKILL.md +370 -0
- package/skills/meta/create-skill-json/skill.json +9 -0
- package/skills/meta/create-skill-json/test-scenarios.md +29 -0
- package/skills/meta/creating-prompts/SKILL.md +349 -0
- package/skills/meta/creating-prompts/examples/do-example.md +65 -0
- package/skills/meta/creating-prompts/examples/plan-example.md +75 -0
- package/skills/meta/creating-prompts/examples/refine-example.md +65 -0
- package/skills/meta/creating-prompts/examples/research-example.md +63 -0
- package/skills/meta/creating-prompts/scripts/get-next-number.sh +27 -0
- package/skills/meta/creating-prompts/skill.json +20 -0
- package/skills/meta/creating-prompts/templates/do-template.md +59 -0
- package/skills/meta/creating-prompts/templates/plan-template.md +58 -0
- package/skills/meta/creating-prompts/templates/refine-template.md +54 -0
- package/skills/meta/creating-prompts/templates/research-template.md +56 -0
- package/skills/meta/using-superpowers/SKILL.md +122 -0
- package/skills/meta/using-superpowers/skill.json +5 -0
- package/skills/meta/writing-prompts/SKILL.md +345 -0
- package/skills/meta/writing-prompts/skill.json +9 -0
- package/skills/problem-solving/ABOUT.md +40 -0
- package/skills/problem-solving/collision-zone-thinking/SKILL.md +188 -0
- package/skills/problem-solving/collision-zone-thinking/references/historical-examples.md +393 -0
- package/skills/problem-solving/collision-zone-thinking/skill.json +9 -0
- package/skills/problem-solving/inversion-exercise/SKILL.md +174 -0
- package/skills/problem-solving/inversion-exercise/skill.json +9 -0
- package/skills/problem-solving/meta-pattern-recognition/SKILL.md +116 -0
- package/skills/problem-solving/meta-pattern-recognition/skill.json +9 -0
- package/skills/problem-solving/scale-game/SKILL.md +222 -0
- package/skills/problem-solving/scale-game/skill.json +9 -0
- package/skills/problem-solving/simplification-cascades/SKILL.md +113 -0
- package/skills/problem-solving/simplification-cascades/skill.json +9 -0
- package/skills/problem-solving/when-stuck/SKILL.md +69 -0
- package/skills/problem-solving/when-stuck/skill.json +9 -0
- package/skills/research/ABOUT.md +20 -0
- package/skills/research/tracing-knowledge-lineages/SKILL.md +241 -0
- package/skills/research/tracing-knowledge-lineages/skill.json +9 -0
- package/skills/setup-skills/SKILL.md +47 -0
- package/skills/testing/condition-based-waiting/SKILL.md +359 -0
- package/skills/testing/condition-based-waiting/example.ts +158 -0
- package/skills/testing/condition-based-waiting/skill.json +12 -0
- package/skills/testing/test-driven-development/SKILL.md +434 -0
- package/skills/testing/test-driven-development/skill.json +9 -0
- package/skills/testing/testing-anti-patterns/SKILL.md +298 -0
- package/skills/testing/testing-anti-patterns/skill.json +9 -0
- package/skills/testing/verification-before-completion/SKILL.md +246 -0
- package/skills/testing/verification-before-completion/skill.json +10 -0
- package/skills/using-a-skill/SKILL.md +101 -0
- package/skills/using-a-skill/skill.json +8 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: finding-skills
|
|
3
|
+
description: Use when you need to discover what skills are available before starting any task, find a skill for a specific problem, search by keyword or topic, or understand which skill to use. Always check for skills at the start of any conversation or before beginning a task — if a skill exists for what you're doing, you must use it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Finding Skills
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Before starting any task, discover what skills are available so you don't reinvent solved problems. Skills encode proven workflows — using them prevents known mistakes and saves time.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Starting a new task or conversation (always check first)
|
|
15
|
+
- Looking for guidance on a specific problem (debugging, testing, planning, etc.)
|
|
16
|
+
- Unsure whether a skill exists for something you're about to do
|
|
17
|
+
- Asked "is there a skill for X?" or "what skills are available?"
|
|
18
|
+
|
|
19
|
+
## How to Find Skills
|
|
20
|
+
|
|
21
|
+
### Native Skill Tool (Primary Method — All Platforms)
|
|
22
|
+
|
|
23
|
+
Most AI coding assistants expose a native skill or tool mechanism. Use it first:
|
|
24
|
+
|
|
25
|
+
- **If your platform has a native `skill` tool**: use it to list or load skills by name — this is the fastest path
|
|
26
|
+
- **If skills appear in your system context** (e.g., an `<available_skills>` block or similar): scan that list before starting any task
|
|
27
|
+
- **If your platform supports `@skill` mentions or tool invocations**: use those to activate a skill directly
|
|
28
|
+
|
|
29
|
+
When in doubt, check whatever mechanism your platform provides to discover available skills before doing anything else.
|
|
30
|
+
|
|
31
|
+
### CLI: superpowers-agent find-skills
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
superpowers-agent find-skills
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This shows all skills from superpowers-managed locations with their names and descriptions.
|
|
38
|
+
|
|
39
|
+
**Filter by piping to grep:**
|
|
40
|
+
```bash
|
|
41
|
+
# Find testing-related skills
|
|
42
|
+
superpowers-agent find-skills | grep -i test
|
|
43
|
+
|
|
44
|
+
# Find debugging skills
|
|
45
|
+
superpowers-agent find-skills | grep -i debug
|
|
46
|
+
|
|
47
|
+
# Find skills about a topic
|
|
48
|
+
superpowers-agent find-skills | grep -i brainstorm
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Get the path to a specific skill:**
|
|
52
|
+
```bash
|
|
53
|
+
superpowers-agent path <skill-name>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Load and execute a skill directly:**
|
|
57
|
+
```bash
|
|
58
|
+
superpowers-agent execute <skill-name>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Skill Locations and Priority
|
|
62
|
+
|
|
63
|
+
Skills are discovered from multiple locations. Higher priority overrides lower when names conflict:
|
|
64
|
+
|
|
65
|
+
| Priority | Location | Scope |
|
|
66
|
+
|----------|----------|-------|
|
|
67
|
+
| 1 (highest) | `.agents/skills/` in project | Project-specific |
|
|
68
|
+
| 1 (highest) | Platform project skill dir (e.g. `.claude/skills/`) | Project-specific |
|
|
69
|
+
| 2 | `~/.agents/skills/` | Personal, cross-project |
|
|
70
|
+
| 3 | Platform system skill directory | Platform system skills |
|
|
71
|
+
| 4 (lowest) | `~/.agents/superpowers/skills/` | Superpowers community skills |
|
|
72
|
+
|
|
73
|
+
Project skills always win. When a project skill and a system skill share the same name, the project version is used.
|
|
74
|
+
|
|
75
|
+
## After Finding a Skill
|
|
76
|
+
|
|
77
|
+
Once you identify a relevant skill:
|
|
78
|
+
|
|
79
|
+
1. Load it using your platform's native skill tool, or via `superpowers-agent execute <name>`
|
|
80
|
+
2. Announce: "Using Skill: [name] to [purpose]"
|
|
81
|
+
3. Follow the skill's instructions exactly
|
|
82
|
+
|
|
83
|
+
If a skill exists for your task, using it is not optional — skills encode solutions to known problems.
|
|
84
|
+
|
|
85
|
+
## Common Mistakes
|
|
86
|
+
|
|
87
|
+
**Don't:**
|
|
88
|
+
- Skip checking for skills because "this is simple" — simple tasks are exactly when you're most likely to miss that a skill exists
|
|
89
|
+
- Assume you remember what skills are available — the list changes, check fresh each time
|
|
90
|
+
- Search only by exact name — grep descriptions too, skills may use different terminology
|
|
91
|
+
|
|
92
|
+
**Do:**
|
|
93
|
+
- Check at the start of every task, before writing code or asking clarifying questions
|
|
94
|
+
- Search broadly (e.g., `grep -i plan` finds `writing-plans`, `executing-plans`, etc.)
|
|
95
|
+
- If in doubt whether a skill applies, load it and check — it costs little to verify
|
|
96
|
+
|
|
97
|
+
## Related Skills
|
|
98
|
+
|
|
99
|
+
- **using-a-skill** - How to load and apply a skill once found
|
|
100
|
+
- **using-superpowers** - Introduction to the full skills system
|
|
101
|
+
- **writing-skills** - Create new skills using TDD
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-skill-json
|
|
3
|
+
description: Generate a skill.json metadata file for a skill from its SKILL.md and directory structure. Use when adding a new skill to a repository, updating an existing skill's metadata, or standardizing skill.json files. Triggers whenever someone mentions generating, creating, or updating skill.json files.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.1.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Create skill.json
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Generate a `skill.json` metadata file for a skill based on its `SKILL.md` frontmatter and directory structure. This ensures consistent skill metadata across repositories.
|
|
13
|
+
|
|
14
|
+
**Core principle:** skill.json is generated from existing information (frontmatter, file structure), not created from scratch with assumptions.
|
|
15
|
+
|
|
16
|
+
**CRITICAL:** skill.json contains **EXACTLY 5 FIELDS** - no more, no less. Any additional fields are forbidden.
|
|
17
|
+
|
|
18
|
+
## Input Requirements
|
|
19
|
+
|
|
20
|
+
You must be given:
|
|
21
|
+
- A path to a `SKILL.md` file, OR
|
|
22
|
+
- A path to a directory containing a `SKILL.md` file
|
|
23
|
+
|
|
24
|
+
## Process
|
|
25
|
+
|
|
26
|
+
### 1. Validate Input
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# If given directory path
|
|
30
|
+
if [ -d "$input_path" ]; then
|
|
31
|
+
skill_dir="$input_path"
|
|
32
|
+
skill_md="${skill_dir}/SKILL.md"
|
|
33
|
+
else
|
|
34
|
+
skill_md="$input_path"
|
|
35
|
+
skill_dir="$(dirname "$input_path")"
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Verify SKILL.md exists
|
|
39
|
+
if [ ! -f "$skill_md" ]; then
|
|
40
|
+
echo "Error: SKILL.md not found at $skill_md"
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Extract Frontmatter Data
|
|
46
|
+
|
|
47
|
+
Read the SKILL.md file and extract frontmatter fields:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
---
|
|
51
|
+
name: human-readable-name
|
|
52
|
+
description: One-line summary of what the skill does and when to use it.
|
|
53
|
+
metadata:
|
|
54
|
+
version: 1.0.0 # Optional, defaults to 1.0.0
|
|
55
|
+
---
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Required fields from frontmatter:**
|
|
59
|
+
- `name` → becomes `title` in skill.json
|
|
60
|
+
- `metadata.version` (or top-level `version`) → use if present, otherwise default to "1.0.0"
|
|
61
|
+
|
|
62
|
+
### 3. Determine Skill Name (with Namespace)
|
|
63
|
+
|
|
64
|
+
The skill `name` in skill.json includes a **namespace prefix** based on where the skill lives:
|
|
65
|
+
|
|
66
|
+
| Location | Namespace | Example name |
|
|
67
|
+
|----------|-----------|--------------|
|
|
68
|
+
| `~/.agents/superpowers/skills/` | `superpowers:` | `superpowers:debugging/memory-profiling` |
|
|
69
|
+
| `.agents/skills/` (project) | none | `debugging/memory-profiling` |
|
|
70
|
+
| `~/.agents/skills/` (personal) | none | `debugging/memory-profiling` |
|
|
71
|
+
|
|
72
|
+
The path component after the namespace is the **relative path from the skills root directory**.
|
|
73
|
+
|
|
74
|
+
**Examples:**
|
|
75
|
+
- Superpowers skill at `~/.agents/superpowers/skills/debugging/memory-profiling/` → name: `superpowers:debugging/memory-profiling`
|
|
76
|
+
- Project skill at `./skills/meta/create-skill-json/` → name: `meta/create-skill-json`
|
|
77
|
+
- Personal skill at `~/.agents/skills/collaboration/brainstorming/` → name: `collaboration/brainstorming`
|
|
78
|
+
|
|
79
|
+
**When context is ambiguous** (can't determine location), ask the user or default to no prefix.
|
|
80
|
+
|
|
81
|
+
### 4. Identify Helper Files
|
|
82
|
+
|
|
83
|
+
Helper files are files in the skill directory (excluding SKILL.md itself) that the skill **references or uses**. Focus on files that support agents executing the skill.
|
|
84
|
+
|
|
85
|
+
**Include in helpers array:**
|
|
86
|
+
- `scripts/` — executable scripts referenced in the skill
|
|
87
|
+
- `examples/` — example code or files used in the skill
|
|
88
|
+
- `templates/` — reusable templates the skill instructs agents to use
|
|
89
|
+
- `references/` — reference documents the skill tells agents to read
|
|
90
|
+
- `assets/` — static resources the skill uses
|
|
91
|
+
- Root-level support files (e.g., `package.json`, `*.sh`, `*.py` that aren't test files)
|
|
92
|
+
|
|
93
|
+
**Path format:** Relative to the skill directory (where skill.json will live)
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
"helpers": [
|
|
97
|
+
"scripts/profile-heap.js",
|
|
98
|
+
"scripts/analyze-snapshots.py",
|
|
99
|
+
"examples/node-example.js",
|
|
100
|
+
"package.json"
|
|
101
|
+
]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Exclude from helpers:**
|
|
105
|
+
- `SKILL.md` itself
|
|
106
|
+
- `skill.json` (if it already exists)
|
|
107
|
+
- Hidden files (starting with `.`)
|
|
108
|
+
- Test/evaluation files (`test-*.md`, `evals/`, `*-workspace/`)
|
|
109
|
+
- Documentation not used by the skill: `README.md`, `CHANGELOG.md`, `LICENSE.txt`
|
|
110
|
+
- `node_modules/`, build artifacts
|
|
111
|
+
|
|
112
|
+
**If helpers array is empty**, omit the field entirely (don't include `"helpers": []`).
|
|
113
|
+
|
|
114
|
+
### 5. Generate Aliases
|
|
115
|
+
|
|
116
|
+
Aliases allow users to reference the skill with shorter names.
|
|
117
|
+
|
|
118
|
+
**Standard aliases (in this order):**
|
|
119
|
+
1. Just the skill name (shortest): `skill-name`
|
|
120
|
+
2. The full path: `category/skill-name`
|
|
121
|
+
|
|
122
|
+
**Example:**
|
|
123
|
+
```json
|
|
124
|
+
"aliases": [
|
|
125
|
+
"memory-profiling",
|
|
126
|
+
"debugging/memory-profiling"
|
|
127
|
+
]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Optional:** Add a well-known abbreviation as a third alias if one exists (e.g., `"tdd"` for test-driven-development, `"sdd"` for subagent-driven-development). Only add an abbreviation if it's clearly recognized — don't invent aliases.
|
|
131
|
+
|
|
132
|
+
**Do NOT add random synonyms** — stick to the standard two aliases unless an obvious abbreviation exists.
|
|
133
|
+
|
|
134
|
+
### 6. Create skill.json
|
|
135
|
+
|
|
136
|
+
Assemble the complete skill.json with **EXACTLY these 5 fields** (or 4 if helpers is empty):
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"version": "1.0.0",
|
|
141
|
+
"name": "superpowers:category/skill-name",
|
|
142
|
+
"title": "Human-Readable Title",
|
|
143
|
+
"helpers": [
|
|
144
|
+
"scripts/helper1.js"
|
|
145
|
+
],
|
|
146
|
+
"aliases": [
|
|
147
|
+
"skill-name",
|
|
148
|
+
"category/skill-name"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
When helpers is empty, omit it:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"version": "1.0.0",
|
|
158
|
+
"name": "superpowers:category/skill-name",
|
|
159
|
+
"title": "Human-Readable Title",
|
|
160
|
+
"aliases": [
|
|
161
|
+
"skill-name",
|
|
162
|
+
"category/skill-name"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**FORBIDDEN:** Do NOT add any other fields. No `description`, `tags`, `capabilities`, `triggers`, `keyConcepts`, `components`, `references`, `quickReference`, `resources`, `stats`, `when_to_use`, or any other creative fields.
|
|
168
|
+
|
|
169
|
+
### 7. Write and Validate
|
|
170
|
+
|
|
171
|
+
Write the skill.json file to the skill directory:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
output_path="${skill_dir}/skill.json"
|
|
175
|
+
echo "$skill_json" > "$output_path"
|
|
176
|
+
|
|
177
|
+
# Optional: Validate JSON syntax
|
|
178
|
+
if command -v jq &> /dev/null; then
|
|
179
|
+
jq empty "$output_path" 2>&1 || echo "Warning: Invalid JSON generated"
|
|
180
|
+
fi
|
|
181
|
+
|
|
182
|
+
echo "Created: $output_path"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Also run `skills-ref validate` if the tool is available:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
if command -v skills-ref &> /dev/null; then
|
|
189
|
+
skills-ref validate "$skill_dir" && echo "Skill validation passed"
|
|
190
|
+
fi
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Complete Example
|
|
194
|
+
|
|
195
|
+
**Input:** `~/.agents/superpowers/skills/debugging/memory-profiling/`
|
|
196
|
+
|
|
197
|
+
**Directory structure:**
|
|
198
|
+
```
|
|
199
|
+
~/.agents/superpowers/skills/debugging/memory-profiling/
|
|
200
|
+
├── SKILL.md
|
|
201
|
+
├── scripts/
|
|
202
|
+
│ ├── profile-heap.js
|
|
203
|
+
│ ├── analyze-snapshots.py
|
|
204
|
+
│ └── compare-profiles.sh
|
|
205
|
+
└── examples/
|
|
206
|
+
└── node-example.js
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**SKILL.md frontmatter:**
|
|
210
|
+
```yaml
|
|
211
|
+
---
|
|
212
|
+
name: memory-profiling
|
|
213
|
+
metadata:
|
|
214
|
+
version: 2.1.0
|
|
215
|
+
---
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Generated skill.json:**
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"version": "2.1.0",
|
|
222
|
+
"name": "superpowers:debugging/memory-profiling",
|
|
223
|
+
"title": "memory-profiling",
|
|
224
|
+
"helpers": [
|
|
225
|
+
"scripts/profile-heap.js",
|
|
226
|
+
"scripts/analyze-snapshots.py",
|
|
227
|
+
"scripts/compare-profiles.sh",
|
|
228
|
+
"examples/node-example.js"
|
|
229
|
+
],
|
|
230
|
+
"aliases": [
|
|
231
|
+
"memory-profiling",
|
|
232
|
+
"debugging/memory-profiling"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## FORBIDDEN FIELDS
|
|
238
|
+
|
|
239
|
+
**skill.json must contain EXACTLY 4-5 fields** (version, name, title, helpers [optional], aliases). The following fields are explicitly FORBIDDEN:
|
|
240
|
+
|
|
241
|
+
### Documentation Fields (belongs in SKILL.md)
|
|
242
|
+
- ❌ `description` - Use SKILL.md frontmatter `description` field
|
|
243
|
+
- ❌ `when_to_use` - Use SKILL.md frontmatter or content
|
|
244
|
+
- ❌ `keyConcepts` - Document in SKILL.md content
|
|
245
|
+
- ❌ `overview` - Document in SKILL.md content
|
|
246
|
+
|
|
247
|
+
### Discovery Fields (handled by find-skills)
|
|
248
|
+
- ❌ `tags` - Use SKILL.md frontmatter fields for search
|
|
249
|
+
- ❌ `keywords` - Use SKILL.md content for search
|
|
250
|
+
- ❌ `triggers` - Use SKILL.md `description` field
|
|
251
|
+
- ❌ `categories` - Path already indicates category
|
|
252
|
+
|
|
253
|
+
### Capability Fields (documented in SKILL.md)
|
|
254
|
+
- ❌ `capabilities` - Document in SKILL.md content
|
|
255
|
+
- ❌ `features` - Document in SKILL.md content
|
|
256
|
+
- ❌ `commands` - Document in SKILL.md content
|
|
257
|
+
|
|
258
|
+
### Reference Fields (use helper files)
|
|
259
|
+
- ❌ `references` - Link to helper files in SKILL.md
|
|
260
|
+
- ❌ `resources` - Add to `helpers` array if needed
|
|
261
|
+
- ❌ `links` - Add to SKILL.md content
|
|
262
|
+
|
|
263
|
+
### Structure Fields (use helper files)
|
|
264
|
+
- ❌ `components` - Document in SKILL.md or helper files
|
|
265
|
+
- ❌ `quickReference` - Create as helper file if needed
|
|
266
|
+
|
|
267
|
+
### Metadata Fields (not used by tooling)
|
|
268
|
+
- ❌ `author` - Track in git history
|
|
269
|
+
- ❌ `license` - Inherited from repository
|
|
270
|
+
|
|
271
|
+
### Statistics/Config Fields (unnecessary)
|
|
272
|
+
- ❌ `stats` - Not used by any tooling
|
|
273
|
+
- ❌ `config` - Create as helper file if needed
|
|
274
|
+
|
|
275
|
+
## Rationalization Table
|
|
276
|
+
|
|
277
|
+
| Rationalization | Counter |
|
|
278
|
+
|-----------------|---------|
|
|
279
|
+
| "Adding `description` helps with discoverability" | NO. Description is in SKILL.md frontmatter. find-skills reads that. |
|
|
280
|
+
| "`tags` make it easier to categorize and search" | NO. find-skills uses SKILL.md content and frontmatter. Path already indicates category. |
|
|
281
|
+
| "`capabilities` document what the skill does" | NO. That's what SKILL.md content is for. skill.json is for tooling, not documentation. |
|
|
282
|
+
| "`triggers` help agents know when to use this" | NO. SKILL.md `description` field serves this purpose. Don't duplicate. |
|
|
283
|
+
| "These fields might be useful for future features" | YAGNI violation. No imaginary consumers. Only add fields when tooling actually needs them. |
|
|
284
|
+
| "`helpers: []` is cleaner than omitting the field" | NO. Omit empty arrays — real skill.json files do not include `helpers` when empty. |
|
|
285
|
+
| "Other skill systems use these fields" | Irrelevant. superpowers-agent uses 4-5 fields. Period. |
|
|
286
|
+
| "Extra metadata is harmless" | NO. Bloats files, creates maintenance burden, misleads about what tooling uses. |
|
|
287
|
+
|
|
288
|
+
## Common Mistakes
|
|
289
|
+
|
|
290
|
+
### ❌ Missing namespace prefix for superpowers skills
|
|
291
|
+
```json
|
|
292
|
+
"name": "debugging/memory-profiling" // WRONG for superpowers skills
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Fix:** Add the `superpowers:` prefix for skills in `~/.agents/superpowers/skills/`:
|
|
296
|
+
```json
|
|
297
|
+
"name": "superpowers:debugging/memory-profiling" // CORRECT
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### ❌ Wrong alias order
|
|
301
|
+
```json
|
|
302
|
+
"aliases": ["debugging/memory-profiling", "memory-profiling"] // WRONG - long path first
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Fix:** Short name first, full path second:
|
|
306
|
+
```json
|
|
307
|
+
"aliases": ["memory-profiling", "debugging/memory-profiling"] // CORRECT
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### ❌ Including empty helpers array
|
|
311
|
+
```json
|
|
312
|
+
"helpers": [] // WRONG - omit if empty
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Fix:** Omit the field entirely when there are no helpers:
|
|
316
|
+
```json
|
|
317
|
+
// Just leave out "helpers" when there's nothing to list
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### ❌ Including test/eval files in helpers
|
|
321
|
+
```json
|
|
322
|
+
"helpers": ["test-scenarios.md", "evals/evals.json"] // WRONG - test files aren't helpers
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Fix:** Only include files that agents use when executing the skill.
|
|
326
|
+
|
|
327
|
+
### ❌ Adding creative aliases
|
|
328
|
+
```json
|
|
329
|
+
"aliases": ["memory-profiling", "heap-profiling", "memory-analysis"] // WRONG
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Fix:** Standard two aliases unless a well-known abbreviation exists:
|
|
333
|
+
```json
|
|
334
|
+
"aliases": ["memory-profiling", "debugging/memory-profiling"] // CORRECT
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Fields Reference
|
|
338
|
+
|
|
339
|
+
| Field | Source | Required | Default |
|
|
340
|
+
|-------|--------|----------|---------|
|
|
341
|
+
| `version` | Frontmatter `metadata.version` | No | `"1.0.0"` |
|
|
342
|
+
| `name` | Namespace + skill directory path | Yes | N/A |
|
|
343
|
+
| `title` | Frontmatter `name` field | Yes | N/A |
|
|
344
|
+
| `helpers` | Referenced support files | No | Omit if empty |
|
|
345
|
+
| `aliases` | Generated from path | Yes | `["skill-name", "category/skill-name"]` |
|
|
346
|
+
|
|
347
|
+
## Verification
|
|
348
|
+
|
|
349
|
+
After creating skill.json, verify:
|
|
350
|
+
|
|
351
|
+
- [ ] JSON is valid syntax (use `jq` if available)
|
|
352
|
+
- [ ] **File contains exactly 4 or 5 top-level fields** (version, name, title, [helpers], aliases)
|
|
353
|
+
- [ ] No forbidden fields present
|
|
354
|
+
- [ ] `version` matches SKILL.md frontmatter (or is "1.0.0")
|
|
355
|
+
- [ ] `name` includes correct namespace prefix (`superpowers:` for superpowers repo, none for project/personal)
|
|
356
|
+
- [ ] `title` matches `name` field from SKILL.md frontmatter
|
|
357
|
+
- [ ] `helpers` array lists only referenced support files (omitted if empty)
|
|
358
|
+
- [ ] `aliases` has short name first, full path second
|
|
359
|
+
- [ ] File saved to same directory as SKILL.md
|
|
360
|
+
- [ ] `skills-ref validate` passes (if tool available)
|
|
361
|
+
|
|
362
|
+
**Field count check:**
|
|
363
|
+
```bash
|
|
364
|
+
jq 'keys | length' skill.json # Must output: 4 or 5
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Related Skills
|
|
368
|
+
|
|
369
|
+
- **superpowers:writing-skills** - Create new skills following TDD methodology
|
|
370
|
+
- **superpowers:gardening-skills-wiki** - Maintain and organize skill collections
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Test Scenarios for create-skill-json Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Test that agents strictly follow the 5-field structure and don't add creative extras.
|
|
5
|
+
|
|
6
|
+
## Baseline Behavior (WITHOUT strict enforcement)
|
|
7
|
+
Agent adds fields like: `description`, `tags`, `capabilities`, `triggers`, `keyConcepts`, `quickReference`, `components`, `references`, etc.
|
|
8
|
+
|
|
9
|
+
## Test Scenario 1: Documentation-Rich Skill
|
|
10
|
+
**Setup:** Large skill with extensive frontmatter and multiple reference files
|
|
11
|
+
**Pressure:** Agent wants to "preserve valuable information" from references
|
|
12
|
+
**Expected Behavior:** Only 5 fields in skill.json, no documentation fields
|
|
13
|
+
|
|
14
|
+
## Test Scenario 2: Tool-Heavy Skill
|
|
15
|
+
**Setup:** Skill with scripts/, examples/, templates/ subdirectories
|
|
16
|
+
**Pressure:** Agent wants to categorize helpers by type
|
|
17
|
+
**Expected Behavior:** Flat helpers array, no categorization fields
|
|
18
|
+
|
|
19
|
+
## Test Scenario 3: Domain-Specific Skill
|
|
20
|
+
**Setup:** Skill for specific technology (e.g., Adobe Commerce)
|
|
21
|
+
**Pressure:** Agent wants to add `tags`, `capabilities`, `triggers` for "discoverability"
|
|
22
|
+
**Expected Behavior:** No extra metadata fields
|
|
23
|
+
|
|
24
|
+
## Common Rationalizations to Block
|
|
25
|
+
- "Adding description helps with discoverability" → NO, description is in SKILL.md
|
|
26
|
+
- "Tags make it easier to find" → NO, find-skills uses SKILL.md frontmatter
|
|
27
|
+
- "Capabilities document what it does" → NO, that's in SKILL.md content
|
|
28
|
+
- "These fields might be useful later" → YAGNI violation
|
|
29
|
+
- "Other tools might use them" → No other tools exist, don't design for imaginary consumers
|