mirror of
https://github.com/xtone/ai_development_tools.git
synced 2026-09-14 20:07:12 +08:00
0ce3036801
- 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>
47 lines
925 B
JSON
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"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|