/plugin-skill-create — Plugin-Convention Skill Scaffold
Generate plugin/skills/<name>/SKILL.md plus eval/case stub plus memory-hook scaffolding. Conforms to:
- agentskills.io specification — https://agentskills.io/specification (frontmatter, naming, directory layout, progressive disclosure)
- agentskills.io best practices — https://agentskills.io/skill-creation/best-practices (description style, body length, calibration)
- agentskills.io description optimization — https://agentskills.io/skill-creation/optimizing-descriptions (trigger phrasing, what+when, keywords)
- ai-skills plugin conventions — H5 frontmatter trigger pattern, schema-validated frontmatter,
<untrusted_content> G1 wrapping where applicable, G7 spawn payload format if the skill spawns subagents
The cached, offline-authoritative form of (1)–(3) is prompt-engineering/skill-authoring-spec.md + prompt-engineering/optimizing-descriptions.md — read those first; re-fetch the live URLs only when network is available.
When to use
- Adding a new workflow skill to the plugin (e.g., a project-specific workflow)
- Adding a knowledge skill to the plugin
- Adding a companion utility skill
Not for: general-purpose Anthropic skill creation — use the upstream skill-creator for that. This scaffold ONLY targets plugin-convention skills under plugin/skills/.
Invocation
/plugin-skill-create new-workflow --invocable --agent-spawn
/plugin-skill-create analyzer --type knowledge
/plugin-skill-create release-notes --type companion --invocable
Arguments
| Flag |
Default |
Effect |
<name> (positional) |
required |
Lowercase + hyphens; ≤64 chars; must NOT clash with existing plugin/skills/<name>/ |
--type |
workflow |
workflow (full SDLC stage), knowledge (read-only reference), companion (helper) |
--invocable |
true (workflow + companion); false (knowledge) |
Adds context: fork for slash invocation |
--agent-spawn |
off |
Pre-wires G7 spawn payload section + return contract validation |
--ralph |
off |
Pre-wires RALF Loop section per ralph-budget.md defaults |
| `--memory L4 |
L5` |
off |
Behavior
- Validate
<name>:
- Lowercase + hyphens only (per Anthropic skill name convention from docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices)
- ≤64 chars
- Does NOT collide with existing
plugin/skills/<name>/
- If collision: error and suggest
--overwrite flag (but this skill never overwrites by default — minimum-change discipline)
- Generate
plugin/skills/<name>/SKILL.md with H5 frontmatter:
---
name: <name>
description: Use this skill when <TODO: trigger phrase> — TODO replace this placeholder describing what the skill does.
context: fork # if --invocable
argument-hint: "<arg>" # if --invocable
disable-model-invocation: true # if --type knowledge AND not --invocable
---
The TODO — token is a hard guard: plugin-skill-audit fails (CRITICAL severity) on any skill description that still contains TODO. This forces the scaffolded description to be edited before merge. Removing the literal TODO from your description is the gate that flips the audit from failing to passing.
Generate body skeleton:
# /<name> heading
- Purpose section (placeholder)
- When to use / Not for sections
- Invocation examples (placeholder)
- Arguments table (placeholder)
- Behavior steps
- Hard rules
- Failure modes
- Memory writes table (if
--memory)
- RALF Loop section (if
--ralph)
- G7 Spawn Payload + Return Contract section (if
--agent-spawn)
- Integration section: rules, hooks, schemas, companions
Generate plugin/eval/cases/<name>/eval-case-001.json stub (Tier 3):
{
"case_id": "<name>-001",
"skill": "<name>",
"input": {"prompt": "<test prompt>"},
"expected": {"contains": ["<expected substring>"]},
"judge_rubric": "plugin/eval/judge-rubrics/<name>.md",
"judge_model": "haiku",
"max_tokens_input": 30000,
"max_tokens_output": 2000
}
Generate plugin/eval/judge-rubrics/<name>.md skeleton with the standard 5-dimension template.
Print summary: created files + next steps:
- Fill placeholder content
- Run
/plugin-skill-audit <name> --strict to confirm spec compliance
- Run
/eval --skill <name> --tier 1
Hard rules
Every scaffolded skill MUST satisfy the agentskills.io specification + ai-skills conventions below. The audit counterpart /plugin-skill-audit enforces the same rules — anything this skill emits MUST pass /plugin-skill-audit <name> --strict.
agentskills.io spec, best-practices, scripts & description rules (cached digest)
The full cached rules live in two digests (read them before scaffolding — single source of truth, progressive disclosure; do NOT re-inline here):
prompt-engineering/skill-authoring-spec.md — specification (frontmatter, naming, directory layout, 3-level progressive disclosure), best practices, using-scripts, and skill-output eval
prompt-engineering/optimizing-descriptions.md — the description triggering surface (imperative phrasing, user-intent, be-pushy, trigger eval, 1024 hard limit)
Hard invariants every scaffold MUST satisfy (enforced by /plugin-author audit --strict):
name 1–64 chars; lowercase a–z, digits, hyphens; no leading/trailing or consecutive (--) hyphens; MUST equal the parent directory name
description 1–1024 chars; non-empty; what + when; trigger keywords; imperative; no TODO token (audit CRITICAL)
- Body ≤ 5000 tokens AND ≤ 500 lines recommended; file references one level deep from
SKILL.md
- Scripts/deps (only when
scripts/ is generated): no interactive prompts (agents run non-interactive shells); --help usage; structured data → stdout, diagnostics → stderr; pinned deps or inline PEP 723 / equivalent — see the digest's "Using scripts in skills" section
ai-skills plugin conventions
- Body ≤ 12K chars per project rule (matches the upstream ≤500-line recommendation)
- Description in third person — first-person breaks discovery
- Form A: every description BEGINS with the literal
Use this skill when … phrase (ai-skills strict operationalization of upstream imperative phrasing; capability folded into the same sentence)
- Never overwrite existing skill — refuse if
plugin/skills/<name>/ already exists
- Plugin-only scope — never scaffolds skills outside
plugin/skills/. For project-local skills use upstream skill-creator
- English-only per repo CLAUDE.md
- No absolute user-machine paths in templates or examples
Best practices the scaffold bakes in
Sourced from the digest (prompt-engineering/skill-authoring-spec.md best-practices) — the scaffold output and the author MUST apply, not just cite:
- Start from real expertise — never generate a skill from generic LLM knowledge (produces vague generic procedures). Extract the pattern from a real completed task, or synthesize from project artifacts (runbooks, API specs, code-review comments, VCS history, real failure cases).
- Refine with real execution — the first draft is a draft. Run against real tasks, feed ALL results back (not just failures), read execution traces; wasted steps ⇒ vague/inapplicable/duplicate instructions.
- Design coherent units — one skill = one coherent capability. Too narrow ⇒ many skills per task; too broad ⇒ imprecise activation.
- Output-format templates — emit a concrete template (agents pattern-match well); short inline, long →
assets/, referenced.
- Checklists for multi-step workflows; plan-validate-execute for batch/destructive ops (intermediate plan → validate vs source of truth → execute).
- Bundle on reinvention — if traces show the agent re-deriving the same logic each run, ship a tested script in
scripts/.
Scripts & dependencies (when the skill ships scripts/)
Sourced from the digest's "Using scripts in skills" section:
- One-off runners over committed code where possible:
uvx/pipx run (Python), npx/bunx (Node), deno run (--allow-*), go run. Pin versions (npx eslint@9.0.0).
- Inline deps — Python PEP 723 block +
uv run scripts/x.py; pin via PEP 508; requires-python. State runtime-level prerequisites in the compatibility frontmatter field, not body prose.
- Non-interactive (HARD) — no TTY-blocking prompts; input via flags/env/stdin; clear error+usage when a required input is missing.
--help documented per script; structured output (JSON/CSV/TSV) → stdout, progress/diagnostics → stderr.
- Documented exit codes per failure type; idempotency ("create if not exists");
--dry-run for destructive/stateful ops; predictable output size (harnesses truncate ~10–30K chars — default to a summary, support --offset, or require --output FILE|-).
Failure modes
- Name collision: refuse, suggest different name
- Name fails validation: refuse with examples of valid names (e.g.,
release-notes, NOT Release Notes or releasenotes)
- Permission denied on write: report path; suggest checking plugin/ writeability
Memory writes
| Layer |
When |
Shape |
| L4 |
After scaffold |
.ai-skills-memory/plugin-skills/<name>/scaffolded.md — timestamp + flags used |
Integration
- Status: internal procedure document for
/plugin-author create. Not slash-invocable (frontmatter disable-model-invocation: true). The umbrella reads this file directly when scaffolding a new asset; ai-skills:prompt-engineer pre-reads it before any plugin-asset DEV pass.
- Reachable via:
/plugin-author create <name> [--type workflow|knowledge|companion] [--agent-spawn] [--ralph]
- Writes to:
plugin/skills/<name>/, plugin/eval/cases/<name>/, plugin/eval/judge-rubrics/<name>.md
- References:
- Templates: H5 frontmatter pattern, G7 schemas (if
--agent-spawn), ralph-budget.md defaults (if --ralph)
- Companion procedure:
plugin/skills/plugin-skill-audit/SKILL.md — audit + safe-fix discipline applied by /plugin-author audit.
1---2name: plugin-skill-create3description: Use this skill when scaffolding a new skill (workflow, knowledge, or companion utility) under `plugin/skills/` and you need spec-conformant frontmatter, an eval test-case stub, and memory-write points pre-wired — the internal procedure for `/plugin-author create`. Generates a new skill INSIDE the ai-skills plugin conforming to the agentskills.io specification (https://agentskills.io/specification) and ai-skills plugin conventions. No longer slash-invocable — call `/plugin-author create <name>` instead. Read by the `prompt-engineer` agent at task start when DEV-ing or reviewing a plugin skill.4---56# /plugin-skill-create — Plugin-Convention Skill Scaffold78Generate `plugin/skills/<name>/SKILL.md` plus eval/case stub plus memory-hook scaffolding. Conforms to:9101. **agentskills.io specification** — https://agentskills.io/specification (frontmatter, naming, directory layout, progressive disclosure)112. **agentskills.io best practices** — https://agentskills.io/skill-creation/best-practices (description style, body length, calibration)123. **agentskills.io description optimization** — https://agentskills.io/skill-creation/optimizing-descriptions (trigger phrasing, what+when, keywords)134. **ai-skills plugin conventions** — H5 frontmatter trigger pattern, schema-validated frontmatter, `<untrusted_content>` G1 wrapping where applicable, G7 spawn payload format if the skill spawns subagents1415The cached, offline-authoritative form of (1)–(3) is `prompt-engineering/skill-authoring-spec.md` + `prompt-engineering/optimizing-descriptions.md` — read those first; re-fetch the live URLs only when network is available.1617## When to use1819- Adding a new workflow skill to the plugin (e.g., a project-specific workflow)20- Adding a knowledge skill to the plugin21- Adding a companion utility skill2223Not for: general-purpose Anthropic skill creation — use the upstream `skill-creator` for that. This scaffold ONLY targets plugin-convention skills under `plugin/skills/`.2425## Invocation2627```28/plugin-skill-create new-workflow --invocable --agent-spawn29/plugin-skill-create analyzer --type knowledge30/plugin-skill-create release-notes --type companion --invocable31```3233## Arguments3435| Flag | Default | Effect |36|---|---|---|37| `<name>` (positional) | required | Lowercase + hyphens; ≤64 chars; must NOT clash with existing `plugin/skills/<name>/` |38| `--type` | `workflow` | `workflow` (full SDLC stage), `knowledge` (read-only reference), `companion` (helper) |39| `--invocable` | true (workflow + companion); false (knowledge) | Adds `context: fork` for slash invocation |40| `--agent-spawn` | off | Pre-wires G7 spawn payload section + return contract validation |41| `--ralph` | off | Pre-wires RALF Loop section per `ralph-budget.md` defaults |42| `--memory L4|L5` | off | Pre-wires memory write points per `memory-discipline.md` rule 1 |4344## Behavior45461. Validate `<name>`:47 - Lowercase + hyphens only (per Anthropic skill name convention from docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices)48 - ≤64 chars49 - Does NOT collide with existing `plugin/skills/<name>/`50 - If collision: error and suggest `--overwrite` flag (but this skill never overwrites by default — minimum-change discipline)512. Generate `plugin/skills/<name>/SKILL.md` with H5 frontmatter:5253```yaml54---55name: <name>56description: Use this skill when <TODO: trigger phrase> — TODO replace this placeholder describing what the skill does.57context: fork # if --invocable58argument-hint: "<arg>" # if --invocable59disable-model-invocation: true # if --type knowledge AND not --invocable60---61```6263The `TODO —` token is a hard guard: `plugin-skill-audit` fails (CRITICAL severity) on any skill description that still contains `TODO`. This forces the scaffolded description to be edited before merge. Removing the literal `TODO` from your description is the gate that flips the audit from failing to passing.64653. Generate body skeleton:66 - `# /<name>` heading67 - Purpose section (placeholder)68 - When to use / Not for sections69 - Invocation examples (placeholder)70 - Arguments table (placeholder)71 - Behavior steps72 - Hard rules73 - Failure modes74 - Memory writes table (if `--memory`)75 - RALF Loop section (if `--ralph`)76 - G7 Spawn Payload + Return Contract section (if `--agent-spawn`)77 - Integration section: rules, hooks, schemas, companions78794. Generate `plugin/eval/cases/<name>/eval-case-001.json` stub (Tier 3):8081```json82{83 "case_id": "<name>-001",84 "skill": "<name>",85 "input": {"prompt": "<test prompt>"},86 "expected": {"contains": ["<expected substring>"]},87 "judge_rubric": "plugin/eval/judge-rubrics/<name>.md",88 "judge_model": "haiku",89 "max_tokens_input": 30000,90 "max_tokens_output": 200091}92```93945. Generate `plugin/eval/judge-rubrics/<name>.md` skeleton with the standard 5-dimension template.95966. Print summary: created files + next steps:97 - Fill placeholder content98 - Run `/plugin-skill-audit <name> --strict` to confirm spec compliance99 - Run `/eval --skill <name> --tier 1`100101## Hard rules102103Every scaffolded skill MUST satisfy the agentskills.io specification + ai-skills conventions below. The audit counterpart `/plugin-skill-audit` enforces the same rules — anything this skill emits MUST pass `/plugin-skill-audit <name> --strict`.104105### agentskills.io spec, best-practices, scripts & description rules (cached digest)106107The full cached rules live in two digests (read them before scaffolding — single source of truth, progressive disclosure; do NOT re-inline here):108109- `prompt-engineering/skill-authoring-spec.md` — specification (frontmatter, naming, directory layout, 3-level progressive disclosure), best practices, using-scripts, and skill-output eval110- `prompt-engineering/optimizing-descriptions.md` — the `description` triggering surface (imperative phrasing, user-intent, be-pushy, trigger eval, 1024 hard limit)111112Hard invariants every scaffold MUST satisfy (enforced by `/plugin-author audit --strict`):113114- **`name`** 1–64 chars; lowercase a–z, digits, hyphens; no leading/trailing or consecutive (`--`) hyphens; MUST equal the parent directory name115- **`description`** 1–1024 chars; non-empty; what + when; trigger keywords; imperative; no `TODO` token (audit CRITICAL)116- **Body** ≤ 5000 tokens AND ≤ 500 lines recommended; file references one level deep from `SKILL.md`117- **Scripts/deps** (only when `scripts/` is generated): no interactive prompts (agents run non-interactive shells); `--help` usage; structured data → stdout, diagnostics → stderr; pinned deps or inline PEP 723 / equivalent — see the digest's "Using scripts in skills" section118119### ai-skills plugin conventions120121- **Body ≤ 12K chars** per project rule (matches the upstream ≤500-line recommendation)122- **Description in third person** — first-person breaks discovery123- **Form A**: every description **BEGINS with the literal `Use this skill when …`** phrase (ai-skills strict operationalization of upstream imperative phrasing; capability folded into the same sentence)124- **Never overwrite** existing skill — refuse if `plugin/skills/<name>/` already exists125- **Plugin-only scope** — never scaffolds skills outside `plugin/skills/`. For project-local skills use upstream `skill-creator`126- **English-only** per repo CLAUDE.md127- **No absolute user-machine paths** in templates or examples128129## Best practices the scaffold bakes in130131Sourced from the digest (`prompt-engineering/skill-authoring-spec.md` best-practices) — the scaffold output and the author MUST apply, not just cite:132133- **Start from real expertise** — never generate a skill from generic LLM knowledge (produces vague generic procedures). Extract the pattern from a real completed task, or synthesize from project artifacts (runbooks, API specs, code-review comments, VCS history, real failure cases).134- **Refine with real execution** — the first draft is a draft. Run against real tasks, feed ALL results back (not just failures), read execution traces; wasted steps ⇒ vague/inapplicable/duplicate instructions.135- **Design coherent units** — one skill = one coherent capability. Too narrow ⇒ many skills per task; too broad ⇒ imprecise activation.136- **Output-format templates** — emit a concrete template (agents pattern-match well); short inline, long → `assets/`, referenced.137- **Checklists** for multi-step workflows; **plan-validate-execute** for batch/destructive ops (intermediate plan → validate vs source of truth → execute).138- **Bundle on reinvention** — if traces show the agent re-deriving the same logic each run, ship a tested script in `scripts/`.139140## Scripts & dependencies (when the skill ships `scripts/`)141142Sourced from the digest's "Using scripts in skills" section:143144- **One-off runners** over committed code where possible: `uvx`/`pipx run` (Python), `npx`/`bunx` (Node), `deno run` (`--allow-*`), `go run`. **Pin versions** (`npx eslint@9.0.0`).145- **Inline deps** — Python PEP 723 block + `uv run scripts/x.py`; pin via PEP 508; `requires-python`. State runtime-level prerequisites in the `compatibility` frontmatter field, not body prose.146- **Non-interactive (HARD)** — no TTY-blocking prompts; input via flags/env/stdin; clear error+usage when a required input is missing.147- **`--help`** documented per script; **structured output** (JSON/CSV/TSV) → stdout, progress/diagnostics → stderr.148- **Documented exit codes** per failure type; **idempotency** ("create if not exists"); **`--dry-run`** for destructive/stateful ops; **predictable output size** (harnesses truncate ~10–30K chars — default to a summary, support `--offset`, or require `--output FILE|-`).149150## Failure modes151152- **Name collision:** refuse, suggest different name153- **Name fails validation:** refuse with examples of valid names (e.g., `release-notes`, NOT `Release Notes` or `releasenotes`)154- **Permission denied on write:** report path; suggest checking plugin/ writeability155156## Memory writes157158| Layer | When | Shape |159|---|---|---|160| L4 | After scaffold | `.ai-skills-memory/plugin-skills/<name>/scaffolded.md` — timestamp + flags used |161162## Integration163164- **Status**: internal procedure document for `/plugin-author create`. Not slash-invocable (frontmatter `disable-model-invocation: true`). The umbrella reads this file directly when scaffolding a new asset; `ai-skills:prompt-engineer` pre-reads it before any plugin-asset DEV pass.165- **Reachable via**: `/plugin-author create <name> [--type workflow|knowledge|companion] [--agent-spawn] [--ralph]`166- **Writes to**: `plugin/skills/<name>/`, `plugin/eval/cases/<name>/`, `plugin/eval/judge-rubrics/<name>.md`167- **References**:168 - `prompt-engineering/skill-authoring-spec.md` — cached spec + best-practices + scripts + eval digest (offline source of truth)169 - `prompt-engineering/optimizing-descriptions.md` — cached description-triggering digest170 - agentskills.io specification — https://agentskills.io/specification171 - agentskills.io best practices — https://agentskills.io/skill-creation/best-practices172 - agentskills.io description optimization — https://agentskills.io/skill-creation/optimizing-descriptions173 - Anthropic Agent Skills best-practices — https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices174- **Templates**: H5 frontmatter pattern, G7 schemas (if `--agent-spawn`), `ralph-budget.md` defaults (if `--ralph`)175- **Companion procedure**: `plugin/skills/plugin-skill-audit/SKILL.md` — audit + safe-fix discipline applied by `/plugin-author audit`.