Agent skill
plugin-creator
This skill should be used when the user asks to 'create a plugin', 'scaffold a plugin', 'set up plugin structure', 'new plugin', 'add plugin components', or needs to substantially edit an existing plugin.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/plugin-creator-edwinhu-workflows
SKILL.md
Plugin Creator (with Superpowers Enforcement)
This skill wraps the built-in plugin-dev:create-plugin with enforcement pattern awareness from the superpowers framework. It adds an enforcement audit layer and PostToolUse validation hooks that the built-in version lacks.
Process
Step 1: Classify the Plugin
Before drafting, classify what's being created or edited:
| Type | Description | Enforcement Needs |
|---|---|---|
| Full plugin | New plugin with skills, hooks, commands, agents | High — needs enforcement across all components |
| Skill addition | Adding a skill to an existing plugin | Medium — needs skill-level enforcement audit |
| Hook addition | Adding hooks to an existing plugin | Medium — needs path validation, matcher coverage |
| Component edit | Substantial edit to existing plugin component | Medium — needs re-audit of affected enforcement |
Anti-Patterns: Read Before Drafting
!cat ${CLAUDE_SKILL_DIR}/../../references/creator-anti-patterns.md
Step 1b: Check for Bang and Hook Opportunities
Before drafting, identify constraints that should be mechanically enforced rather than prompt-enforced:
- Bang-backtick injection (
!command``) — inject dynamic context at skill load time - Scoped hooks (PreToolUse/PostToolUse) — fire only while the skill is active, auto-cleaned up
The principle: if a constraint is mechanically checkable, enforce it with a hook. If it requires judgment, keep it as prompt text.
Step 2: Invoke the Built-in Plugin Creator
Use the Skill tool to invoke the built-in plugin creator:
Skill(skill="plugin-dev:create-plugin")
Follow its full process. The built-in creator handles the workflow — do not reimplement it.
Step 3: Enforcement Audit (After Each Draft)
After writing or revising plugin components (and before final validation), audit against the superpowers enforcement patterns. Read the enforcement checklist:
!cat ${CLAUDE_SKILL_DIR}/../../references/enforcement-checklist.md
Then score the draft using the appropriate template:
For Plugin Skills
Score against all 12 patterns from the checklist. Focus especially on:
- Iron Laws — Does each skill have absolute constraints for high-drift actions?
- Rationalization Tables — Does each skill preempt the agent's excuses?
- Red Flags + STOP — Are there pattern interrupts for observable wrong actions?
- Trigger-Only Descriptions — Does each skill description contain ONLY trigger phrases, no process summary?
- Gate Functions — Does every phase transition have a verifiable exit condition?
For Plugin Hooks
Verify:
- Matcher coverage — Do hooks fire on the right tool events?
- Path validity — Do hook commands use
${CLAUDE_PLUGIN_ROOT}(not${CLAUDE_SKILL_DIR})? - Error handling — Do hooks fail gracefully (non-zero exit blocks the action)?
- Scope — Are hooks scoped to skills (frontmatter) or global (plugin.json)?
For Plugin Structure
Verify:
- plugin.json — Valid manifest with correct version, name, description
- marketplace.json — Version matches plugin.json in all locations
- Directory layout — skills/, hooks/, commands/, agents/ as needed
- Path portability — No hardcoded absolute paths in any component
Step 4: Reconcile Tensions
Tension resolution: Enforcement patterns go in skill body (not description), implementation code goes in scripts/, names are descriptive but descriptions are trigger-only.
Step 5: Continue Iteration
Return to the built-in plugin creator's process for validation and testing. After each iteration's revision, re-run the enforcement audit (Step 3).
During iteration, watch for enforcement iteration signals (see "Enforcement Iteration Signals" in the anti-patterns reference loaded above).
References
- Enforcement checklist:
references/enforcement-checklist.md(loaded above via bang injection) - Anti-patterns:
references/creator-anti-patterns.md(loaded above via bang injection) - Philosophy:
references/PHILOSOPHY.md - Built-in plugin creator:
plugin-dev:create-plugin
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?