Files
Pregum 0ce3036801 feat: add UserPromptSubmit hook for direct slash command tracking
- Add user_prompt_command_counter.js to detect slash commands in user prompts
- Update hooks.json with UserPromptSubmit hook configuration
- Records events with source: "user_prompt" to distinguish from tool invocations

This enables tracking when users directly type slash commands (e.g., /command),
which previously wasn't captured by the PostToolUse SlashCommand hook.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:16:07 +09:00

47 lines
925 B
JSON

{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/user_prompt_command_counter.js"
}
]
}
],
"PostToolUse": [
{
"matcher": "Skill",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/skill_usage_counter.js"
}
]
},
{
"matcher": "SlashCommand",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/slash_command_counter.js"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/skill_usage_sender.js"
}
]
}
]
}
}