Agent skill

Hook Creator

by greatSumini in greatSumini/cc-system

Create and configure Claude Code hooks for customizing agent behavior.

MITAuto-check: notesAgent Workflows

Install Hook Creator

skills CLI
$ npx skills add greatSumini/cc-system --skill hook-creator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install greatSumini/cc-system hook-creator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
hook-creator
GitHub stars
438
Token cost
~662 tokens
SKILL.md length
186 words
Files
3 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Create and configure Claude Code hooks for customizing agent behavior.

  • Works in 6 steps: Identify the use case - Determine what… → Select the appropriate event - Choose… → Design the hook command - Write shell… → …
  • The user wants to
  • SKILL.md covers Hook Creation Workflow, Hook Configuration Structure, Common Patterns and Quick Examples, plus 1 more section
  • Calls jq, npx and python3

What it does

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.

When your agent uses it

  • The user wants to
  • Create a new hook
  • Configure automatic formatting
  • Add file protection

Example prompts

  • “/hook-creator”

Requirements

  • Python 3
  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the use case - Determine what the hook should accomplish
  2. Select the appropriate event - Choose from available hook events (see references/hook-events.md)
  3. Design the hook command - Write shell command that processes JSON input from stdin
  4. Configure the matcher - Set tool/event filter (use * for all, or specific tool names like Bash, Edit|Write)
  5. Choose storage location - User settings (~/.claude/settings.json) or project (.claude/settings.json)
  6. Test the hook - Verify behavior with a simple test case

What it can do on your machine

Read from SKILL.md and the folder at commit 172bdd4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • npx
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    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.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~662
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:80
    **Block edits to .env files:**
  • NoteMentions a .env fileSKILL.md:82
    ,{}).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.

SKILL.md

The full file from greatSumini/cc-system at commit 172bdd4, republished under its MIT licence (© greatSumini). 186 words, ~662 tokens.

Download SKILL.mdSave it as .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.
name
hook-creator
description
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.

Hook Creator

Create Claude Code hooks that execute shell commands at specific lifecycle events.

Hook Creation Workflow

  1. Identify the use case - Determine what the hook should accomplish
  2. Select the appropriate event - Choose from available hook events (see references/hook-events.md)
  3. Design the hook command - Write shell command that processes JSON input from stdin
  4. Configure the matcher - Set tool/event filter (use * for all, or specific tool names like Bash, Edit|Write)
  5. Choose storage location - User settings (~/.claude/settings.json) or project (.claude/settings.json)
  6. Test the hook - Verify behavior with a simple test case

Hook Configuration Structure

json
{
  "hooks": {
    "<EventName>": [
      {
        "matcher": "<ToolPattern>",
        "hooks": [
          {
            "type": "command",
            "command": "<shell-command>"
          }
        ]
      }
    ]
  }
}

Common Patterns

Reading Input Data

Hooks receive JSON via stdin. Use jq to extract fields:

bash
# 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'
Exit Codes for PreToolUse
  • 0 - Allow the tool to proceed
  • 2 - Block the tool and provide feedback to Claude
Matcher Patterns
  • * - Match all tools
  • Bash - Match only Bash tool
  • Edit|Write - Match Edit or Write tools
  • Read - Match Read tool

Quick Examples

Log all bash commands:

bash
jq -r '"\(.tool_input.command)"' >> ~/.claude/bash-log.txt

Auto-format TypeScript after edit:

bash
jq -r '.tool_input.file_path' | { read f; [[ "$f" == *.ts ]] && npx prettier --write "$f"; }

Block edits to .env files:

bash
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)"

Resources

  • Hook Events Reference: See references/hook-events.md for detailed event documentation with input/output schemas
  • Example Configurations: See references/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

Files

SKILL.md and 2 other files (references) in .claude/skills/hook-creator of greatSumini/cc-system.

  • SKILL.md
  • references/examples.md
  • references/hook-events.md

Open the folder on GitHubat commit 172bdd4

Compare with similar skills

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.

Hook Creator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hook Creator this skillgreatSumini/cc-system438—~662Automated safety check: NotesMIT
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k11 repos~4.1kAutomated safety check: NotesApache-2.0
Plugin Settings Patternanthropics/claude-plugins-official38k7 repos~3kAutomated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Verify Setup Health Checkdiet103/claude-code-infrastructure-showcase10k—~363Automated safety check: PassMIT
Claude SmartReflexioAI/claude-smart783—~439Automated safety check: PassApache-2.0

Similar skills

  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Plugin Settings Pattern

    anthropics/claude-plugins-official

    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.

    38k GitHub starsUsed in 7 repos~3k tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    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.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Verify Setup Health Check

    diet103/claude-code-infrastructure-showcase

    Run the infrastructure health check and fix anything that fails

    10k GitHub stars~363 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Claude Smart

    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.

    783 GitHub stars~439 tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Creating An Agent

    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…

    250 GitHub stars~2k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from greatSumini/cc-system

All 12 skills in this repo
  • Slash Command Creator

    greatSumini/cc-system

    Guide for creating Claude Code slash commands. An agent skill from greatSumini/cc-system.

    438 GitHub stars~773 tokensUpdated 4 mo ago
    Auto-check passed
  • Subagent Creator

    greatSumini/cc-system

    Create specialized Claude Code sub-agents with custom system prompts and tool configurations.

    438 GitHub stars~958 tokensUpdated 4 mo ago
    Auto-check passed
  • Cc Usage Audit

    greatSumini/cc-system

    한 프로젝트에서 사용자가 Claude Code에 입력한 프롬프트·작업 이력을 분석해 (1) 사용 패턴 정량화, (2) 사용자의 개발 철학 추출(근거 인용), (3) 그 철학을 렌즈로 한 메타 시스템(하니스·게이트·CI·프로세스) audit, (4) 우선순위가 매겨진 개선점 발굴을 수행한다.

    438 GitHub stars~586 tokensUpdated 4 mo ago
    Auto-check passed
  • Youtube Collector

    greatSumini/cc-system

    유튜브 채널을 등록하고 새 컨텐츠를 수집하여 자막 기반 요약을 생성하는 skill. An agent skill from greatSumini/cc-system.

    438 GitHub stars~846 tokensUpdated 4 mo ago
    Auto-check passed
  • Ship

    greatSumini/cc-system

    지금까지의 작업을 한 번에 출하한다 — 커밋 → push → PR 생성 → squash merge. An agent skill from greatSumini/cc-system.

    438 GitHub stars~697 tokensUpdated 4 mo ago
    Auto-check passed
  • Gmail

    greatSumini/cc-system

    gogcli를 사용하여 Gmail 메일을 검색, 조회, 발송하는 skill. An agent skill from greatSumini/cc-system.

    438 GitHub stars~838 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Categories

Questions about Hook Creator

What does Hook Creator do?

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.

When should I use Hook Creator?

Hook Creator fits situations like: the user wants to; create a new hook; configure automatic formatting; add file protection.

How do I install Hook Creator in Claude Code?

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.

How do I install Hook Creator in Codex?

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.

Can I use Hook Creator in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Hook Creator need to run?

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.

Does Hook Creator access the network?

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.

Is Hook Creator safe to install?

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.

What licence does Hook Creator use?

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.

How many tokens does Hook Creator use?

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.

What are the alternatives to Hook Creator?

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.

Who maintains Hook Creator?

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.