From wp-labs-standards
Use when creating, editing, or testing a Claude Code plugin in this repo
How this skill is triggered — by the user, by Claude, or both
Slash command
/wp-labs-standards:developing-pluginsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
plugins/<name>/
.claude-plugin/
plugin.json # name, version, description, author (required)
hooks/
hooks.json # hook event registrations (uses ${CLAUDE_PLUGIN_ROOT})
<hook-script> # executable scripts run by hooks
skills/
<skill-name>/
SKILL.md # user-visible unless user-invocable: false
scripts/ # utility scripts; each has a paired test-* script
guides/ # non-skill reference docs (not auto-discovered)
Every change to any file under plugins/<name>/ MUST bump the version in
.claude-plugin/plugin.json (semver: patch for fixes/docs, minor for features,
major for breaking). No exceptions — a change without a bump is incomplete.
Claude Code caches installed plugin versions at:
~/.claude/plugins/cache/<org>/<plugin>/<version>/
The active version is selected at runtime:
.in_use marker.orphaned_at markerEditing the source does nothing until the active cache entry is updated.
After every edit, always run:
plugins/wp-labs-standards/scripts/sync-cache
This syncs source → active cache using shutil.copytree (excludes .claude-plugin).
No Claude restart needed for skill/hook content changes. Restart required only when
registering a brand-new hook event type.
The script auto-detects the plugin root (walks up looking for .claude-plugin/plugin.json)
and the active cache entry. Use --dry-run to preview without writing.
Test the script first:
plugins/wp-labs-standards/scripts/test-sync-cache
Use when a command should bypass the LLM for speed or determinism (e.g. /queue capture).
Two-part pattern:
Plugin hook (hooks/hooks.json): fires automatically via ${CLAUDE_PLUGIN_ROOT}.
Returns {"decision":"block","reason":"<output>"} to short-circuit the LLM, or
{"hookSpecificOutput":{"additionalContext":"..."}} to inject context and let LLM handle it.
User-installed hook (skills/<skill>/hook + setup mode): the skill's setup mode
copies the hook script to ~/.claude/<skill>/hook and registers it in
~/.claude/settings.json as a persistent UserPromptSubmit hook. The hook reads
the prompt from stdin JSON (jq -r '.prompt') and intercepts specific commands.
Key decisions:
{"decision":"block","reason":"..."}{"hookSpecificOutput":{"additionalContext":"..."}}exit 0See plugins/wp-labs-sdlc/skills/queue/hook for the canonical implementation.
edit source → bump version → sync-cache → test in Claude Code → commit
Never commit without syncing and verifying the behavior in the active session. Skipping sync is the most common reason "my change isn't working."
npx claudepluginhub cssherry-wp/wp-labs-starter --plugin wp-labs-standardsCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.