prompt-log
Write local prompt audit entries with short retention.
hook
UserPromptSubmit
github-copilot
config/hook-registry.json (entry) hooks/log-prompt.sh
Write local prompt audit entries with short retention.
Registry Entry
Section titled “Registry Entry”| Field | Value |
|---|---|
| id | prompt-log |
| logical_event | UserPromptSubmit |
| command | ./hooks/log-prompt.sh |
| timeout | 5 |
| harnesses | ["github-copilot"] |
Full hook config + command reference
{ "id": "prompt-log", "description": "Write local prompt audit entries with short retention.", "logical_event": "UserPromptSubmit", "command": "./hooks/log-prompt.sh", "timeout": 5, "harnesses": [ "github-copilot" ]}#!/bin/bashcommand -v jq &>/dev/null || exit 0INPUT=$(cat)PROMPT=$(echo "$INPUT" | jq -r '.prompt // empty')TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)LOG_DIR="$HOME/.claude/logs"mkdir -p "$LOG_DIR" && chmod 700 "$LOG_DIR"printf '%s' "$PROMPT" | jq -Rs --arg ts "$TS" '{ts: $ts, prompt: .}' >> "${LOG_DIR}/prompts-$(date +%Y-%m-%d).jsonl"# Clean up logs older than 30 daysfind "$LOG_DIR" -name "prompts-*.jsonl" -mtime +30 -delete 2>/dev/nullexit 0Resources
Section titled “Resources” Hooks Hub All repo-managed lifecycle hooks.
wagents hooks Inspect and validate hooks via CLI.