pre-commit-gate

Run npm lint, typecheck, and test commands before each git commit.

8|1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/bordenet/superpowers-plus --skill pre-commit-gate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-gate
Source: https://github.com/bordenet/superpowers-plus/tree/main/skills/engineering/pre-commit-gate
Command: npx skills add https://github.com/bordenet/superpowers-plus --skill pre-commit-gate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often skip local quality checks, leading to wasted CI cycles, broken builds, and embarrassing failures when code is pushed without linting, typechecking, or testing.

Core Features & Use Cases

  • Safety Scan: Detects dangerous shell patterns before committing.
  • Lint, Typecheck, Test: Runs npm lint, typecheck, and test commands locally and requires zero errors.
  • Commit Gate Chain: Integrates with subsequent commit gates (style guide, code review, language audit, IP audit) to enforce a full quality pipeline.
  • Use Case: Before committing a feature or hotfix, run this gate to guarantee code quality and avoid CI failures.

Quick Start

Run the pre‑commit gate before committing to ensure all checks pass.

Frequently Asked Questions about pre-commit-gate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce lint, typecheck, and test execution locally before a git commit?

You can block bad commits by running a pre-commit gate that enforces lint, typecheck, and test execution locally before each git commit. It requires npm lint, typecheck, test commands and a dangerous-pattern-scan.sh script to pass.

Can I detect dangerous shell patterns before committing code?

You can detect dangerous shell patterns before committing by running the dangerous-pattern-scan.sh script within your pre-commit gate. This safety scan blocks risky shell code from entering your repository locally before the git commit completes.

Does the pre-commit quality gate work with JavaScript and TypeScript projects?

The pre-commit quality gate works with JavaScript and TypeScript projects using npm scripts and git. It enforces your npm lint, typecheck, and test commands locally, requiring zero errors before allowing a git commit to proceed.

What is the best way to prevent broken builds and CI failures from untested commits?

The best way to prevent broken builds and wasted CI cycles is applying a pre-commit gate that enforces lint, typecheck, and test execution locally. This guarantees code quality and blocks bad commits before they are pushed to the repository.

How do I integrate a commit gate chain for a full quality pipeline?

You integrate a commit gate chain for a full quality pipeline by applying this pre-commit gate alongside subsequent gates. It integrates with style guide, code review, language audit, and IP audit gates to enforce comprehensive code quality checks.