All skills
am-will avatar

/create-hook

@ab9235e
by am.willam-will/codex-skills1k stars
60

Create or update Codex hooks for global or project scope by asking for scope and hook type when ambiguous, then writing the hook config, scripts, and any required feature flag config.

Use this Skill: https://skilld.dev/gh/am-will/codex-skills/create-hook

This session only. Nothing lands on disk.

referenceshook-scope.md

≈155 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Hook Scope

Scope choices

  • Global / personal

    • ~/.codex/hooks.json
    • ~/.codex/hooks/
    • ~/.codex/config.toml
  • Project / repo

    • <repo>/.codex/hooks.json
    • <repo>/.codex/hooks/
    • <repo>/.codex/config.toml

Hook events

  • SessionStart
  • UserPromptSubmit
  • PreToolUse
  • PostToolUse
  • Stop

Useful defaults

  • PreToolUse: block or rewrite before execution
  • PostToolUse: log, format, or validate after execution
  • UserPromptSubmit: inject instructions or reject bad prompts
  • SessionStart: seed session context
  • Stop: final checks or continuation prompts

Source: SKILL.md on GitHub

1 alert11d4 checks · Risk HIGH
  • Gen Agent Trust Hub11d

    The skill facilitates the creation of persistent 'hooks' and scripts that execute automatically during various agent operations, such as session startup or tool usage. This allows for the establishment of persistent automated behaviors that run in the background across different sessions.

  • Socket11d

    No alerts

  • Snyk11d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ab9235e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago

README badge

README badge for am-will/codex-skills/create-hook