スキル一覧に戻る
chkim-su

hook-system

by chkim-su

1🍴 0📅 2026年1月16日
GitHubで見るManusで実行

SKILL.md


name: hook-system description: Claude Code Hook system entry point. Guides you to the right skill based on your needs. allowed-tools: ["Read"]

Hook System Guide

Entry point for Claude Code Hook system. Routes to appropriate skills.

What are Hooks?

Scripts that auto-execute at specific events during Claude Code sessions.

User Input → [UserPromptSubmit Hook] → Claude Processing
          → [PreToolUse Hook] → Tool Execution → [PostToolUse Hook]
          → Claude Response → [Stop Hook] → End

Skill Selection Guide

QuestionSkill
What can hooks do?hook-capabilities
Need pattern/implementation exampleshook-capabilities → references
Need templates for quick starthook-templates
Want to call LLM from hookshook-sdk-integration
Need cost optimizationhook-sdk-integration
Want background executionhook-sdk-integration

Quick Decision Tree

Hook Question
    │
    ├─ "What's possible?" ──────→ hook-capabilities
    │
    ├─ "How to implement?" ─────→ hook-capabilities/patterns-detailed.md
    │
    ├─ "Need templates?" ───────→ hook-templates
    │
    ├─ "LLM evaluation?" ───────→ hook-sdk-integration
    │
    └─ "Real project examples?" → hook-capabilities/real-world-examples.md
                                  hook-sdk-integration/real-world-projects.md

Hook Skills Architecture

                    hook-system (You are here)
                         │ Entry Point
         ┌───────────────┼───────────────┐
         ▼               ▼               ▼
   hook-capabilities  hook-templates  hook-sdk-integration
   ┌─────────────┐   ┌────────────┐   ┌─────────────────┐
   │ WHAT/WHY   │   │ HOW       │   │ ADVANCED       │
   │ • Events    │   │ • Gate    │   │ • LLM calls    │
   │ • Patterns  │   │ • Side Fx │   │ • Background   │
   │ • Debugging │   │ • Orch.   │   │ • Cost optim.  │
   └─────────────┘   └────────────┘   └─────────────────┘
         │                                    │
         └──────────► workflow-state-patterns ◄┘
                      (Multi-phase flows)
SkillRoleWhen to Use
hook-capabilitiesEvents, patterns, debuggingFirst stop - understanding what's possible
hook-templatesGate/Side-effect/Orchestration templatesImplementation - copy-paste ready code
hook-sdk-integrationSDK/CLI LLM callsAdvanced - AI evaluation in hooks
workflow-state-patternsState-based multi-phase workflowsComplex - chained automation with gates

Core Concepts

Activation Reliability

MethodSuccess RateWhen to Use
Hook100%Forced automation
Hook + Forced Eval84%Skill activation
Skill (default)~20%Simple suggestions
MCP (all tools)~13%Many tools loaded
MCP (Tool Search)~43-88%Enable enableToolSearch

Events (10 types)

EventCan BlockUse For
SessionStartInitialization
UserPromptSubmitContext injection
PreToolUseGate (block/modify)
PostToolUseSide Effects
StopTermination control

Data Passing

# Passed via stdin JSON (NOT environment variables!)
INPUT=$(cat)
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id')

Blocking

exit 0   # Allow
exit 2   # Block (stderr → feedback to Claude)

Enable for better tool selection (13% → 43%+):

{
  "mcpServers": {
    "my-server": {
      "command": "...",
      "enableToolSearch": true
    }
  }
}

References

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です