Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/skill-tracker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ log_skill_access() {
main() {
local input tool_name file_path session_id offset limit
input=$(cat)
# Fast-exit before spawning jq: this hook fires on every Read, but only skill
# files are logged. Matched against the raw payload, where Windows paths arrive
# JSON-escaped ("\\"). Strictly wider than the file_path guard below, so no
# event is lost.
case "${input}" in
*'.claude/skills/'*|*'.claude\\skills\\'*) ;;
*) exit 0 ;;
esac
{ read -r tool_name; read -r file_path; read -r session_id; read -r offset; read -r limit; } < <(
printf '%s' "${input}" | jq -r '(.tool_name // ""), (.tool_input.file_path // ""), (.session_id // "unknown"), (.tool_input.offset // ""), (.tool_input.limit // "")'
) || true
Expand Down