Agent skill

Precommit

by ploxc in ploxc/modbux

Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit.

MITAuto-check passedTesting & QA

Install Precommit

skills CLI
$ npx skills add ploxc/modbux --skill precommit -a claude-code

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

GitHub CLI
$ gh skill install ploxc/modbux precommit --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/ploxc/modbux.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/precommit .claude/skills/precommit && 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
precommit
GitHub stars
108
Token cost
~1.5k tokens
SKILL.md length
755 words
Files
3 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit.

  • Works in 6 steps: Read the diff → yarn lint && yarn typecheck && yarn test → The e2e specs this change touches → …
  • The user says commit
  • SKILL.md covers While you work, 1. Read the diff, 2. yarn lint && yarn typecheck… and 3. The e2e specs this change…, plus 5 more sections
  • Calls git, yarn and npx

What it does

Precommit is an agent skill from ploxc/modbux. Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit. Use when the user says "commit", "committen", "precommit", "merge" or "mergen", and when you run yarn lint, yarn typecheck, yarn test or yarn test:e2e to find out whether your work is finished. Do NOT use to decide which tests a change needs — that is test.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/what-a-script-moved.md` and `references/what-git-add-a-took.md`).

It sits in Testing & QA, covering End-to-end testing and Linting and formatting. The repository describes itself as: Free open-source Modbus client (master) GUI and server simulator for Windows, macOS and Linux. Desktop tool for Modbus TCP, RTU and RTU over TCP. A modern alternative to Modbus… The licence is MIT.

When your agent uses it

  • The user says commit
  • When you run yarn lint
  • Yarn test:e2e to find out whether your work is finished
  • Decide which tests a change needs — that is test

Example prompts

  • “commit”
  • “committen”
  • “precommit”
  • “/precommit”

Requirements

  • Node.js

Workflow steps

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

  1. Read the diff
  2. yarn lint && yarn typecheck && yarn test
  3. The e2e specs this change touches
  4. The full suite, once
  5. Report, then decide what needs asking
  6. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit 3313c0f. 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

    Shell commands in SKILL.md call:

    • git
    • yarn
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use git, yarn and npx, which can reach the network depending on how they are called.

    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

Precommit loads about 1.5k tokens when it runs, and up to ~2.1k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 755 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.1k

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 ploxc/modbux at commit 3313c0f, republished under its MIT licence (© ploxc). 755 words, ~1,498 tokens.

Download SKILL.mdSave it as .claude/skills/precommit/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
precommit
description
Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit. Use when the user says "commit", "committen", "precommit", "merge" or "mergen", and when you run yarn lint, yarn typecheck, yarn test or yarn test:e2e to find out whether your work is finished. Do NOT use to decide which tests a change needs — that is test.

Precommit

While you work

git add before you mutate anything. git checkout naming a path restores from the index, which on an unstaged file is HEAD — so the command undoing one mutation deletes everything else you wrote in that file.

A scripted edit leaves no name behind. After any edit you did not type line by line:

sh
git diff --stat -- <the files you named>          # empty means nothing happened
git diff | grep '^-' | grep -E 'const |function |export '   # what left, by name
git diff | grep -E '^[-+][[:space:]]*(//|\*)'     # comments it ate or spliced

A name in the second list you did not decide to remove is one you did not decide to remove. A + comment that does not follow its - neighbour is a banner that now names something else. → WHY: what a script moved

Writing or changing a test? Its own skill: test.


1. Read the diff

sh
git status --porcelain    # untracked files too — they are in neither diff
git diff
git diff --staged

Read every changed file, and untracked files in full: a new file has no diff, and is where a fresh copy of something the project already owns lands.

Then, against CONTRIBUTING.md Code style and CLAUDE.md:

  • A store selector returning an object is a whole-store subscription wearing a selector's clothes. One selector per field.
  • src/shared importing from src/main — the one layer that may not reach back.
  • An interactive element with no data-testid — the e2e suite addresses the UI through them.
  • A new IPC channel — a name in IPC_CHANNELS, a type in IpcHandlerSpec, a one-line handler. A handler carrying logic belongs in the module it calls.
  • Changed a persisted shape? It needs a version and a migration. partialize in the store says whether the shape is persisted at all.

2. yarn lint && yarn typecheck && yarn test

About 75 seconds together, most of it typecheck. Run all three: yarn test does not typecheck, so a wrong annotation passes it.

const n: number = 'a string'    # vitest: 1 passed
                                # tsc:    error TS2322

3. The e2e specs this change touches

sh
npx electron-vite build && npx playwright test e2e/specs/01-main/<nn>-<name>.spec.ts

Pick them by what the change reaches, not by name. A change to the server grid touches 03-server-config, 04-add-register-modal and 08-polling-generators; a change to writing touches 09-write-operations; a change to config shapes touches 05-file-io and 14-client-config-io.

4. The full suite, once

yarn test:e2e at the end of a branch, not per commit. It builds first and runs for minutes, and running it per commit is how a branch stops being worked on.

A packaging or dependency change is measured on the artefact, never on package.json: asar list says what ships.

5. Report, then decide what needs asking

Report what every step above produced. A waiver covers the permission, never the checklist.

what you are about to doask first?
git commitno
git push, ghyes — the line is whether it leaves the machine
mergeyes, and show the squash message first
Show full SKILL.md (339 more words)Show less

6. Commit

Commit the files you changed. Never git add -A without reading git status --porcelain first — it takes build output, editor droppings and anything a tool left behind. → WHY: what git add -A took

Conventional Commits, lowercase, no full stop. feat is new functionality, fix is something that was broken, refactor is the same behaviour in different code, test is test-only, docs is docs-only, chore is tooling. Mean what you say.

Explain why, and if something was fixed, what the defect was and how it was verified. No Claude-Session: trailer — the message ends at the prose.

git commit -F - reads stdin, which is how a multi-paragraph message gets in without a shell mangling it.

Re-run every pasted command after the last edit, immediately before git commit. A figure is only true of the tree it ran against, and the way to get this wrong is to measure, keep working, and commit the measurement beside the change that moved it.

Splitting one change into several commits

Never split through the working tree. git stash then git checkout -- . restores every unstashed file from HEAD, and that work is gone. git stash with nothing to stash is a no-op that still succeeds, so the pop after it applies whatever was already on the stack.

Build the commit in the index: git add -p, or git apply --cached for a hunk. Both write only the index, so a mistake cannot destroy anything.

To move uncommitted work to another branch you need no stash at all: git checkout -b <branch> carries it.

The prose pass

Its own skill: prose.

Every commit hands over to it, once, after the message is drafted and before git commit. Unconditionally — no "if it makes a claim", because deciding whether your own sentence makes a claim is the judgement that fails.

What it covers is the whole diff, not the message. A false sentence in a code comment and a false sentence in a commit message are the same defect, and the comment is the one that survives.

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

Files

SKILL.md and 2 other files (references) in .claude/skills/precommit of ploxc/modbux.

  • SKILL.md
  • references/what-a-script-moved.md
  • references/what-git-add-a-took.md

Open the folder on GitHubat commit 3313c0f

Compare with similar skills

Precommit 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.

Precommit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Precommit this skillploxc/modbux108—~1.5kAutomated safety check: PassMIT
Verifysd0xdev/sd0x-harness192—~1.2kAutomated safety check: PassMIT
Pierre Testing and Verification Guidepierrecomputer/pierre6.2k—~608Automated safety check: PassApache-2.0
Ha Frontend Testinghome-assistant/frontend5.7k—~1.7kAutomated safety check: PassApache-2.0
Acceptance Test Authoringintent-driven-dev/intent-driven-template159—~2kAutomated safety check: PassMIT
Mmd Testtogechiyo/MMD_modoki145—~936Automated safety check: PassMIT

Similar skills

  • Verify

    sd0xdev/sd0x-harness

    Verification loop — lint - typecheck - unit - integration - e2e

    192 GitHub stars~1.2k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Chooses the right verification step after a code change in Pierre's monorepo: format and lint, a typecheck, Bun unit tests, snapshots, or Playwright E2E.

    6.2k GitHub stars~608 tokensUpdated today
    Testing & QAAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Acceptance Test Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when creating or modifying acceptance tests, configuring cucumber-js or behave runners, writing or refactoring step definitions, linting executable Gherkin specs, choosing an…

    159 GitHub stars~2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Mmd Test

    togechiyo/MMD_modoki

    Select and run the smallest sufficient MMDmodoki verification set after code or configuration changes, then separate new failures from known baselines.

    145 GitHub stars~936 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Review an implemented GitHub issue the way a senior Packmind engineer would — the human-judgment checks that ESLint, the TypeScript compiler, and e2e tests cannot catch (authorization scoping…

    317 GitHub stars~2.7k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from ploxc/modbux

  • Audit

    ploxc/modbux

    Audit one area of Modbux against the eight criteria and write the findings to tmp/AUDIT-<area.md, changing no code.

    108 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Handover

    ploxc/modbux

    Empty a session into files before its context goes — decide with the user what gets written down, write it, and only then say what the next session needs.

    108 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Prose

    ploxc/modbux

    Measure a sentence you just wrote against the thing it describes, then prune the block it lands in.

    108 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Todo

    ploxc/modbux

    Route something you want to record to the place that holds it — TODO.md, a GitHub issue, the memory directory, or the plan in flight.

    108 GitHub stars~898 tokensUpdated today
    Auto-check passed

Categories

Questions about Precommit

What does Precommit do?

Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit. Precommit is an agent skill from ploxc/modbux. Run the checklist before committing or merging — read the diff, lint, typecheck, the unit suite, the e2e specs the change touches, then report and commit.

When should I use Precommit?

Precommit fits situations like: the user says commit; when you run yarn lint; yarn test:e2e to find out whether your work is finished; decide which tests a change needs — that is test.

How do I install Precommit in Claude Code?

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

How do I install Precommit in Codex?

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

Can I use Precommit 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 ploxc/modbux --skill precommit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/precommit, .gemini/skills/precommit, .github/skills/precommit and .opencode/skills/precommit in your project.

What does Precommit need to run?

Going by SKILL.md and its folder, Precommit needs the command-line tools its instructions call (git, yarn and npx). Our summary lists: Node.js.

Does Precommit access the network?

SKILL.md contains no URLs. Its commands use git and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Precommit 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 Precommit use?

Precommit 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 Precommit use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 601 tokens, read only when the agent opens those files.

What are the alternatives to Precommit?

Skills that share tags, products or a category with Precommit: Verify (sd0xdev/sd0x-harness, 192 stars), Pierre Testing and Verification Guide (pierrecomputer/pierre, 6.2k stars), Ha Frontend Testing (home-assistant/frontend, 5.7k stars) and Acceptance Test Authoring (intent-driven-dev/intent-driven-template, 159 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Precommit?

ploxc (a GitHub organization) maintains it in ploxc/modbux, which has 108 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

Source: ploxc/modbux on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.