Agent skill

Pre Commit

by undeadlist in undeadlist/claude-code-agents

Run code quality checks and tests before committing. An agent skill from undeadlist/claude-code-agents.

MITAuto-check passedDevelopment

Install Pre Commit

skills CLI
$ npx skills add undeadlist/claude-code-agents --skill pre-commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install undeadlist/claude-code-agents pre-commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/undeadlist/claude-code-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pre-commit .claude/skills/pre-commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pre-commit
GitHub stars
149
Token cost
~220 tokens
SKILL.md length
70 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Run code quality checks and tests before committing. An agent skill from undeadlist/claude-code-agents.

  • Works in 3 steps: Code Audit → Test Run → Decision
  • Tasks that involve Code quality
  • SKILL.md covers Execution (Sequential) and Expected Output
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pre Commit is an agent skill from undeadlist/claude-code-agents. Run code quality checks and tests before committing

Its SKILL.md is about 220 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code quality. The repository describes itself as: Claude Code Agents Prompt templates for Claude Code's subagent system. Run parallel code audits, automate fix cycles, get stuff reviewed. Built for the Claude Code Task tool. Not… The licence is MIT.

When your agent uses it

  • Tasks that involve Code quality

Example prompts

  • “/pre-commit”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Code Audit
  2. Test Run
  3. Decision

What it can do on your machine

Read from SKILL.md and the folder at commit 13e3d51. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pre Commit loads about 220 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 70 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~220

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from undeadlist/claude-code-agents at commit 13e3d51, republished under its MIT licence (© undeadlist). 70 words, ~220 tokens.

Download SKILL.mdSave it as .claude/skills/pre-commit/SKILL.md (or your agent's skills folder).
name
pre-commit
description
Run code quality checks and tests before committing

Pre-Commit Workflow

Run before every commit to catch issues early.

Execution (Sequential)

Step 1: Code Audit

Spawn code-auditor on staged/changed files:

  • Check for any types, empty catch blocks, console.logs, obvious bugs
  • Focus only on files being committed
Step 2: Test Run

Spawn test-runner:

  • Run the full test suite
  • Report any failures
Step 3: Decision
  • All pass -> "Ready to commit"
  • Any fail -> "Fix before committing" with specific issues listed

Expected Output

markdown
# Pre-Commit Check

## Status: PASS / FAIL

### Code Quality
- [x] No new `any` types
- [x] No empty catch blocks
- [x] No console.logs in production code

### Tests
- [x] All tests pass
- [x] No regressions

## Verdict
Ready to commit / Fix issues first

© undeadlist, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pre-commit of undeadlist/claude-code-agents.

Open the folder on GitHubat commit 13e3d51

Compare with similar skills

Pre Commit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pre Commit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pre Commit this skillundeadlist/claude-code-agents149—~220Automated safety check: PassMIT
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.2k—~2.2kAutomated safety check: PassMIT
Constraint-Driven Developmentaddyosmani/agent-skills102k2 repos~5.2kAutomated safety check: PassMIT
Skill Doli Code ReviewDolibarr/dolibarr7.7k1 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.2k GitHub stars~2.2k tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Constraint-Driven Development

    addyosmani/agent-skills

    Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.

    102k GitHub starsUsed in 2 repos~5.2k tokens
    DevelopmentAuto-check passed
  • Skill Doli Code Review

    Dolibarr/dolibarr

    Reviews Dolibarr PHP code for compliance with coding standards and security best practices, and fixes identified issues.

    7.7k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from undeadlist/claude-code-agents

  • Full Audit

    undeadlist/claude-code-agents

    Run all 11 audit agents in parallel, then consolidate findings with fix-planner

    149 GitHub stars~445 tokensUpdated 3 mo ago
    Auto-check passed
  • Bug Fix

    undeadlist/claude-code-agents

    Fix bugs with regression prevention using test-first approach

    149 GitHub stars~307 tokensUpdated 3 mo ago
    Auto-check passed
  • New Feature

    undeadlist/claude-code-agents

    Develop new features with test-first approach (TDD). An agent skill from undeadlist/claude-code-agents.

    149 GitHub stars~295 tokensUpdated 3 mo ago
    Auto-check passed
  • Pre Deploy

    undeadlist/claude-code-agents

    Validate build, environment, and dependencies before deployment

    149 GitHub stars~291 tokensUpdated 3 mo ago
    Auto-check passed
  • Release Prep

    undeadlist/claude-code-agents

    Full audit + fixes + deploy validation for production release

    149 GitHub stars~357 tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Pre Commit

What does Pre Commit do?

Run code quality checks and tests before committing. An agent skill from undeadlist/claude-code-agents. Pre Commit is an agent skill from undeadlist/claude-code-agents.

When should I use Pre Commit?

Pre Commit fits situations like: tasks that involve Code quality.

How do I install Pre Commit in Claude Code?

Run `npx skills add undeadlist/claude-code-agents --skill pre-commit -a claude-code`. Or copy the skill folder (skills/pre-commit in undeadlist/claude-code-agents) into .claude/skills/pre-commit in your project. Claude Code loads it when a task matches its description.

How do I install Pre Commit in Codex?

Run `npx skills add undeadlist/claude-code-agents --skill pre-commit -a codex`. Or copy the skill folder (skills/pre-commit in undeadlist/claude-code-agents) into .agents/skills/pre-commit in your project. Codex loads it when a task matches its description.

Can I use Pre Commit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add undeadlist/claude-code-agents --skill pre-commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pre-commit, .gemini/skills/pre-commit, .github/skills/pre-commit and .opencode/skills/pre-commit in your project.

What does Pre Commit need to run?

SKILL.md names no scripts, command-line tools or credentials: Pre Commit is instructions for the agent only.

Does Pre Commit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pre Commit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pre Commit use?

Pre Commit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pre Commit use?

About 220 tokens (SKILL.md is roughly 880 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pre Commit?

Skills that share tags, products or a category with Pre Commit: WooCommerce Code Review (woocommerce/woocommerce, 11k stars), Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.2k stars) and Constraint-Driven Development (addyosmani/agent-skills, 102k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pre Commit?

undeadlist (a GitHub user) maintains it in undeadlist/claude-code-agents, which has 149 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on June 28, 2026.

Source: undeadlist/claude-code-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.