plugin-authoring
Plugin Authoring Reference
Knowledge base for building correct Claude Code plugins and hooks. Read the quick reference below, then navigate to the detailed reference files as needed.
Quick Reference
plugin.json — Minimal Template
{
"name": "{name}",
"version": "0.1.0",
"description": "{what this plugin does}",
"hooks": "./hooks/hooks.json",
"skills": "./skills/"
}
Required field: name. The hooks field MUST be present for hooks to load. The skills field defaults to ./skills/ if omitted.
hooks.json — Minimal Template
{
"description": "{what these hooks do}",
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\"",
"timeout": 10,
"statusMessage": "Bootstrapping..."
}
]
}
]
}
}
Three nesting levels: event → matcher group → hook handler array.
Exit Code Cheat Sheet
| Exit Code | Meaning | Stdout | Stderr |
|---|---|---|---|
| 0 | Success / allow | Parsed for JSON output | Ignored |
| 2 | Blocking error | Ignored | Fed back to Claude as error |
| Other | Non-blocking error | Ignored | Shown in verbose mode only |
Reference Navigation
| Reference | Read when... |
|---|---|
| plugin-structure.md | Creating plugin.json, understanding directory layout, debugging cache issues, checking activation flow |
| hook-events.md | Choosing which events to hook, checking what input each event receives, understanding blocking behavior |
| hook-types-and-output.md | Writing hook handlers, choosing command vs prompt vs agent, structuring JSON output, using hookSpecificOutput |
| matchers-and-environment.md | Filtering when hooks fire, writing regex matchers, using environment variables, structuring hooks.json |
| gotchas-and-debugging.md | Hooks not firing, unexpected behavior, cache not refreshing, debugging strategy, common pitfalls |
| agonda-patterns.md | Implementing workspace discovery, compound loops, governance enforcement, SessionStart bootstrap, using proven Agonda hook templates |
More from alavida-ai/skills
buying-signals
Detect B2B buying signals for prospect companies. Analyzes companies across web/news, landing pages, social media and scores them by buying intent (HOT/WARM/COOL/COLD). Use for: prospect scoring, lead qualification, outbound sales research, GTM signal detection. Triggers: buying signals, analyze company, score prospects, buying intent, lead scoring, signal detection, sales intelligence, prospect research, company analysis, outbound signals, GTM signals, warm leads, hot leads
21agentic-mesh
Reference guide for the Agentic Mesh framework (Falconer, O'Reilly 2025). Covers agent architecture, mesh platform design, trust frameworks, operating models, and implementation roadmaps. Use when: discussing agentic mesh concepts, designing agent ecosystems, planning mesh infrastructure, referencing agent patterns (communication, role, organizational), understanding trust/security/governance for agents, building agent factories, or implementing the Agonda methodology. Triggers: agentic mesh, agent architecture, agent ecosystem, mesh platform, trust framework, agent factory, agent fleet, agentic quantum, microagent, agent registry, agent lifecycle, agent patterns, mesh governance, agent operations
19visual-explainer
Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.
18frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
5gary-provost
Transform rough ideas into clear, engaging writing using Gary Provost's rhythm and structure principles. Use when the user needs help writing emails, tweets, scripts, sales copy, articles, or any content where readability, flow, and digestibility matter. Ideal for entrepreneurs and content creators who want to turn ideas into professional writing without sounding robotic or over-polished. Apply when the user asks for help writing, editing for clarity, improving pacing, or making content more engaging.
5seo-audit
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," or "SEO health check." For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup.
4