This skill should be used when the user asks to 'create a skill', 'add a new skill', 'make a skill', 'scaffold a skill', 'new skill', 'スキル化して', 'スキルを作成', 'スキルを追加', or wants to create a new Claude Code skill for a plugin or project. Provides a guided workflow with automated scaffolding, validation, and dynamic context injection.
From mutilsnpx claudepluginhub masseater/claude-code-plugin --plugin mutilsThis skill uses the workspace's default tool permissions.
references/github-api.mdscripts/detect-context.test.tsscripts/detect-context.tsscripts/inject-references.test.tsscripts/inject-references.tsscripts/scaffold.test.tsscripts/scaffold.tsscripts/validate.test.tsscripts/validate.tsGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Automate mechanical work (directory creation, frontmatter validation, reference injection) via scripts. Spend human effort on intent design and workflow authoring — not boilerplate.
!${CLAUDE_SKILL_DIR}/scripts/detect-context.ts
Put every deterministic, repeatable step in a script — not in Claude's reasoning. This eliminates variance and saves tokens. The boundary:
| Automated (scripts) | Human + Claude |
|---|---|
| Directory scaffolding | Clarifying skill intent and use cases |
| Frontmatter template generation | Writing the description with trigger phrases |
| Validation (structure, style, refs) | Designing workflow steps |
| Context detection (plugin, skills) | Deciding what goes in SKILL.md vs references |
| Executable permission setting | Writing the skill body content |
Before scaffolding, clarify the following. If the user provided enough context, skip asking and confirm instead:
Run the scaffold script. It creates the directory structure, SKILL.md template, and optional scripts//references/ directories in one step — no manual mkdir or template copying:
${CLAUDE_SKILL_DIR}/scripts/scaffold.ts --plugin-dir <dir> --skill-name <name> [--scripts] [--references]
Fill in the scaffolded SKILL.md. Follow these rules:
Frontmatter:
name: kebab-case identifierdescription: Third-person, with quoted trigger phrases. Example: "This skill should be used when the user asks to 'do X', 'configure Y', or mentions Z."tools: List tools the skill needs (e.g., Bash(${CLAUDE_SKILL_DIR}/scripts/foo.ts *), Read, Write)disable-model-invocation: true for task-only skills, context: fork for subagent executionBody writing rules:
references/!cmd syntax for dynamic context injectionDynamic context injection:
Use EXCLAMATION-BACKTICK syntax (write ! immediately followed by a backtick-wrapped command) to inject live data before Claude sees the skill content. This saves reasoning tokens by pre-computing deterministic values:
The ## Current Context section above demonstrates this: detect-context.ts runs at skill load time and injects the plugin context JSON.
For syntax details, refer to: https://code.claude.com/docs/en/skills#inject-dynamic-context
Caution: This syntax executes everywhere in SKILL.md — including code fences and indented blocks. Never include literal examples of this syntax in SKILL.md itself, as they will be executed. Put examples in references or external docs.
Extract deterministic logic into scripts. This prevents Claude from reinventing the same logic each session and ensures consistent behavior:
| Extract into a script when the skill needs | Why |
|---|---|
| File transformation (rotating, converting, formatting) | Deterministic — Claude should not reimplement this |
| Validation (structure, linting, schema compliance) | Consistent checks across sessions |
| Data gathering (API calls, file scanning, environment detection) | Avoid wasting reasoning tokens on I/O |
| Template generation (boilerplate, scaffolding) | Single source of truth for templates |
| Index management (catalogs, manifests) | Eliminate manual maintenance drift |
Script conventions:
#!/usr/bin/env bun./script.ts (not bun run script.ts)chmod +x scripts/*.tstools field: Bash(${CLAUDE_SKILL_DIR}/scripts/foo.ts *)[name].test.ts for each scriptcc-hooks-ts for hook scripts; @r_masseater/cc-plugin-lib for shared utilitiesreferences/github-api.md (Octokit first, gh CLI last)After writing SKILL.md and creating support files, run the references injection script:
${CLAUDE_SKILL_DIR}/scripts/inject-references.ts <skill-dir>
Always use this script to update the Bundled Resources section — never hand-edit between REFERENCES_START and REFERENCES_END markers. Re-run immediately after adding, removing, or renaming files to prevent stale references.
Run the validation script to catch structural issues before manual review:
${CLAUDE_SKILL_DIR}/scripts/validate.ts <skill-dir>
Fix all errors and warnings, then re-run until clean. The script validates frontmatter, description format, word count, writing style, file references, and executable permissions.
Iterate until a plugin-dev:skill-reviewer subagent scores the skill 10/10. This catches quality issues that mechanical validation misses (intent clarity, trigger coverage, workflow completeness):
plugin-dev:skill-reviewer with the skill directory pathinject-references.ts and validate.ts if files changedIf the subagent is unavailable, self-evaluate using the same criteria. Still iterate until 10/10.
After scoring 10/10, verify the skill actually works in practice:
/skill-name direct invocation!cmd injections produce expected outputUse this checklist before considering the skill complete:
!cmd where applicable| Anti-pattern | Better approach |
|---|---|
| Instructing Claude to "create the directory structure" | Use scaffold script |
| Writing validation logic in SKILL.md prose | Create a validation script |
| Embedding large reference docs in SKILL.md | Move to references/ and link |
| Vague description ("Helps with X") | Specific triggers ("create X", "configure Y") |
| Second-person instructions ("You should...") | Imperative form ("Run...", "Create...") |
| Hardcoding paths in SKILL.md | Use ${CLAUDE_SKILL_DIR} variable |
| Manual file permission setting | Script it or document in scaffold |
| Hand-editing Bundled Resources section | Re-run inject-references.ts |
scripts/detect-context.ts — Detect the current plugin context for skill creation.scripts/inject-references.ts — Scan a skill directory and inject a references section into its SKILL.md.scripts/scaffold.ts — Scaffold a new skill directory with SKILL.md template and optional subdirectories.scripts/validate.ts — Validate a SKILL.md file for quality and completeness.references/github-api.md — GitHub API guidelines: use gh auth token + Octokit instead of gh CLI directly