dev-setup-pre-commit

Migrate Node and Deno projects to native git core.hooksPath pre-commit hooks.

Updated Jun 17, 2025
One-click install
npx skills add https://github.com/nikbrunner/dots --skill dev-setup-pre-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-setup-pre-commit
Source: https://github.com/nikbrunner/dots/tree/main/common/.agents/skills/dev-setup-pre-commit
Command: npx skills add https://github.com/nikbrunner/dots --skill dev-setup-pre-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sets up or migrates git pre-commit hooks to use native git core.hooksPath, avoiding Husky, Lefthook, or other wrapper tools. It detects whether the project uses Node or Deno and guides the migration from Husky, Lefthook, or manual pre-commit setups to a minimal, native solution.

Core Features & Use Cases

  • Inventory existing pre-commit configurations (e.g., .husky, lefthook.yml, .pre-commit-config.yaml, package.json dependencies, and .git/hooks).
  • Propose and perform migration to a .githooks/pre-commit script tailored for Node or Deno projects, mapping checks where possible.
  • Verify and finalize installation by setting core.hooksPath, validating hook execution, and providing a clean deprecation path for old tools.

Quick Start

Run the setup on a project to migrate to native git hooks and verify installation.

Frequently Asked Questions about dev-setup-pre-commit

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

FAQPage Schema
How do I migrate from Husky to native git hooks?

Migrate from Husky to native git hooks by inventorying existing configurations, mapping checks, and implementing a tailored .githooks/pre-commit script for your Node or Deno project.

What is git core.hooksPath and when should I use it?

Git core.hooksPath is a native configuration setting that directs git to execute hooks from a custom directory. Use it to avoid wrapper tools like Husky and run pre-commit checks natively.

Does this native git hook setup work with Deno projects?

Yes, the setup detects whether your project uses Node or Deno and configures the .githooks/pre-commit script along with the necessary deno.json or package.json settings accordingly.

How do I set up a pre-commit hook without third-party wrappers?

Set up pre-commit hooks without wrappers by creating a .githooks/pre-commit script, mapping your existing checks, and configuring git core.hooksPath to execute the directory natively.

Can I map existing Lefthook checks to a native git hook?

Yes, you can map existing Lefthook checks. The process inventories your lefthook.yml configuration and translates those checks into a minimal, native .githooks/pre-commit script.