prompt-logging-hook-setup
Assists with the configuration and debugging of UserPromptSubmit prompt logging.
Install
mkdir -p .claude/skills/prompt-logging-hook-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14804" && unzip -o skill.zip -d .claude/skills/prompt-logging-hook-setup && rm skill.zipInstalls to .claude/skills/prompt-logging-hook-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when setting up, repairing, verifying, or troubleshooting a UserPromptSubmit prompt logging hook in a target repository, including trusted mode checks, hooks.json command wiring, git user name prompt-prefix logging, and per-user prompt log file names.Key capabilities
- →Inspect hook files in a target repository
- →Verify trusted mode requirements for .codex to load
- →Check hook command details like event name and script path
- →Validate the prompt log schema, including git_user_name and prompt_prefix
- →Verify log file output location and directory creation
- →Repair malformed hooks.json or command paths
How it works
The skill inspects repository files, checks hook configurations, validates log schemas, and verifies output paths to diagnose and fix prompt logging hook issues.
Inputs & outputs
When to use prompt-logging-hook-setup
- →Install a prompt logging hook
- →Debug a broken logging hook
- →Verify prompt log schemas
- →Setup logging for multiple users
About this skill
Prompt Logging Hook Setup
Use this skill when the user wants to install a UserPromptSubmit prompt logging hook from scratch, repair a broken setup, check why the hook is not firing, or verify that prompt logs are being written correctly for a target repository.
Workflow
- Inspect the hook files in the repository being diagnosed before proposing changes:
.codex/config.toml.codex/hooks.json- the referenced script under
.codex/hooks/
- Verify whether the repository being inspected must be opened in trusted mode for
.codexto load. - Check the hook command carefully:
- confirm the event name
- confirm the script path resolves from the repo root
- confirm the script reads JSON from stdin and handles invalid payloads safely
- Verify the log schema:
git_user_nameshould come fromgit config user.nameprompt_prefixshould match that Git user nameprompt_rawshould preserve the unprefixed user inputpromptshould contain the visible prefixed form
- Verify where output is written and whether the parent directory is created.
- prompt logs should be per Git user:
logs/{sanitized-git-user-name}-prompt-log.jsonl
- prompt logs should be per Git user:
- If the user wants a diagnosis, run
scripts/validate_hook_setup.py <repo_path>first. - If the user wants a fix, prefer the smallest repair:
- enable
codex_hooks - fix malformed
hooks.json - fix the command path
- add Git user name prefix logging
- fix log path creation
- repair the standard prompt log hook with
scripts/install_or_repair_hook.py <repo_path> - document trusted mode requirements when the repo still looks structurally correct
- enable
What Good Prompt Logging Hook Setups Usually Include
codex_hooks = truein.codex/config.toml- a valid
.codex/hooks.json - a hook script that accepts stdin JSON and exits safely on malformed payloads
- a hook script that reads Git
user.nameand stores it asgit_user_nameandprompt_prefix - a per-user log path inside the target repository, such as
logs/{sanitized-git-user-name}-prompt-log.jsonl - a short troubleshooting note explaining trusted mode
Troubleshooting Priorities
- If no hook runs at all, first suspect trusted mode or
.codex/config.toml. - If the hook is registered but no log file appears, inspect the command path and write target.
- If the script runs but log lines are missing prefix fields, inspect the Git user lookup and log schema.
- If the structure is correct but runtime behavior still fails, explicitly tell the user to reopen the repository being repaired in trusted mode because that cannot be repaired by editing files inside the repository alone.
- If the user asks for documentation, keep it short and operational rather than explanatory.
Resources
- Use
scripts/validate_hook_setup.pyfor a fast structural check. - Use
scripts/install_or_repair_hook.pyto write the standard prompt hook files into a target repository. - Read
references/troubleshooting.mdwhen you need a more explicit diagnosis checklist.
Limitations
- →The skill cannot repair trusted mode requirements by editing files inside the repository alone
- →The skill focuses on UserPromptSubmit prompt logging hooks, not other hook types
- →The skill provides operational documentation rather than explanatory content
How it compares
This skill provides specific diagnostic and repair workflows for UserPromptSubmit prompt logging hooks, unlike general file inspection or script execution.
Compared to similar skills
prompt-logging-hook-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| prompt-logging-hook-setup (this skill) | 0 | 4mo | Review | Intermediate |
| terminal-context | 5 | 7mo | Review | Advanced |
| langfuse-webhooks-events | 0 | 29d | Caution | Intermediate |
| neuralscape-adapter | 0 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
terminal-context
aelaguiz
Complete Kitty terminal awareness + control for coding agents: list panes/tabs, read scrollback, map ports→processes, parse per-pane git/last-command metadata (from shell hooks), and send commands/focus panes. Use when user mentions "another terminal", "is the server running", "what failed", or you need to run/inspect commands across panes.
langfuse-webhooks-events
jeremylongshore
Configure Langfuse webhooks and event callbacks for real-time notifications. Use when setting up trace notifications, configuring evaluation callbacks, or integrating Langfuse events with external systems. Trigger with phrases like "langfuse webhooks", "langfuse events", "langfuse notifications", "langfuse callbacks", "langfuse alerts".
neuralscape-adapter
ehfazrezwan
Add new agent framework adapters to NeuralScape's unified conversation hook system. Use when integrating a new AI client (Cursor, Copilot, custom agent), adding a client adapter, or extending the plugin to support another agent framework. Covers adapter creation, client detection, hook manifest, and
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.