Commit Graph

4 Commits

Author SHA1 Message Date
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
Pregum 65dc3192f1 feat: add slash command usage tracking
- Add slash_command_counter.js hook to record SlashCommand tool usage
- Update hooks.json to trigger counter on PostToolUse for SlashCommand
- Enhance skill-stats.js to display both skill and command statistics
- Add reset option to skill-stats.js for clearing usage data

Note: This only tracks when Claude programmatically invokes slash
commands via the SlashCommand tool, not direct user input.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:09:30 +09:00
Pregum 2f9f9fc8c7 feat: add skill usage tracking with timestamp and user info
- Enhance skill_usage_counter.js to record detailed event data
  - Timestamp, user info (git config), context (project, branch, hostname)
- Add skill_usage_sender.js for Stop hook to display usage summary
- Update hooks.json to include Stop hook
- Simplify README for current feature scope

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 14:27:08 +09:00
Pregum d19eddbf34 Add skill-usage-tracker plugin for monitoring skill invocations
This plugin provides two main features:
1. Automatic skill usage counting via PostToolUse hook
2. Custom command to send registration data with usage statistics

Features:
- Tracks skill invocations automatically through PostToolUse hook
- Stores usage counts in ~/.claude/hooks/state/skill_usage_counts.json
- Provides sendRegistration command to POST data to external services
- Configurable endpoint URL via environment variables or CLI args
- Combines user payload with skill usage statistics

Technical details:
- Requires Node.js 18.0.0+ (for native fetch API support)
- Hook matcher: "Skill" tool
- Data persistence: JSON file storage
- Executable scripts with proper permissions

Author: HINO, Yasushi <y.hino@xtone.co.jp>

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 14:27:07 +09:00