hooks-guide

SKILL.md

Route to Reference

flowchart TD
    Start([What do you need?]) --> Q1{Which platform?}
    Q1 -->|Claude Code| Q2{Inline agent hooks<br>hooks/mcpServers/skills/memory?}
    Q1 -->|GitHub Copilot| Copilot["Read references/github-copilot.md"]
    Q1 -->|Cursor, Windsurf, Amp<br>or coverage gaps| Coverage["Read references/platform-coverage.md"]

    Q2 -->|Yes — agent frontmatter| Agent["Read references/inline-agent-hooks.md"]
    Q2 -->|No — project or global hooks| Q3{Which language?}

    Q3 -->|Node.js CJS| CJS["Read references/hooks-cjs.md"]
    Q3 -->|Python| Py["Read references/hooks-python.md"]
    Q3 -->|Not sure / both| Both["Read references/hooks-cjs.md<br>then references/hooks-python.md"]

    Agent --> CC["Also read references/claude-code.md<br>for full event schema"]
    Q3 --> Schema["Cross-platform concepts:<br>references/common-schema.md"]
    Copilot --> Schema
    Coverage --> Schema

Specialist Skills

For deeper Claude Code coverage, these focused skills are available:

  • hooks-core-reference — Hook system fundamentals: events, configuration, matchers, environment variables, execution, security, debugging. Use Skill(skill: "plugin-creator:hooks-core-reference") for configuration and troubleshooting.
  • hooks-io-api — JSON input/output API: what data hooks receive via stdin and what JSON they return to control Claude. Use Skill(skill: "plugin-creator:hooks-io-api") for writing hook scripts that process input or produce JSON output.
  • hooks-patterns — Recipes and working examples: plugin hooks, frontmatter hooks, prompt-based hooks, complete code examples in Python/Node.js. Use Skill(skill: "plugin-creator:hooks-patterns") for implementation patterns and examples.

Reference Files

Refresh Docs

Re-fetch all platform docs and re-run the rwr:doc-to-skill transform on each:

bash plugins/plugin-creator/skills/hooks-guide/scripts/fetch-and-transform-hooks-docs.sh

This updates reference files from official sources. Run when upstream docs change.

Sources

  • Claude Code hooks: https://docs.anthropic.com/en/docs/claude-code/hooks.md (accessed 2026-02-27)
  • Claude Code agent frontmatter: https://docs.anthropic.com/en/docs/claude-code/sub-agents.md (accessed 2026-02-27)
  • GitHub Copilot coding agent: https://docs.github.com/en/copilot/using-github-copilot/using-claude-as-your-copilot-llm (accessed 2026-02-27)
Weekly Installs
2
GitHub Stars
26
First Seen
14 days ago
Installed on
claude-code2