synthesis-git-hooks

synthesis-git-hooks is a skill for Claude Code, Codex from synthesisengineering/synthesis-skills. It costs 171 tokens per session (3,615 once invoked), scanned A, original, Apache-2.0.

A YAML-configured pre-commit checker for repositories. A pre-commit checker runs before a Git commit and can stop it when staged files break defined rules about exposure, credentials, or project coordination.

In plain words
What is it for?
It helps inspect staged paths, scan for credentials and exposure-sensitive patterns, enforce coordination claims, and record approved exceptions.
Why use it?
It catches sensitive content and unauthorized file changes before they are saved in a commit.

Skill for Claude CodeCodex

Written for Claude Code and Codex: PreToolUse hook event, but also agents/openai.yaml present. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

Part of the synthesis-skills plugin — 63 skills, 4 hooks shipped together

Good fit It helps inspect staged paths, scan for credentials and exposure-sensitive patterns, enforce coordination claims, and record approved exceptions.

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

Made for: Claude Code, Codex.

Or install synthesis-skills, the plugin that ships this one along with the rest of its 63 skills, 4 hooks.

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 synthesis-git-hooks

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/synthesisengineering/synthesis-skills/synthesis-git-hooks"><img src="https://agentmods.dev/badge/skills/synthesisengineering/synthesis-skills/synthesis-git-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,615 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: 2 findings, 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 Tool Misuse · line 168
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Rogue Agent · line 50
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00171 $0.03615
Opus 5 $0.00086 $0.01808
Sonnet 5 $0.00034 $0.00723
Haiku 4.5 $0.00017 $0.00362

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

Security

Grade A, and why

synthesis-git-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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/_load_config.py, scripts/install.sh, scripts/test_pre_commit.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/synthesis-git-hooks/SKILL.md · 236 lines

How it starts

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

Synthesis Git Hooks

A YAML-driven pre-commit policy engine. Part of the synthesis-engineering operational layer — deterministic enforcement that catches credential leaks and exposure-sensitive content at the commit boundary, before the diff persists.

The engine is a Bash boundary plus standard-library Python sidecars. The policy is data — a YAML file at ~/.synthesis/git-hook-config.yaml that anyone adopting synthesis engineering fills in with personal-remote patterns, client names, internal URLs, and optionally a coordination-board path.

v2.4.0 — Coordination claims at the commit boundary

When coordination_board is configured, pre-commit invokes synthesis-project-management's check-staged before content scanning or a repo-local hook. It refuses unless the selected active session owns the exact worktree and branch and every staged source/destination path is covered by the session's claims. SYNTHESIS_COORDINATION_SESSION supplies the committing session when the active-project pointer does not. A deliberate outside-claim exception requires SYNTHESIS_COORDINATION_OVERRIDE_REASON; the checker atomically records it on the board before the commit proceeds. Missing runtime, board, lease refresh, selector, or index evidence fails closed. The hook accepts only passed-inside-claim and recorded-override, requires the outcome and outside-path list to match their hash-bound receipt fields, and revalidates the board and index before continuing. A coordination refusal is reported separately from content-policy-engine unavailability.

Repositories remain usable when coordination is not adopted: omitting coordination_board does not block, and each hook invocation explicitly says that this control is absent. The credential and exposure scanners still run.

v2.3.0 — Portable drift-source resolution

v2.3.0 (2026-08-03) removes the doctor's hardcoded personal checkout path. The drift check's source now resolves portably: $SYNTHESIS_GIT_HOOKS_SOURCE when set (authoritative — an empty value skips the check deliberately; an invalid value is a doctor problem, fail closed), else the running script's own directory when it is not itself an installed engine copy (repo checkouts, worktrees, client plugin caches), else the documented locations the ecosystem's own installers create (direct-copy skill installs, the shared installer's cached clone). A source must carry all three engine files to qualify, and the doctor names the resolved source in its output. The v2.4.0 installer also persists its absolute source directory beside the installed engine. Later direct doctor runs use that pointer before documented fallback locations; an invalid or missing pointed source is a doctor failure.

Read the full file on GitHub · 236 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. 5d ago Changed 415d42a6c5d7
  2. 8d ago First seen · 236 lines · 171 tokens per session scan A 19da5339c6d2

Subscribe to this mod's changes

synthesis-git-hooks is a skill published in the GitHub repository synthesisengineering/synthesis-skills (18 stars, last pushed yesterday), licensed Apache-2.0. It adds 171 tokens to every session and 3,615 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-30.