PR

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.zip

Installs 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.
255 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
A request to set up, repair, verify, or troubleshoot a UserPromptSubmit prompt logging hook in a target repository
You get back
Diagnosis, repair steps, or verification of the prompt logging hook setup

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

  1. Inspect the hook files in the repository being diagnosed before proposing changes:
    • .codex/config.toml
    • .codex/hooks.json
    • the referenced script under .codex/hooks/
  2. Verify whether the repository being inspected must be opened in trusted mode for .codex to load.
  3. 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
  4. Verify the log schema:
    • git_user_name should come from git config user.name
    • prompt_prefix should match that Git user name
    • prompt_raw should preserve the unprefixed user input
    • prompt should contain the visible prefixed form
  5. 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
  6. If the user wants a diagnosis, run scripts/validate_hook_setup.py <repo_path> first.
  7. 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

What Good Prompt Logging Hook Setups Usually Include

  • codex_hooks = true in .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.name and stores it as git_user_name and prompt_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.py for a fast structural check.
  • Use scripts/install_or_repair_hook.py to write the standard prompt hook files into a target repository.
  • Read references/troubleshooting.md when 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.

SkillInstallsUpdatedSafetyDifficulty
prompt-logging-hook-setup (this skill)04moReviewIntermediate
terminal-context57moReviewAdvanced
langfuse-webhooks-events029dCautionIntermediate
neuralscape-adapter03moReviewAdvanced

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.

567

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".

00

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

00

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.

353585

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.

81334

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.

106130

Search skills

Search the agent skills registry