{"id":1280,"date":"2026-09-29T13:25:21","date_gmt":"2026-09-29T04:25:21","guid":{"rendered":"https:\/\/cg-method.com\/ai\/?p=1280"},"modified":"2026-09-29T13:25:21","modified_gmt":"2026-09-29T04:25:21","slug":"claude-code-hooks","status":"publish","type":"post","link":"https:\/\/cg-method.com\/ai\/claude-code-hooks\/","title":{"rendered":"Claude Code\u2502Hooks\u306e\u8a2d\u5b9a\u65b9\u6cd5\uff5c\u30d5\u30a1\u30a4\u30eb\u4fdd\u5b58\u5f8c\u306e\u51e6\u7406\u3068\u5371\u306a\u3044\u30b3\u30de\u30f3\u30c9\u306e\u6b62\u3081\u65b9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hooks\uff08\u30d5\u30c3\u30af\uff09\u306f\u3001Claude Code\u304c\u6c7a\u307e\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u81ea\u52d5\u7684\u306b\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CLAUDE.md \u306b\u66f8\u3044\u305f\u6307\u793a\u306f\u5b88\u3089\u308c\u306a\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30d5\u30c3\u30af\u306fClaude\u306e\u5224\u65ad\u306b\u95a2\u4fc2\u306a\u304f\u5fc5\u305a\u52d5\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>\u66f8\u304f\u5834\u6240\uff1asettings.json \u306e hooks \u306e\u4e2d<\/li>\n\n\n<li>\u3088\u304f\u4f7f\u3046\u30bf\u30a4\u30df\u30f3\u30b0\uff1a\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u524d\uff08PreToolUse\uff09\u3068\u4f7f\u3063\u305f\u5f8c\uff08PostToolUse\uff09<\/li>\n\n\n<li>\u6b62\u3081\u305f\u3044\u3068\u304d\uff1a\u30d5\u30c3\u30af\u306e\u30b3\u30de\u30f3\u30c9\u3092\u7d42\u4e86\u30b3\u30fc\u30c92\u3067\u7d42\u308f\u3089\u305b\u308b<\/li>\n\n\n<li>\u78ba\u8a8d\uff1a\u5bfe\u8a71\u4e2d\u306b \/hooks \u3067\u4e00\u89a7\u3092\u898b\u308b<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u306f\u30012026\u5e749\u670829\u65e5\u6642\u70b9\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u3001Windows\u4e0a\u306e Claude Code v2.1.284 \u3067\u5b9f\u969b\u306b\u52d5\u304b\u3057\u305f\u7d50\u679c\u306b\u3082\u3068\u3065\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30c3\u30af\u304c\u52d5\u304f\u30bf\u30a4\u30df\u30f3\u30b0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30c3\u30af\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u3068\u547c\u3070\u308c\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3054\u3068\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><thead><tr><th style=\"min-width:8em !important\">\u30a4\u30d9\u30f3\u30c8<\/th><th>\u52d5\u304f\u30bf\u30a4\u30df\u30f3\u30b0<\/th><\/tr><\/thead><tbody><tr><td>SessionStart<\/td><td>\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u59cb\u3081\u305f\u3068\u304d\u30fb\u518d\u958b\u3057\u305f\u3068\u304d<\/td><\/tr><tr><td>UserPromptSubmit<\/td><td>\u3053\u3061\u3089\u304c\u6307\u793a\u3092\u9001\u3063\u305f\u76f4\u5f8c\u3001Claude\u304c\u8aad\u3080\u524d<\/td><\/tr><tr><td>PreToolUse<\/td><td>\u30c4\u30fc\u30eb\uff08\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u3084\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u8fbc\u307f\uff09\u3092\u4f7f\u3046\u76f4\u524d\u3002\u6b62\u3081\u3089\u308c\u308b<\/td><\/tr><tr><td>PermissionRequest<\/td><td>\u30c4\u30fc\u30eb\u3092\u4f7f\u3046\u306e\u306b\u8a31\u53ef\u304c\u8981\u308b\u3068\u304d<\/td><\/tr><tr><td>PostToolUse<\/td><td>\u30c4\u30fc\u30eb\u3092\u4f7f\u3044\u7d42\u3048\u3066\u6210\u529f\u3057\u305f\u3042\u3068<\/td><\/tr><tr><td>PostToolUseFailure<\/td><td>\u30c4\u30fc\u30eb\u304c\u5931\u6557\u3057\u305f\u3042\u3068<\/td><\/tr><tr><td>Notification<\/td><td>Claude Code\u304c\u901a\u77e5\u3092\u51fa\u3059\u3068\u304d<\/td><\/tr><tr><td>SubagentStart\u30fbSubagentStop<\/td><td>\u30b5\u30d6\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u59cb\u307e\u3063\u305f\u3068\u304d\u30fb\u7d42\u308f\u3063\u305f\u3068\u304d<\/td><\/tr><tr><td>Stop<\/td><td>Claude\u304c\u8fd4\u4e8b\u3092\u66f8\u304d\u7d42\u3048\u305f\u3068\u304d<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Claude Code\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u300cAutomate actions with hooks\u300d\u304b\u3089\u4e3b\u306a\u3082\u306e\u3092\u629c\u7c8b<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u307b\u304b\u306b\u3082\u3001\u5727\u7e2e\u306e\u524d\u3084\u8a2d\u5b9a\u306e\u5909\u66f4\u6642\u306a\u3069\u3001\u7d30\u304b\u3044\u30a4\u30d9\u30f3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">settings.json\u306e\u66f8\u304d\u65b9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30c3\u30af\u306f\u3001settings.json \u306e hooks \u306e\u4e2d\u306b\u3001\u30a4\u30d9\u30f3\u30c8\u540d\u3054\u3068\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\"><code>{\n  \"hooks\": {\n    \"PostToolUse\": [\n      {\n        \"matcher\": \"Write|Edit\",\n        \"hooks\": [\n          { \"type\": \"command\", \"command\": \"python .claude\/hooks\/log_edit.py\" }\n        ]\n      }\n    ]\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">matcher \u306f\u3001\u3069\u306e\u30c4\u30fc\u30eb\u306e\u3068\u304d\u306b\u52d5\u304b\u3059\u304b\u306e\u6307\u5b9a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Write|Edit \u306a\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u3044\u305f\u3068\u304d\u3068\u76f4\u3057\u305f\u3068\u304d\u306b\u52d5\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a7a\u306b\u3059\u308b\u3068\u3001\u305d\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u305f\u3073\u306b\u6bce\u56de\u52d5\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f8\u304f\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u81ea\u5206\u306e\u5168\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306a\u3089\u30db\u30fc\u30e0\u306e .claude\/settings.json\u3001\u30c1\u30fc\u30e0\u3067\u5171\u6709\u3059\u308b\u306a\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e .claude\/settings.json \u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3059\u3067\u306b hooks \u304c\u3042\u308b\u5834\u5408\u306f\u3001\u4e38\u3054\u3068\u7f6e\u304d\u63db\u3048\u305a\u306b\u3001\u30a4\u30d9\u30f3\u30c8\u540d\u3092\u6a2a\u306b\u4e26\u3079\u3066\u8db3\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30c3\u30af\u306b\u6e21\u3055\u308c\u308b\u60c5\u5831<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30c3\u30af\u306e\u30b3\u30de\u30f3\u30c9\u306b\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u4e2d\u8eab\u304cJSON\u3067\u6a19\u6e96\u5165\u529b\u304b\u3089\u6e21\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\"><code>{\n  \"session_id\": \"abc123\",\n  \"cwd\": \"\/Users\/sarah\/myproject\",\n  \"hook_event_name\": \"PreToolUse\",\n  \"tool_name\": \"Bash\",\n  \"tool_input\": {\n    \"command\": \"npm test\"\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u306f\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u8f09\u3063\u3066\u3044\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">tool_name \u3067\u4f7f\u3046\u30c4\u30fc\u30eb\u304c\u3001tool_input \u3067\u305d\u306e\u4e2d\u8eab\uff08\u30b3\u30de\u30f3\u30c9\u3084\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\uff09\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b1\uff1a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u3044\u305f\u3089\u8a18\u9332\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u3067\u3001\u66f8\u304d\u8fbc\u307e\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092 hooks.log \u306b\u6b8b\u3059\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\"><code>import json, sys, datetime\ndata = json.load(sys.stdin)\npath = data.get(\"tool_input\", {}).get(\"file_path\", \"\")\nwith open(\"hooks.log\", \"a\", encoding=\"utf-8\") as f:\n    f.write(f\"{datetime.datetime.now():%H:%M:%S} {data['tool_name']} {path}\\n\")<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3092 .claude\/hooks\/log_edit.py \u306b\u7f6e\u304d\u3001\u4e0a\u306e settings.json \u306e PostToolUse \u304b\u3089\u547c\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Claude\u306b hello.txt \u3092\u4f5c\u3063\u3066\u3082\u3089\u3046\u3068\u3001hooks.log \u306b\u6b21\u306e1\u884c\u304c\u5897\u3048\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>13:24:17 Write C:\\demo\\hooks-demo\\hello.txt<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u3058\u5f62\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u3044\u305f\u3042\u3068\u306b\u6574\u5f62\u30c4\u30fc\u30eb\u3084\u30c6\u30b9\u30c8\u3092\u52d5\u304b\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b2\uff1a\u5371\u306a\u3044\u30b3\u30de\u30f3\u30c9\u3092\u6b62\u3081\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PreToolUse \u306e\u30d5\u30c3\u30af\u304c\u7d42\u4e86\u30b3\u30fc\u30c92\u3067\u7d42\u308f\u308b\u3068\u3001\u305d\u306e\u30c4\u30fc\u30eb\u306e\u5b9f\u884c\u306f\u6b62\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u3068\u304d\u6a19\u6e96\u30a8\u30e9\u30fc\u306b\u66f8\u3044\u305f\u6587\u306f\u3001\u7406\u7531\u3068\u3057\u3066Claude\u306b\u4f1d\u308f\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\"><code>import json, sys\ndata = json.load(sys.stdin)\ncmd = data.get(\"tool_input\", {}).get(\"command\", \"\")\nif \"rm \" in cmd:\n    print(\"rm \u306f\u4f7f\u308f\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u6d88\u3059\u30d5\u30a1\u30a4\u30eb\u306f\u4eba\u304c\u78ba\u304b\u3081\u307e\u3059\u3002\", file=sys.stderr)\n    sys.exit(2)<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\"><code>{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          { \"type\": \"command\", \"command\": \"python .claude\/hooks\/block_rm.py\" }\n        ]\n      }\n    ]\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Claude\u306b\u300crm hello.txt \u3067\u6d88\u3057\u3066\u300d\u3068\u983c\u3093\u3060\u7d50\u679c\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\u6d88\u305b\u307e\u305b\u3093\u3067\u3057\u305f \u2014 `.claude\/hooks\/block_rm.py` \u306e PreToolUse \u30d5\u30c3\u30af\u304c `rm` \u3092\u30d6\u30ed\u30c3\u30af\u3057\u305f\u305f\u3081\u3067\u3059\uff08\u300crm \u306f\u4f7f\u308f\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u6d88\u3059\u30d5\u30a1\u30a4\u30eb\u306f\u4eba\u304c\u78ba\u304b\u3081\u307e\u3059\u3002\u300d\uff09\u3002`hello.txt` \u306f\u6b8b\u3063\u3066\u3044\u307e\u3059\u3002<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u3066\u3044\u3066\u3082\u3001\u30d5\u30c3\u30af\u304c\u5148\u306b\u6b62\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u3067\u898b\u3066\u3044\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u4f7f\u3046\u3068\u304d\u306f\u6b62\u3081\u305f\u3044\u30b3\u30de\u30f3\u30c9\u3092\u3082\u3046\u5c11\u3057\u4e01\u5be7\u306b\u5224\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7d42\u4e86\u30b3\u30fc\u30c9\u3068JSON\u306e\u8fd4\u3057\u65b9<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><thead><tr><th style=\"min-width:8em !important\">\u7d42\u308f\u308a\u65b9<\/th><th>\u3069\u3046\u306a\u308b\u304b<\/th><\/tr><\/thead><tbody><tr><td>\u7d42\u4e86\u30b3\u30fc\u30c90<\/td><td>\u305d\u306e\u307e\u307e\u9032\u3080<\/td><\/tr><tr><td>\u7d42\u4e86\u30b3\u30fc\u30c92<\/td><td>\u305d\u306e\u64cd\u4f5c\u3092\u6b62\u3081\u308b\u3002\u6a19\u6e96\u30a8\u30e9\u30fc\u306e\u6587\u304c\u7406\u7531\u3068\u3057\u3066\u4f1d\u308f\u308b\uff08\u6b62\u3081\u3089\u308c\u306a\u3044\u30a4\u30d9\u30f3\u30c8\u3082\u3042\u308b\uff09<\/td><\/tr><tr><td>\u305d\u308c\u4ee5\u5916\u306e\u7d42\u4e86\u30b3\u30fc\u30c9<\/td><td>\u6b62\u3081\u305a\u306b\u9032\u307f\u3001\u30d5\u30c3\u30af\u306e\u30a8\u30e9\u30fc\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u3082\u3063\u3068\u7d30\u304b\u304f\u6c7a\u3081\u305f\u3044\u3068\u304d\u306f\u3001\u7d42\u4e86\u30b3\u30fc\u30c90\u3067\u7d42\u308f\u308a\u3001JSON\u3092\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\"><code>{\n  \"hookSpecificOutput\": {\n    \"hookEventName\": \"PreToolUse\",\n    \"permissionDecision\": \"deny\",\n    \"permissionDecisionReason\": \"grep \u3067\u306f\u306a\u304f rg \u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\"\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">permissionDecision \u306f\u3001deny\uff08\u6b62\u3081\u308b\uff09\u3001allow\uff08\u78ba\u8a8d\u3092\u7701\u304f\uff09\u3001ask\uff08\u3044\u3064\u3082\u3069\u304a\u308a\u78ba\u8a8d\u3059\u308b\uff09\u304b\u3089\u9078\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d42\u4e86\u30b3\u30fc\u30c92\u3068JSON\u306f\u30011\u3064\u306e\u30d5\u30c3\u30af\u3067\u3069\u3061\u3089\u304b\u7247\u65b9\u3060\u3051\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows\u3067\u5165\u529b\u5f85\u3061\u3092\u77e5\u3089\u305b\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Claude\u304c\u3053\u3061\u3089\u306e\u5165\u529b\u3092\u5f85\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u77e5\u3089\u305b\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\"><code>{\n  \"hooks\": {\n    \"Notification\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"powershell.exe -Command \\\"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')\\\"\"\n          }\n        ]\n      }\n    ]\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306f\u753b\u9762\u306e\u9685\u306e\u901a\u77e5\u3067\u306f\u306a\u304f\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u958b\u304f\u306e\u3067\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u5f8c\u308d\u306b\u96a0\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">matcher \u3092 permission_prompt \u306b\u3059\u308b\u3068\u3001\u8a31\u53ef\u306e\u78ba\u8a8d\u3067\u5f85\u3063\u3066\u3044\u308b\u3068\u304d\u3060\u3051\u306b\u7d5e\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u52d5\u304b\u306a\u3044\u3068\u304d\u306e\u78ba\u304b\u3081\u65b9<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>\u5bfe\u8a71\u4e2d\u306b \/hooks \u3092\u958b\u304d\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u6a2a\u306b\u8a2d\u5b9a\u306e\u6570\u304c\u51fa\u3066\u3044\u308b\u304b\u3092\u898b\u308b<\/li>\n\n\n<li>settings.json \u304cJSON\u3068\u3057\u3066\u6b63\u3057\u3044\u304b\uff08\u672b\u5c3e\u306e\u30ab\u30f3\u30de\u306a\u3069\uff09\u3092\u898b\u308b<\/li>\n\n\n<li>\u30d5\u30c3\u30af\u306e\u30b3\u30de\u30f3\u30c9\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u5358\u72ec\u3067\u5b9f\u884c\u3057\u3066\u52d5\u304f\u304b\u3092\u898b\u308b<\/li>\n\n\n<li>claude &#8211;debug \u3067\u8d77\u52d5\u3057\u3001\u30d5\u30c3\u30af\u306e\u6a19\u6e96\u30a8\u30e9\u30fc\u306e\u5168\u6587\u3092\u898b\u308b<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30c3\u30af\u306f\u3001\u81ea\u5206\u306ePC\u306e\u6a29\u9650\u3067\u305d\u306e\u307e\u307e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307b\u304b\u306e\u4eba\u304c\u66f8\u3044\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e settings.json \u3092\u4f7f\u3046\u3068\u304d\u306f\u3001\u4e2d\u8eab\u3092\u8aad\u3093\u3067\u304b\u3089\u4fe1\u983c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">settings.json \u306e\u7f6e\u304d\u5834\u6240\u3068\u512a\u5148\u9806\u4f4d\u306f\u3001<a href=\"https:\/\/cg-method.com\/ai\/claude-code-settings-json\/\">Claude Code\u306esettings.json\u306e\u5834\u6240\u3068\u512a\u5148\u9806\u4f4d<\/a>\u3067\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>\u30d5\u30c3\u30af\u306f\u3001Claude\u306e\u5224\u65ad\u306b\u95a2\u4fc2\u306a\u304f\u6c7a\u307e\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u5fc5\u305a\u52d5\u304f<\/li>\n\n\n<li>settings.json \u306e hooks \u306b\u3001\u30a4\u30d9\u30f3\u30c8\u540d\u30fbmatcher\u30fb\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304f<\/li>\n\n\n<li>\u30a4\u30d9\u30f3\u30c8\u306e\u4e2d\u8eab\u306fJSON\u3067\u6a19\u6e96\u5165\u529b\u304b\u3089\u53d7\u3051\u53d6\u308b<\/li>\n\n\n<li>PreToolUse \u3067\u7d42\u4e86\u30b3\u30fc\u30c92\u3092\u8fd4\u3059\u3068\u3001\u305d\u306e\u64cd\u4f5c\u3092\u6b62\u3081\u3089\u308c\u308b<\/li>\n\n\n<li>\u52d5\u304b\u306a\u3044\u3068\u304d\u306f \/hooks \u3068 claude &#8211;debug \u3067\u78ba\u304b\u3081\u308b<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u53c2\u8003\uff1aClaude Code\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u300cAutomate actions with hooks\u300d\uff082026\u5e749\u670829\u65e5\u306b\u78ba\u8a8d\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hooks\uff08\u30d5\u30c3\u30af\uff09\u306f\u3001Claude Code\u304c\u6c7a\u307e\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u81ea\u52d5\u7684\u306b\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002 CLAUDE.md \u306b\u66f8\u3044\u305f\u6307\u793a\u306f\u5b88\u3089\u308c\u306a\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30d5\u30c3\u30af\u306fClaude\u306e\u5224\u65ad\u306b\u95a2\u4fc2\u306a\u304f\u5fc5\u305a\u52d5\u304d\u307e\u3059\u3002 \u3053\u306e\u8a18 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1281,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"Claude Code\u306eHooks\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3068\u4f7f\u7528\u4f8b","ssp_meta_description":"Claude Code\u306eHooks\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u3044\u305f\u3042\u3068\u306b\u81ea\u52d5\u3067\u30b3\u30de\u30f3\u30c9\u3092\u52d5\u304b\u3057\u305f\u308a\u3001\u5371\u306a\u3044\u30b3\u30de\u30f3\u30c9\u3092\u6b62\u3081\u305f\u308a\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e\u3001settings.json\u306e\u66f8\u304d\u65b9\u3001\u7d42\u4e86\u30b3\u30fc\u30c92\u306e\u610f\u5473\u3092\u5b9f\u4f8b\u3064\u304d\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002"},"categories":[21],"tags":[],"class_list":["post-1280","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-claude"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/posts\/1280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/comments?post=1280"}],"version-history":[{"count":1,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/posts\/1280\/revisions"}],"predecessor-version":[{"id":1282,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/posts\/1280\/revisions\/1282"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/media\/1281"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/media?parent=1280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/categories?post=1280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/ai\/wp-json\/wp\/v2\/tags?post=1280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}