$npx skillfedfor your agent

git-hooks-setup

Configure pre-commit, commit-msg, and pre-push hooks to standardize your team's development workflow. Supports both husky and native git hooks, with built-in linting, code formatting, commit message validation, and secret detection to catch issues before they reach your repository.

git-hooks-setup automates pre-commit, commit-msg, and pre-push hooks to enforce code quality and commit standards.

AI-generated summary based on this skill's SKILL.md

★ 0  0 MITupdated by wu529778790

Decision gist · record as of 2026-06-24

git-hooks-setup automates pre-commit, commit-msg, and pre-push hooks to enforce code quality and commit standards. Configure pre-commit, commit-msg, and pre-push hooks to standardize your team's development workflow. Supports both husky and native git hooks, with built-in linting, code formatting, commit message validation, and secret detection to catch issues before they reach your repository.

manual: git clone https://github.com/wu529778790/shenzjd-skills → cp -r shenzjd-skills/git-hooks-setup ~/.claude/skills/git-hooks-setup
git-hooks-setup/SKILL.md · version 8e46c152

Use it when

  • git-hooks-setup prevents broken code from reaching your repository by running automated checks at multiple stages.
  • git-hooks-setup integrates husky with lint-staged to run linting and formatting on staged files before each commit.

Verify before relying

Read SKILL.md below before installing (3 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

wu529778790/shenzjd-skills/git-hooks-setup · repository language: Shell

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I set up git hooks for my project?

git-hooks-setup enables you to configure pre-commit, commit-msg, and pre-push hooks that run automatically during your git workflow. You can use husky for a managed approach or native git hooks for a lightweight alternative. The skill guides you through initializing hooks, linking them to your repository, and connecting them to linting, formatting, and validation tools so code quality checks run before commits reach your repository.

How can git-hooks-setup help prevent pushing broken code?

git-hooks-setup prevents broken code from reaching your repository by running automated checks at multiple stages. Pre-commit hooks catch linting and formatting issues, commit-msg hooks validate your commit messages against team conventions, and pre-push hooks run tests before code is pushed. Together, these layers ensure only code meeting your team's standards advances through your workflow.

What's the best way to configure pre-commit linting and formatting with husky?

git-hooks-setup integrates husky with lint-staged to run linting and formatting on staged files before each commit. The setup process installs husky, creates pre-commit hooks, and configures lint-staged to apply your linters and formatters only to changed files. This approach keeps your workflow fast while ensuring consistent code style across your team's projects.

How does git-hooks-setup enforce team commit message conventions?

git-hooks-setup uses commitlint to validate commit messages against your team's standards. The commit-msg hook intercepts commits and checks them against a configuration file defining your message format rules. If a commit doesn't match your conventions, it's rejected before entering the repository, ensuring consistent, readable commit history across your team.

Can git-hooks-setup detect secrets before they're committed?

Yes. git-hooks-setup integrates secret scanning into your pre-commit hooks to detect API keys, credentials, and other sensitive data before they reach your repository. When a secret is found, the commit is blocked, protecting your codebase from accidental exposure and helping your team maintain security standards.

Does git-hooks-setup work without husky?

Yes. git-hooks-setup supports native git hooks configuration as a lightweight alternative to husky. You can manually set up pre-commit, commit-msg, and pre-push hooks in your .git/hooks directory and connect them to your linting, formatting, and validation tools. This approach works well for teams preferring minimal dependencies while still standardizing development workflows.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Git Hooks Setup

一键配置 Git Hooks,标准化团队开发流程。

Overview

自动生成 pre-commit / commit-msg / pre-push hook 配置,包含代码格式化、commit message 校验、敏感信息检查。支持 husky 和原生 git hooks 两种方案。

When to Use

  • User wants to set up git hooks
  • User mentions pre-commit or commit message conventions
  • User wants to automate lint/format checks
  • User inputs /git-hooks-setup
  • User wants to enforce pre-push checks (tests, lint)
  • User wants to prevent pushing broken code
  • User wants to standardize team commit message format
  • User wants to add secret scanning before commit
  • User wants to auto-format code on every commit

When NOT to Use: - User only wants to view current git hooks configuration - User wants CI-based checks (no local hooks needed) - User's project already has a complete hooks setup - User wants to run hooks on specific files only (use lint-staged directly) - User wants to hook into Git events other than pre-commit/commit-msg/push

Core Pattern

Step 1: 检测项目环境

```bash

检测包管理器(按

(truncated - see the full file via the links below)

File tree — 3 files
git-hooks-setup/README.md
git-hooks-setup/SKILL.md
git-hooks-setup/templates/commitlint.config.js

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Set up automated git hooks for code quality and commit standards”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

chinese-commit-conventions
by jnMetaCode · jnMetaCode/superpowers-zh

Adapt Conventional Commits for Chinese development teams with localized type definitions, message templates, and tooling integration. Configure commitlint, husky, and conventional-changelog to enforce consistent commit practices across your team while keeping type keywords in English for tool compatibility.

MITdocs in Chineseupdated Jul 2026
★ 7,277repo stars
Commit
by kdlbs · kdlbs/kandev

Create git commits that follow Conventional Commits conventions, enabling automatic changelog and release note generation. The skill stages your changes, validates them through pre-commit hooks, and ensures commit messages match your project's standards before recording them to history.

AGPL-3.0updated Jul 2026
★ 499repo stars
git-hygiene-enforcer
by patricio0312rev · patricio0312rev/skills

Git Hygiene Enforcer helps teams standardize development practices by automating commit validation, branch naming enforcement, and pull request workflows. It provides ready-to-use configurations for commit hooks, branch protection rules, and CI/CD checks that maintain code quality without manual oversight.

MITupdated Jan 2026
★ 52repo stars
eslint-prettier-config
by patricio0312rev · patricio0312rev/skills

Configure ESLint and Prettier together for unified code quality across TypeScript and React codebases. This skill covers dependency installation, rule configuration, tool integration, and Git hook setup to enforce standards automatically.

MITupdated Jan 2026
★ 52repo stars
managing-git-workflows
by ancoleman · ancoleman/ai-design-components

This skill guides you through structured Git workflows for team collaboration, covering branching strategies like trunk-based development, GitHub Flow, and GitFlow. Learn to enforce code quality with conventional commits, Git hooks, and branch protection rules, plus manage monorepos with clear ownership patterns.

MITupdated Dec 2025
★ 390repo stars
setup
by tartinerlabs · tartinerlabs/skills

setup identifies your project's language and installs the appropriate toolchain for that ecosystem—Biome and Husky for JS/TS, Ruff and pre-commit for Python, golangci-lint for Go, or Clippy for Rust. It skips tools already configured and wires in secret scanning across all languages. After installation, you can verify everything works with a test commit.

MITupdated Jul 2026
★ 7repo stars

More skills git-workflow (MIT) · Hk (unlicensed) · typescript (MIT) · Semantic Commit (unlicensed) · ultracite (MIT)

Tags
git-automationcode-quality-gatesteam-standardscommit-validationsecret-detectionpre-commit-workflowdeveloper-experienceci-prevention