Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Create and configure Claude Code hooks for customizing agent behavior.
$ npx skills add greatSumini/cc-system --skill hook-creator -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install greatSumini/cc-system hook-creator --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/hook-creator .claude/skills/hook-creator && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .claude/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creatorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add greatSumini/cc-system --skill hook-creator -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install greatSumini/cc-system hook-creator --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/hook-creator .agents/skills/hook-creator && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .agents/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add greatSumini/cc-system --skill hook-creator -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install greatSumini/cc-system hook-creator --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/hook-creator .cursor/skills/hook-creator && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .cursor/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/greatSumini/cc-system.git --path .claude/skills/hook-creator--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add greatSumini/cc-system --skill hook-creator -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install greatSumini/cc-system hook-creator --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/hook-creator .gemini/skills/hook-creator && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .gemini/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install greatSumini/cc-system hook-creatorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add greatSumini/cc-system --skill hook-creator -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/hook-creator .github/skills/hook-creator && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .github/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add greatSumini/cc-system --skill hook-creator -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install greatSumini/cc-system hook-creator --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/greatSumini/cc-system.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/hook-creator .opencode/skills/hook-creator && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "hook-creator" agent skill from https://github.com/greatSumini/cc-system/tree/main/.claude/skills/hook-creator into .opencode/skills/hook-creator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "hook-creator", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
hook-creatorCreate and configure Claude Code hooks for customizing agent behavior.
Hook Creator is an agent skill from greatSumini/cc-system. Create and configure Claude Code hooks for customizing agent behavior. Use when the user wants to (1) create a new hook, (2) configure automatic formatting, logging, or notifications, (3) add file protection or custom permissions, (4) set up pre/post tool execution actions, or (5) asks about hook events like PreToolUse, PostToolUse, Notification, etc.
Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/hook-events.md`).
It sits in Agent Workflows, covering Hooks and plugins. It works with Bash. The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 172bdd4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
jqnpxpython3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Hook Creator loads about 662 tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 186 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
**Block edits to .env files:**,{}).get('file_path',''); sys.exit(2 if '.env' in p else 0)"Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from greatSumini/cc-system at commit 172bdd4, republished under its MIT licence (© greatSumini). 186 words, ~662 tokens.
.claude/skills/hook-creator/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Create Claude Code hooks that execute shell commands at specific lifecycle events.
* for all, or specific tool names like Bash, Edit|Write)~/.claude/settings.json) or project (.claude/settings.json){
"hooks": {
"<EventName>": [
{
"matcher": "<ToolPattern>",
"hooks": [
{
"type": "command",
"command": "<shell-command>"
}
]
}
]
}
}Hooks receive JSON via stdin. Use jq to extract fields:
# Extract tool input field
jq -r '.tool_input.file_path'
# Extract with fallback
jq -r '.tool_input.description // "No description"'
# Conditional processing
jq -r 'if .tool_input.file_path then .tool_input.file_path else empty end'0 - Allow the tool to proceed2 - Block the tool and provide feedback to Claude* - Match all toolsBash - Match only Bash toolEdit|Write - Match Edit or Write toolsRead - Match Read toolLog all bash commands:
jq -r '"\(.tool_input.command)"' >> ~/.claude/bash-log.txtAuto-format TypeScript after edit:
jq -r '.tool_input.file_path' | { read f; [[ "$f" == *.ts ]] && npx prettier --write "$f"; }Block edits to .env files:
python3 -c "import json,sys; p=json.load(sys.stdin).get('tool_input',{}).get('file_path',''); sys.exit(2 if '.env' in p else 0)"references/hook-events.md for detailed event documentation with input/output schemasreferences/examples.md for complete, tested hook configurations© greatSumini, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .claude/skills/hook-creator of greatSumini/cc-system.
Open the folder on GitHubat commit 172bdd4
Hook Creator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Hook Creator this skillgreatSumini/cc-system | 438 | — | ~662 | Automated safety check: Notes | MIT | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 38k | 11 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Plugin Settings Patternanthropics/claude-plugins-official | 38k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Crush Configurationcharmbracelet/crush | 29k | — | ~3.7k | Automated safety check: Pass | Custom licence | |
| Verify Setup Health Checkdiet103/claude-code-infrastructure-showcase | 10k | — | ~363 | Automated safety check: Pass | MIT | |
| Claude SmartReflexioAI/claude-smart | 783 | — | ~439 | Automated safety check: Pass | Apache-2.0 |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
charmbracelet/crush
Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.
diet103/claude-code-infrastructure-showcase
Run the infrastructure health check and fix anything that fails
ReflexioAI/claude-smart
Codex-only — use when the user asks to run claude-smart commands in Codex, including claude-smart show, learn, restart, dashboard, clear-all, or slash-like requests such as /claude-smart:learn.
ed3dai/ed3d-plugins
A skill your agent uses when creating specialized subagents for Claude Code plugins or the Task tool - covers description writing for auto-delegation, tool selection, prompt structure, and testing…
greatSumini/cc-system
Guide for creating Claude Code slash commands. An agent skill from greatSumini/cc-system.
greatSumini/cc-system
Create specialized Claude Code sub-agents with custom system prompts and tool configurations.
greatSumini/cc-system
한 프로젝트에서 사용자가 Claude Code에 입력한 프롬프트·작업 이력을 분석해 (1) 사용 패턴 정량화, (2) 사용자의 개발 철학 추출(근거 인용), (3) 그 철학을 렌즈로 한 메타 시스템(하니스·게이트·CI·프로세스) audit, (4) 우선순위가 매겨진 개선점 발굴을 수행한다.
greatSumini/cc-system
유튜브 채널을 등록하고 새 컨텐츠를 수집하여 자막 기반 요약을 생성하는 skill. An agent skill from greatSumini/cc-system.
greatSumini/cc-system
지금까지의 작업을 한 번에 출하한다 — 커밋 → push → PR 생성 → squash merge. An agent skill from greatSumini/cc-system.
greatSumini/cc-system
gogcli를 사용하여 Gmail 메일을 검색, 조회, 발송하는 skill. An agent skill from greatSumini/cc-system.
Works with
Categories
Create and configure Claude Code hooks for customizing agent behavior. Hook Creator is an agent skill from greatSumini/cc-system. Create and configure Claude Code hooks for customizing agent behavior.
Hook Creator fits situations like: the user wants to; create a new hook; configure automatic formatting; add file protection.
Run `npx skills add greatSumini/cc-system --skill hook-creator -a claude-code`. Or copy the skill folder (.claude/skills/hook-creator in greatSumini/cc-system) into .claude/skills/hook-creator in your project. Claude Code loads it when a task matches its description.
Run `npx skills add greatSumini/cc-system --skill hook-creator -a codex`. Or copy the skill folder (.claude/skills/hook-creator in greatSumini/cc-system) into .agents/skills/hook-creator in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add greatSumini/cc-system --skill hook-creator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hook-creator, .gemini/skills/hook-creator, .github/skills/hook-creator and .opencode/skills/hook-creator in your project.
Going by SKILL.md and its folder, Hook Creator needs the command-line tools its instructions call (jq, npx and python3). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Hook Creator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 662 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Hook Creator: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Plugin Settings Pattern (anthropics/claude-plugins-official, 38k stars), Crush Configuration (charmbracelet/crush, 29k stars) and Verify Setup Health Check (diet103/claude-code-infrastructure-showcase, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
greatSumini (a GitHub user) maintains it in greatSumini/cc-system, which has 438 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on June 9, 2026.
Source: greatSumini/cc-system on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.