# observing/pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit

Repository: https://github.com/observing/pre-commit
Canonical: https://ross.abutalabs.com/products/observing-pre-commit
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-04-28T14:32:47+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 79, release rhythm 8, longevity 100
- inputs: {"age_days": 4893, "days_push": 127, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1882, forks 148 (observed 2026-08-28T04:05:48.734805+00:00)

## What it is
An npm package that automatically installs a git pre-commit hook into your repository, running your npm test or other package. scripts before each commit. It is configured entirely through your package. and can be bypassed with git commit --no-verify.

## Use cases
- run tests before every git commit
- block commits that fail linting or coverage checks
- install pre-commit hooks for npm modules
- run multiple npm scripts in order on commit
- enforce code style checks before committing

## When to choose
- you have a Node.js project using npm scripts and want commit-time checks
- you want zero-config git hooks driven by package.
- you need to back up and replace existing pre-commit hooks safely

## When to avoid
- you use Husky or a more modern git hooks manager
- your project is not Node.js/npm based
- you need shared hooks across many languages or monorepo tooling

## Facets
- artifact type: library
- maturity: maintenance
- function: testing, developer-tools, cli
- domain: developer-tools, version-control, testing
- platform: cli, cross-platform
- tags: git-hooks, pre-commit, npm-scripts, linting, ci, automation, nodejs

## Member repositories
- observing/pre-commit (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.734805+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:47.932931+00:00, confidence not recorded.
  - readme: https://github.com/observing/pre-commit (fetched 2026-08-28T04:05:48.734805+00:00, sha 52faed76ce98)
  - registry_npm: https://registry.npmjs.org/pre-commit (fetched 2026-08-29T10:53:19.692324+00:00, sha 2a265a8bc3ab)
- Data as of 2026-08-30T08:39:29.467469+00:00.
