본문으로 건너뛰기
cccskills
무료GitHub에 공개

hooks-guide

Cross-platform hooks reference for AI coding assistants — Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Windsurf, and Amp. Covers hook authoring in Node.js (ESM and CJS) and Python, per-platform event schemas, inline-agent hooks and MCP in agent frontmatter, common JSON I/O, exit codes, best practices, and a fetch script to refresh docs from official sources. Use when writing, reviewing, or debugging hooks for any AI assistant.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHubOpenAI
설치 방법 보기

포함된 파일(14)

  • SKILL.md4.7 KB
  • references/best-practices.md20.2 KB
  • references/claude-code.md40.9 KB
  • references/claude-session-log-schema-reference.md23.0 KB
  • references/common-schema.md12.5 KB
  • references/github-copilot.md5.5 KB
  • references/hooks-lifecycle.png63.6 KB
  • references/hooks-lifecycle.svg7.9 KB
  • references/hooks-nodejs-extension.md18.5 KB
  • references/hooks-python.md10.0 KB
  • references/inline-agent-hooks.md14.1 KB
  • references/openai-codex.md2.4 KB
  • references/platform-coverage.md1.9 KB
  • scripts/fetch-and-transform-hooks-docs.sh4.3 KB

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 -->|OpenAI Codex plugin| OpenAI["Read references/openai-codex.md"]
    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{Interacts with session data?<br>costs, workloads, duration, tracking}

    Q3 -->|Yes — reading or writing<br>session logs or token data| SessionSchema["Load references/claude-session-log-schema-reference.md<br>before writing any code"]
    Q3 -->|No| Q4{Which language?}

    SessionSchema --> Q4

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

    Agent --> CC["Also read references/claude-code.md<br>for full event schema"]
    Q4 --> 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. Activate /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. Activate /plugin-creator:hooks-io-api when 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. Activate /plugin-creator:hooks-patterns for implementation patterns and examples.

Reference Files

  • references/common-schema.md — shared concepts, cross-platform comparison, JSON I/O, exit codes
  • references/claude-code.md — Claude Code hooks full reference (events, matchers, configuration)
  • references/openai-codex.md — OpenAI plugin hook discovery, trust, execution, and platform boundaries
  • references/inline-agent-hooks.md — hooks, mcpServers, skills, and memory in agent frontmatter
  • references/github-copilot.md — GitHub Copilot coding agent hooks
  • references/hooks-nodejs-extension.md — Node.js authoring guide: extension rules (.mjs/.cjs), templates, anti-patterns
  • references/hooks-python.md — Python authoring guide and templates
  • references/best-practices.md — cross-platform conventions and anti-patterns
  • references/platform-coverage.md — known platforms, fetch URLs, coverage status
  • references/hooks-lifecycle.png — visual diagram of the full hook event sequence
  • references/claude-session-log-schema-reference.md — verified schema for Claude Code session JSONL logs: file locations, record structure, tool_use/tool_result pairing, usage fields, observed response sizes. Load when creating or modifying hooks that interact with session data for costs, workloads, duration, or tracking.

Refresh Docs

Re-fetch all platform docs and run the script's focused single-reference 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://code.claude.com/docs/en/hooks.md (accessed 2026-09-24)
  • Claude Code hooks guide: https://code.claude.com/docs/en/hooks-guide.md (accessed 2026-09-24)
  • Claude Code agent frontmatter: https://code.claude.com/docs/en/sub-agents.md (accessed 2026-09-24)
  • OpenAI plugin hooks: https://developers.openai.com/plugins/build/plugins.md and https://learn.chatgpt.com/docs/hooks (accessed 2026-09-24)
  • GitHub Copilot coding agent: https://docs.github.com/en/copilot/using-github-copilot/using-claude-as-your-copilot-llm (accessed 2026-02-27)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add automated documentation updater to any Claude skill. Creates a Python sync script that downloads upstream docs, processes markdown for AI consumption, and maintains local cache with configurable refresh. Collects template variables, then delegates implementation through 5-phase workflow. Use when adding auto-updating reference documentation to plugins or skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

SAM-style feature initiation workflow — discovery through codebase analysis, architecture spec, task decomposition, validation, and context manifest. Use when a user asks to add a feature, plan a feature, or convert an idea into an executable SAM plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Browser automation for AI agents using the agent-browser CLI and Playwright. Use when navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging into sites, or automating any browser task. Triggers on "open a website", "fill out a form", "click a button", "scrape data", "test this web app", "automate browser actions", or any programmatic web interaction request.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Runs the description-drift experiment — spawns all Claude Code agents simultaneously to collect self-reported capabilities, then compares them against static frontmatter descriptions to reveal how reliable orchestrator routing based on descriptions actually is. Use when measuring description drift across the agent fleet, re-running the capability collection experiment, analyzing a specific agent's self-reported capabilities, or auditing whether frontmatter descriptions accurately reflect agent behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Create or adapt Claude Code agent definitions. Use when creating an agent, changing subagent configuration, selecting agent scope, or designing a specialized delegation role.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Jamie-BitFlight의 스킬 모두 보기

이 스킬의 문제 신고