setup-pre-commit

setup-pre-commit is a skill for Claude Code, Codex from mattmre/EVOKORE-MCP-PUBLIC. It costs 67 tokens per session (2,653 once invoked), scanned A, original, MIT.

A setup guide for adding checks that run before code is committed in a TypeScript project.

In plain words
What is it for?
It helps configure Husky, lint-staged, Prettier, type checking, and a fast set of integration tests for commits.
Why use it?
It helps catch formatting, type, and selected integration-test problems before they enter the shared codebase, while preserving existing hook settings.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/mattmre/evokore-mcp-public/setup-pre-commit
Any agent
npx skills add mattmre/EVOKORE-MCP-PUBLIC --skill setup-pre-commit
Clone the repo
git clone --depth 1 https://github.com/mattmre/EVOKORE-MCP-PUBLIC

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 setup-pre-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/setup-pre-commit.svg)](https://agentmods.dev/skills/mattmre/evokore-mcp-public/setup-pre-commit)
Your own site
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/setup-pre-commit"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/setup-pre-commit.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00067 $0.02653
Opus 5 $0.00034 $0.01326
Sonnet 5 $0.00013 $0.00531
Haiku 4.5 $0.00007 $0.00265

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

Security

Grade A, and why

setup-pre-commit 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.

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/DEVELOPER TOOLS/setup-pre-commit/SKILL.md · 171 lines

How it starts

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

Setup Pre-Commit Hooks

Set up (or extend) the EVOKORE pre-commit chain: Husky + lint-staged + Prettier + typecheck + a fast-failing integration-test slice. Detect the existing setup before writing anything; if the repo already has Husky configured, this skill is an UPLIFT (extend, never overwrite).

When to use this skill

Use when an operator asks to install pre-commit hooks, set up Husky, configure lint-staged, add commit-time formatting / typechecking / testing to an EVOKORE-style TypeScript repo, or extend an existing pre-commit chain that's already partially configured.

Trigger phrases that should activate this skill:

  • "set up pre-commit hooks"
  • "install Husky"
  • "add lint-staged"
  • "extend the pre-commit chain"
  • "wire Prettier into commits"
  • "add a typecheck pre-commit step"

Do not use this skill for:

  • CI / GitHub-Actions pre-merge gates (those are separate from local pre-commit hooks; use a CI-focused skill).
  • Bypassing the pre-commit hook (git commit --no-verify) — see "Bypass and debugging" below.
  • Repos that aren't TypeScript-based and Node-toolchain compatible — adapt manually instead of running this skill blindly.

Adapted From Upstream

This skill is adapted from mattpocock/skills @ 90ea8eec03d4ae8f43427aaf6fe4722653561a42 / setup-pre-commit/SKILL.md, MIT licence (c) 2026 Matt Pocock. Upstream attribution and licence text live in the repo-root NOTICE and at SKILLS/upstream/mattpocock-skills/LICENSE.

The upstream provides a clean greenfield install. EVOKORE's port adds: detection, uplift (no silent overwrite), an EVOKORE-style integration-test slice on commit, a typecheck step keyed off npm run build when no typecheck script exists, and a damage-control-aware bypass note. The upstream content remains in the read-only SKILLS/upstream/mattpocock-skills/ submodule and is not indexed by SkillManager.

EVOKORE-Specific Adaptations

  1. Detect-first, write-second. Inspect package.json for husky / lint-staged keys, check .husky/ directory, and read any .prettierrc* or .lintstagedrc* files before writing anything. If any are present, surface the diff and uplift; do not silently overwrite.
  2. Integration-test slice on commit. Upstream runs npm run test (the full suite) on every commit. EVOKORE's full vitest suite (~2053 tests across 121 files) is too slow for pre-commit, so the EVOKORE pre-commit runs only npx vitest run --bail=1 tests/integration/ (98 integration tests, sub-minute on the dev box). Full-suite gating moves to CI.
  3. Typecheck graceful fallback. Upstream calls npm run typecheck. EVOKORE's package.json exposes npm run build (which is npx tsc) as the typecheck path. If typecheck script is absent, the hook uses npx tsc --noEmit directly so the commit doesn't emit dist/ artefacts.
  4. Damage-control-aware bypass note. git commit --no-verify is the standard escape hatch but EVOKORE's damage-control hook (scripts/hooks/damage-control.js) may flag it under DC-rules. The skill documents npx lint-staged --no-stash as the debug path instead of teaching --no-verify.
  5. Composition. Terminal skill — no next, invoke X skill chain. Once installed, the hook runs in-process on every git commit; nothing further to orchestrate.

Read the full file on GitHub · 171 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 First seen · 171 lines · 67 tokens per session scan A ef9181537ce8

Subscribe to this mod's changes

setup-pre-commit is a skill published in the GitHub repository mattmre/EVOKORE-MCP-PUBLIC (3 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 2,653 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

law-of-similarity

Apply the Law of Similarity — shared colour, shape, or size signals that elements belong to one category. Use when signalling relationships across distance. For grouping by position, use law-of-proximity.

Owl-Listener/designer-skills · 47 tokens

aesthetic-usability

Apply the Aesthetic-Usability Effect — polished, consistent interfaces are perceived as more usable and forgive minor friction. Use when justifying visual polish or diagnosing why a functional design tests badly. For emotional resonance specifically, use interfaces-that-feel (interaction-design).

Owl-Listener/designer-skills · 59 tokens

law-of-common-region

Apply the Law of Common Region — a shared container, background, or border groups elements regardless of spacing. Use when grouping must survive a tight layout. For grouping by spacing alone, use law-of-proximity.

Owl-Listener/designer-skills · 48 tokens

version-control-strategy

Define version control for design files, components, and libraries — branching, naming, and release. Use when file history is chaotic. For design system contribution rules, use design-system-governance (design-systems).

Owl-Listener/designer-skills · 50 tokens

presentation-deck

Structure a design presentation for a specific audience and decision. Use when presenting internally. For a portfolio narrative use case-study; for the written argument use design-rationale.

Owl-Listener/designer-skills · 39 tokens

diary-study-plan

Design a diary study — prompts, cadence, duration, participant criteria, and analysis frame. Use when behaviour unfolds over days or weeks. For a single-session study, use usability-test-plan.

Owl-Listener/designer-skills · 45 tokens