precommit-check

star 0

Run pre-commit checks by formatting changed files with Prettier, then running typecheck and build. Use when preparing to commit in git-based JS/TS repos with npm scripts.

634750802 By 634750802 schedule Updated 2/7/2026

name: precommit-check description: "Run pre-commit checks by formatting changed files with Prettier, then running typecheck and build. Use when preparing to commit in git-based JS/TS repos with npm scripts."

Precommit Check

Overview

Format changed files, then run typecheck and build. Treat warnings as non-blocking unless a command exits nonzero.

Workflow

  1. Confirm you are in the repo root and git is available.

  2. Format changed files with Prettier:

    affected=$(git diff --name-only --diff-filter=ACM)
    if [ -n "$affected" ]; then
      git diff --name-only --diff-filter=ACM -z | xargs -0 npx prettier --write --ignore-unknown --log-level warn --
    fi
    
  3. Run typecheck: npm run typecheck.

  4. Run build: npm run build.

  5. Report results:

    • Fail on any nonzero exit code.
    • Ignore warnings that do not affect logic, but mention them if they appear in output.
Install via CLI
npx skills add https://github.com/634750802/pantheon-agent-prototype --skill precommit-check
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator