update-hook

update-hook is a skill for Claude Code, Codex from fabis94/universal-ai-config. It costs 32 tokens per session (695 once invoked), scanned A, original, MIT.

A tool for creating, changing, and removing hook templates. Hooks are automatic commands that run when events happen during an AI session, such as a tool-use or session event.

In plain words
What is it for?
Use it to add or change automation such as linting or security checks, organise event handlers, and remove hook definitions that are no longer needed.
Why use it?
It gives you one place to organise these automatic actions and split them across files by purpose. Hook files can be combined by event when the configuration is generated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to add or change automation such as linting or security checks, organise event handlers, and remove hook definitions that are no longer needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabis94/universal-ai-config/update-hook
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fabis94/universal-ai-config --skill update-hook
Clone the repo
git clone --depth 1 https://github.com/fabis94/universal-ai-config

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabis94/universal-ai-config/update-hook.svg)](https://agentmods.dev/skills/fabis94/universal-ai-config/update-hook)
Your own site
<a href="https://agentmods.dev/skills/fabis94/universal-ai-config/update-hook"><img src="https://agentmods.dev/badge/skills/fabis94/universal-ai-config/update-hook.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 695 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Data Exfiltration · line 72
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00695
Opus 5 $0.00016 $0.00347
Sonnet 5 $0.00006 $0.00139
Haiku 4.5 $0.00003 $0.00069

Measured 8d ago against content hash aa32cbbe7df7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

update-hook scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.universal-ai-config/skills/update-hook/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Manage Hook Templates

Hooks are lifecycle automation that triggers on specific events during AI sessions. They use JSON format (not markdown).

Finding Existing Hooks

List files in <%= hookTemplatePath() %>/ to discover existing hook templates (.json files). Read them to understand what events are already handled.

Note: Hooks from multiple files are merged by event name during generation; if two files produce an identical handler for a target, only the first is emitted. You can organize hooks by concern (e.g. linting.json, security.json).

Deciding What to Do

  • Create new file: for an entirely new concern or automation area
  • Update existing file: modify handlers or add events to an existing hook file
  • Merge strategy: since hooks merge by event, you can split hooks across files for better organization without conflicts
  • Delete: remove a hook file when the automation is no longer needed

Creating a New Hook

  1. Create a .json file in <%= hookTemplatePath() %>/ with a descriptive name (e.g. linting.json)
  2. Use the standard hook JSON structure

JSON Structure

{
  "hooks": {
    "eventName": [
      {
        "command": "path/to/script.sh",
        "matcher": "ToolName",
        "timeout": 30,
        "description": "What this hook does"
      }
    ]
  }
}

Events, Handler Fields, and Per-Target Overrides

See the Hooks section in <%= instructionPath('uac-template-guide') %> for the complete reference: all universal event names with the per-target mapping table (Claude/Copilot/Cursor/Codex columns), handler fields (command, matcher, timeout, description, statusMessage), and per-target override syntax.

Use camelCase event names (e.g. sessionStart, preToolUse, postToolUse). The CLI maps them to each target's format and silently drops unsupported events.

Codex notes

Codex supports a strict subset of 6 events (sessionStart, userPromptSubmit, preToolUse, postToolUse, permissionRequest, stop) — all other universal events drop silently for Codex. Codex only reliably supports type: "command" handlers; http, mcp_tool, prompt, and agent handler types are dropped with a warning. Codex command is a single shell string, so any args array is flattened with POSIX shell escaping when emitting for Codex.

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 78 lines · 32 tokens per session scan A aa32cbbe7df7

Subscribe to this mod's changes

update-hook is a skill published in the GitHub repository fabis94/universal-ai-config (11 stars, last pushed 11d ago), licensed MIT. It adds 32 tokens to every session and 695 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens