Ship & operateMIT

Set up pre-commit

by Matt Pocock (opens in a new tab) mattpocock/skills

Adds Husky, lint-staged, type checks and tests as a pre-commit hook.

Installation

Skills CLI

Skills CLI command
npx skills@latest add mattpocock/skills --skill setup-pre-commit

Requires Node.js and npm. Choose your agents in the installer; add -g for a global installation.

Fieldbook review

Reviewed 27 Sept 2026

Installs dev dependencies and makes a commit at the end. JavaScript and TypeScript projects only.

  • LicenceMIT
  • FrontmatterValid name and description
  • Risky patternsNone found
  • Size92 lines
  • Last checked27 Sept 2026 · c9819d7f1e3b198064edc1faa3154224ed67395e9f07f5d3cea4b67cf0a11a98

What it can touch

  • Edits code

    Changes files in your project.

  • Runs commands

    Runs shell commands such as tests, builds or installs.

  • Uses git

    Reads history or makes commits, branches or worktrees.

Read the source

Fieldbook links to the original instead of copying it, so you always read the version you install.

skills/misc/setup-pre-commit/SKILL.md on GitHub (opens in a new tab)