update-hook

update-hook is a skill for Claude Code from fabis94/universal-ai-config. It costs 32 tokens per session (719 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 Code

Written for Claude Code: $CLAUDE_PROJECT_DIR variable. 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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for update-hook

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 719 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.00719
Opus 5.5 $0.00013 $0.00288
Sonnet 5.5 $0.00006 $0.00144
Haiku 4.5 $0.00003 $0.00072

Measured yesterday against content hash 2e2e02f1f830, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 yesterday.

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

Use camelCase event names (e.g. sessionStart, preToolUse, postToolUse). The CLI maps them to each target's format and silently drops events a target doesn't support. Handler fields (command, matcher, timeout) accept per-target values.

Before using an event, handler type or field, check <%= docPath('uac/hooks') %>. It has the per-target event table, which handler types each target runs (non-command types are dropped where unsupported), every handler field with its targets, matcher syntax and tool names per target (give a tool matcher per-target values, as in the example below), and per-target caveats (Codex trust, Cursor and Copilot also running Claude's hooks).

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. yesterday Changed · +4 lines 2e2e02f1f830
  2. 2d ago Changed · -4 lines 9a12ed55108c
  3. 2mo 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 (14 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 719 once invoked, about $0.0001 per session on Opus 5.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

update-hook compared with skills from other repositories

update-hook next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
update-hookfabis94/universal-ai-configSkill142d agoMITA32Claude Code
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79ktodayMITA200Claude Code, Codex
playwright-climicrosoft/playwrightSkill99ktodayApache-2.0A19Claude Code
systematic-debuggingobra/superpowersSkill314k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code
chat-pet-sprite-creationmicrosoft/vscodeSkill195ktodayMITA53Claude Code, Codex