Skill Creation (planning + creation)
This skill runs two flows: planning (/skill-plan) and creation (/skill-create). Review is handled separately by the skill-reviewing skill. Keep the main conversation clean; heavy work runs in agents via Agent Runner with registry-based resolution.
Planning Flow (wizard)
Confirm goal: new skill package vs update/version bump (capture desired version target if known).
Capture responsibilities + success criteria; list primary use cases.
Command UX: required args, options, --help text; defaults for --name, behavior of --from (seed from existing skill/plan), and --template (plan skeleton file). Enforce naming convention: file path .claude/commands/<name>.md, frontmatter name: <name> (no slash), user invocation /name (slash added by system), default version 0.1.0.
Agents: propose candidate agents, inputs/outputs, fenced JSON envelopes, and registry versions.
File layout: commands under .claude/commands, skills under .claude/skills/<name>/SKILL.md, agents under .claude/agents, references/templates under .claude/references (if needed) for easy testing before packaging. Default versions for commands/skills/agents: 0.1.0 unless explicitly overridden.
Keep agent set minimal by default; only add extra agents when scope justifies it. Prefer clear roles (e.g., intake, fix, PR) over many micro-agents.
Statusing: mark plan as Preliminary, then Proposed after user confirms.
Review Gate (Pre-Approval): Before marking a plan as Approved, invoke all three review agents to validate the proposed architecture against v0.5 guidelines:
skill-architecture-review — Validates two-tier pattern, response contracts, agent design
skill-implementation-review — Validates fenced JSON, hook patterns, security considerations
skill-metadata-storage-review — Validates frontmatter requirements, storage conventions
All three must return success: true with zero errors before the plan can be marked Approved. Warnings are advisory and do not block approval. If any review returns errors, address the issues in the plan before re-running the review gate.
Generate 40–80 line overview with full plan path when user approves (Approved). Planning must not create artifacts—only write/update a plan file. Creation happens only via /skill-create.
Implementation notes
- Use Agent Runner; resolve agents by name+version from
.claude/agents/registry.yaml.
- Store plans by default in
plans/<name>.md; allow override when user supplies a path or --template. Do not overwrite request/input files—write to a new plan file/path when invoked with a request doc.
- If
--from is set, load referenced artifact(s) and summarize key facts into the plan.
- Maintain concise outputs; omit tool traces.
Agent Runner invocation (v0.5 contract)
agent: "skill-planning-agent"
params:
goal: "new|update"
target_name: "<skill name>"
plan_path: "<plans/path.md>"
from_paths: ["<paths from --from if any>"]
template_path: "<template if provided>"
version_constraint: "0.x"
timeout_s: 120
Agent output (fenced JSON, minimal envelope)
{
"success": true,
"data": {
"summary": "Concise overview",
"plan": { "path": "<dest>", "status": "Preliminary|Proposed|Approved" },
"actions": ["next step", "next step"],
"open_questions": ["q1", "q2"]
},
"error": null
}
If plan incomplete, include open questions and next actions; otherwise provide summary + full plan path.
Review Gate invocation (parallel execution)
Run all three review agents in parallel when transitioning from Proposed → Approved:
# Architecture review
agent: "skill-architecture-review"
params:
target_type: "plan"
target_path: "{{plan_path}}"
check_two_tier: true
check_contracts: true
check_naming: true
version_constraint: "0.x"
timeout_s: 60
# Implementation review
agent: "skill-implementation-review"
params:
target_path: "{{plan_path}}"
check_hooks: true
check_dependencies: true
check_security: true
version_constraint: "0.x"
timeout_s: 60
# Metadata & storage review
agent: "skill-metadata-storage-review"
params:
target_type: "plan"
target_path: "{{plan_path}}"
check_registry: false # Plan doesn't have registry entries yet
version_constraint: "0.x"
timeout_s: 60
Review Gate output aggregation
Collect results from all three agents and emit consolidated status:
{
"success": true,
"data": {
"review_gate_passed": true,
"reviews": {
"architecture": { "passed": true, "errors": 0, "warnings": 1 },
"implementation": { "passed": true, "errors": 0, "warnings": 0 },
"metadata_storage": { "passed": true, "errors": 0, "warnings": 2 }
},
"blocking_issues": [],
"advisory_warnings": ["...", "..."],
"plan_status": "Approved"
},
"error": null
}
If review_gate_passed: false, the plan remains at Proposed status until issues are resolved.
Creation Flow
- Input: approved plan path.
- Generate stubs for command/skill/agents/references at version 0.1.0 using naming convention:
- File path:
.claude/commands/<name>.md
- Frontmatter name:
<name> (no slash)
- User invocation:
/name (slash added by system)
- Populate references listed in the plan (e.g., required reference files).
- Update registry with new agents and skill dependency constraints (including manage-worktree when git ops are needed).
Storage
| Purpose |
Location |
Notes |
| Plans |
plans/<name>.md |
User-managed, version controlled |
| Scratch |
.claude/state/skill-creation/ |
Transient session data, 24h TTL |
Safety
- Creation of plan files is allowed; avoid destructive repo changes.
- Keep outputs concise; no tool traces in main conversation.
- Base branch/worktree defaults: honor
.claude/config.yaml if present (base_branch, worktree_root); otherwise default to main and a repo-named worktree root. For git operations, instruct reuse of manage-worktree skill.
- Registry expectations: include manage-worktree dependency when git ops are needed; use constraints like
manage-worktree: "0.x". Ensure new agents/skills are added with version 0.1.0 by default.
Reference Documents
Plans and generated artifacts MUST comply with these normative documents:
Review Agents
The review gate uses these specialized agents (from skill-reviewing skill):
| Agent |
Validates |
Reference Doc |
skill-architecture-review |
Two-tier pattern, contracts, naming |
Architecture Guidelines v0.5 |
skill-implementation-review |
Fenced JSON, hooks, security |
Tool Use Best Practices |
skill-metadata-storage-review |
Frontmatter, storage paths |
Plugin Storage Conventions |
1---2name: skill-creation-43description: Plan and create Claude Code skills/commands/agents with guided wizards and background agents aligned to v0.5 guidelines. Use when user says "create a skill", "plan a new agent", "skill wizard", or "command generator".4---5
6# Skill Creation (planning + creation)
7
8This skill runs two flows: planning (`/skill-plan`) and creation (`/skill-create`). Review is handled separately by the `skill-reviewing` skill. Keep the main conversation clean; heavy work runs in agents via Agent Runner with registry-based resolution.
9
10## Planning Flow (wizard)
111) Confirm goal: new skill package vs update/version bump (capture desired version target if known).
122) Capture responsibilities + success criteria; list primary use cases.
133) Command UX: required args, options, `--help` text; defaults for `--name`, behavior of `--from` (seed from existing skill/plan), and `--template` (plan skeleton file). Enforce naming convention: file path `.claude/commands/<name>.md`, frontmatter `name: <name>` (no slash), user invocation `/name` (slash added by system), default version 0.1.0.
144) Agents: propose candidate agents, inputs/outputs, fenced JSON envelopes, and registry versions.
155) File layout: commands under `.claude/commands`, skills under `.claude/skills/<name>/SKILL.md`, agents under `.claude/agents`, references/templates under `.claude/references` (if needed) for easy testing before packaging. Default versions for commands/skills/agents: 0.1.0 unless explicitly overridden.
166) Keep agent set minimal by default; only add extra agents when scope justifies it. Prefer clear roles (e.g., intake, fix, PR) over many micro-agents.
177) Statusing: mark plan as Preliminary, then Proposed after user confirms.
188) **Review Gate (Pre-Approval)**: Before marking a plan as Approved, invoke all three review agents to validate the proposed architecture against v0.5 guidelines:
19 - `skill-architecture-review` — Validates two-tier pattern, response contracts, agent design
20 - `skill-implementation-review` — Validates fenced JSON, hook patterns, security considerations
21 - `skill-metadata-storage-review` — Validates frontmatter requirements, storage conventions
22
23 **All three must return `success: true` with zero errors** before the plan can be marked Approved. Warnings are advisory and do not block approval. If any review returns errors, address the issues in the plan before re-running the review gate.
249) Generate 40–80 line overview with full plan path when user approves (Approved). Planning **must not** create artifacts—only write/update a plan file. Creation happens only via `/skill-create`.
25
26### Implementation notes
27- Use Agent Runner; resolve agents by name+version from `.claude/agents/registry.yaml`.
28- Store plans by default in `plans/<name>.md`; allow override when user supplies a path or `--template`. Do not overwrite request/input files—write to a new plan file/path when invoked with a request doc.
29- If `--from` is set, load referenced artifact(s) and summarize key facts into the plan.
30- Maintain concise outputs; omit tool traces.
31
32### Agent Runner invocation (v0.5 contract)
33
34```yaml
35agent: "skill-planning-agent"
36params:
37 goal: "new|update"
38 target_name: "<skill name>"
39 plan_path: "<plans/path.md>"
40 from_paths: ["<paths from --from if any>"]
41 template_path: "<template if provided>"
42version_constraint: "0.x"
43timeout_s: 120
44```
45
46### Agent output (fenced JSON, minimal envelope)
47
48```json
49{
50 "success": true,
51 "data": {
52 "summary": "Concise overview",
53 "plan": { "path": "<dest>", "status": "Preliminary|Proposed|Approved" },
54 "actions": ["next step", "next step"],
55 "open_questions": ["q1", "q2"]
56 },
57 "error": null
58}
59```
60
61If plan incomplete, include open questions and next actions; otherwise provide summary + full plan path.
62
63### Review Gate invocation (parallel execution)
64
65Run all three review agents **in parallel** when transitioning from Proposed → Approved:
66
67```yaml
68# Architecture review
69agent: "skill-architecture-review"
70params:
71 target_type: "plan"
72 target_path: "{{plan_path}}"
73 check_two_tier: true
74 check_contracts: true
75 check_naming: true
76version_constraint: "0.x"
77timeout_s: 60
78
79# Implementation review
80agent: "skill-implementation-review"
81params:
82 target_path: "{{plan_path}}"
83 check_hooks: true
84 check_dependencies: true
85 check_security: true
86version_constraint: "0.x"
87timeout_s: 60
88
89# Metadata & storage review
90agent: "skill-metadata-storage-review"
91params:
92 target_type: "plan"
93 target_path: "{{plan_path}}"
94 check_registry: false # Plan doesn't have registry entries yet
95version_constraint: "0.x"
96timeout_s: 60
97```
98
99### Review Gate output aggregation
100
101Collect results from all three agents and emit consolidated status:
102
103```json
104{
105 "success": true,
106 "data": {
107 "review_gate_passed": true,
108 "reviews": {
109 "architecture": { "passed": true, "errors": 0, "warnings": 1 },
110 "implementation": { "passed": true, "errors": 0, "warnings": 0 },
111 "metadata_storage": { "passed": true, "errors": 0, "warnings": 2 }
112 },
113 "blocking_issues": [],
114 "advisory_warnings": ["...", "..."],
115 "plan_status": "Approved"
116 },
117 "error": null
118}
119```
120
121If `review_gate_passed: false`, the plan remains at Proposed status until issues are resolved.
122
123## Creation Flow
1241) Input: approved plan path.
1252) Generate stubs for command/skill/agents/references at version 0.1.0 using naming convention:
126 - File path: `.claude/commands/<name>.md`
127 - Frontmatter name: `<name>` (no slash)
128 - User invocation: `/name` (slash added by system)
1293) Populate references listed in the plan (e.g., required reference files).
1304) Update registry with new agents and skill dependency constraints (including manage-worktree when git ops are needed).
131
132## Storage
133
134| Purpose | Location | Notes |
135|---------|----------|-------|
136| Plans | `plans/<name>.md` | User-managed, version controlled |
137| Scratch | `.claude/state/skill-creation/` | Transient session data, 24h TTL |
138
139## Safety
140- Creation of plan files is allowed; avoid destructive repo changes.
141- Keep outputs concise; no tool traces in main conversation.
142- Base branch/worktree defaults: honor `.claude/config.yaml` if present (`base_branch`, `worktree_root`); otherwise default to `main` and a repo-named worktree root. For git operations, instruct reuse of manage-worktree skill.
143- Registry expectations: include manage-worktree dependency when git ops are needed; use constraints like `manage-worktree: "0.x"`. Ensure new agents/skills are added with version 0.1.0 by default.
144
145## Reference Documents
146
147Plans and generated artifacts MUST comply with these normative documents:
148
149| Document | Purpose | Key Patterns |
150|----------|---------|--------------|
151| [Architecture Guidelines v0.5](../../docs/claude-code-skills-agents-guidelines-0.4.md) | Design patterns | Two-tier, response contracts, agent design |
152| [Tool Use Best Practices](../../docs/agent-tool-use-best-practices.md) | Implementation | Fenced JSON, hooks, dependencies |
153| [Plugin Storage Conventions](../../docs/PLUGIN-STORAGE-CONVENTIONS.md) | Storage (NORMATIVE) | Logs, settings, outputs paths |
154
155## Review Agents
156
157The review gate uses these specialized agents (from `skill-reviewing` skill):
158
159| Agent | Validates | Reference Doc |
160|-------|-----------|---------------|
161| `skill-architecture-review` | Two-tier pattern, contracts, naming | Architecture Guidelines v0.5 |
162| `skill-implementation-review` | Fenced JSON, hooks, security | Tool Use Best Practices |
163| `skill-metadata-storage-review` | Frontmatter, storage paths | Plugin Storage Conventions |