Commit Graph

8 Commits

Author SHA1 Message Date
Pregum 114c3ec89f fix(skill-usage-tracker): PRフィードバック対応 - エラーハンドリング、安全性、原子性の改善
- reset コマンドに --force フラグを追加し、誤操作を防止
- reset 実行前にバックアップを自動作成
- JSONL読み込み時の行ごとエラーハンドリングを追加
- 大量データ(1000件超)同期時の警告メッセージを追加
- ファイルロック機構を実装し、同時書き込みによるデータ破損を防止
- バージョンを0.4.2に更新

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +09:00
Pregum 81a7a8fe1e feat(skill-usage-tracker): setupコマンドを追加
notion_config.jsonを簡単に作成できるsetupサブコマンドを追加。

使用例:
  skill-stats.js setup <skill_db_id> <command_db_id>

- UUID形式のバリデーション
- 既存設定の表示
- 設定完了後の案内メッセージ

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +09:00
Pregum 2d77575f93 fix(skill-usage-tracker): データベースIDを設定ファイル管理に変更
ハードコードされていたNotion DB IDをnotion_config.jsonで管理するように変更。
公開リポジトリでの機密情報露出を防止。(Issue #71)

- loadNotionConfig()関数を復活
- 設定ファイルがない場合に設定方法を案内
- バージョンを0.4.1に更新

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +09:00
Pregum 899236d259 feat(skill-usage-tracker): Notion MCP直接呼び出しに変更
/skill-stats sync を実行するとClaudeが自動的にNotion MCPを呼び出して
データを同期するように変更。DB IDをskillファイルに埋め込み、
notion_config.json設定ファイルを不要に。

- setup サブコマンドを削除
- sync出力形式をNotion MCP用SQLite風形式に変更
- loadNotionConfig(), outputSetupInfo() を削除

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +09:00
Pregum a8ef145de3 feat(skill-usage-tracker): add Notion database sync support
Add /skill-stats setup and /skill-stats sync commands to enable
syncing usage events to Notion databases for team-wide analytics.

- setup: outputs Notion database schema for creation via MCP
- sync: outputs unsynced events with Notion-formatted properties
- Supports sync_state.json for tracking synced lines
- Supports notion_config.json for database IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +09:00
Pregum 162216dc5a feat(skill-usage-tracker): データ保存形式をJSONからJSONLに移行
- 保存先を ~/.claude/hooks/state/ から ~/.claude/hooks/logs/ に変更
- ファイル形式を1行1イベントのJSONL形式に変更し追記効率を向上
- マイグレーションスクリプト bin/migrate-to-jsonl.js を追加
- バージョンを 0.1.1 から 0.2.0 に更新

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:25:43 +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 9c7c52ed2e feat: add skill-stats command for usage summary
- Add bin/skill-stats.js for displaying skill usage statistics
- Add commands/skill-stats.md as custom slash command

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

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