universal-hooks

universal-hooks is a skill for Claude Code, Codex from gitstq/awesome-ai-agent-skills. It costs 177 tokens per session (3,168 once invoked), scanned A, original, MIT.

A set of Git hook templates that automatically check code before commits and pushes. Git hooks are scripts that run when these actions happen.

In plain words
What is it for?
Use it to apply quality checks across JavaScript, TypeScript, Python, Rust, and Go projects, including checks for secrets and vulnerable dependencies.
Why use it?
It catches formatting, lint, type, security, dependency, license, permission, and Git naming problems before code is committed or shared.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; mentions Claude Code; mentions Codex.

Good fit Use it to apply quality checks across JavaScript, TypeScript, Python, Rust, and Go projects, including checks for secrets and vulnerable dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gitstq/awesome-ai-agent-skills/universal-hooks
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 gitstq/awesome-ai-agent-skills --skill universal-hooks
Clone the repo
git clone --depth 1 https://github.com/gitstq/awesome-ai-agent-skills

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 universal-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/gitstq/awesome-ai-agent-skills/universal-hooks/github.svg)](https://agentmods.dev/skills/gitstq/awesome-ai-agent-skills/universal-hooks)
Your own site
<a href="https://agentmods.dev/skills/gitstq/awesome-ai-agent-skills/universal-hooks"><img src="https://agentmods.dev/badge/skills/gitstq/awesome-ai-agent-skills/universal-hooks/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 universal-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/gitstq/awesome-ai-agent-skills/universal-hooks"><img src="https://agentmods.dev/badge/skills/gitstq/awesome-ai-agent-skills/universal-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,168 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.
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.00177 $0.03168
Opus 5 $0.00088 $0.01584
Sonnet 5 $0.00035 $0.00634
Haiku 4.5 $0.00018 $0.00317

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

Security

Grade A, and why

universal-hooks 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 9d 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.

skills/universal-hooks/SKILL.md · 359 lines

How it starts

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

Universal Hooks - Zero-Config Quality Gates for Every Project

Install once, forget forever. Your code quality is now on autopilot.

What Is This?

A smart hook system that auto-detects your project stack and installs exactly the quality gates you need. No configuration files to edit. No boilerplate to copy. It just works.

Supported Quality Gates

Code Quality

Gate What It Checks Languages
Formatter Code formatting consistency All (Prettier, Biome, Black, gofmt)
Linter Code quality rules & anti-patterns JS/TS (ESLint), Python (Ruff), Rust (Clippy), Go (golint)
Type Check Type correctness TypeScript, Python (pyright/mypy)
Import Sort Import ordering & cleanup JS/TS, Python

Security

Gate What It Checks
Secrets Detection API keys, tokens, passwords in code
Dependency Audit Known vulnerable dependencies
License Check License compliance of dependencies
Permissions Check File permission anomalies

Git Hygiene

Gate What It Checks
Commit Message Conventional Commits format
Branch Name Team branch naming convention
File Size Prevent large file commits
Binary Files Prevent unexpected binary commits
Merge Markers Detect leftover conflict markers
Debug Code Detect console.log, debugger, TODO/FIXME
AI Markers Track AI-generated code with markers

Auto-Detection

When you run "setup git hooks", the skill:

  1. Scans project root for config files (package.json, pyproject.toml, Cargo.toml, go.mod, etc.)
  2. Detects languages from file extensions and configs
  3. Detects tools from devDependencies and config files
  4. Generates hook scripts tailored to your stack
  5. Installs hooks via .husky/ or .git/hooks/

Detection Examples

Detected: package.json → JavaScript/TypeScript project
  ├─ eslint config found → Enable ESLint hook
  ├─ prettier config found → Enable Prettier hook
  ├─ typescript found → Enable TypeScript check hook
  └─ No conventional commits → Enable commit message hook

Detected: pyproject.toml → Python project
  ├─ ruff config found → Enable Ruff hook
  ├─ mypy config found → Enable type check hook
  └─ No black config → Suggest Biome for formatting

Detected: Cargo.toml → Rust project
  ├─ Enable cargo clippy hook
  ├─ Enable cargo fmt hook
  └─ Enable cargo test hook

Read the full file on GitHub · 359 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. 9d ago First seen · 359 lines · 177 tokens per session scan A ab960172eea2

Subscribe to this mod's changes

universal-hooks is a skill published in the GitHub repository gitstq/awesome-ai-agent-skills (1 stars, last pushed 5mo ago), licensed MIT. It adds 177 tokens to every session and 3,168 once invoked, about $0.0009 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-31.