Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

git-hooks

БесплатноЗапускает вложенные скриптыНе проверен

Central authority on git hook implementations, modern best practices, and tooling for .NET/C#, JavaScript/TypeScript, Python, and polyglot repositories…

Prorise-coolот Prorise-cool★ 304 звезды на GitHub29 установок в других каталогах

Об этом скилле

Git Hooks

Overview

This skill provides comprehensive guidance on modern git hook implementations across multiple ecosystems, with primary focus on .NET/C# and strong support for JavaScript/TypeScript and Python. It covers framework selection, setup workflows, performance optimization, security integration, testing strategies, and team collaboration patterns.

Key capabilities:

  1. Adaptive framework recommendations based on ecosystem, scale, and requirements
  2. Complete lifecycle support from tool selection → setup → configuration → testing → maintenance
  3. Performance-first approach with parallel execution and incremental processing patterns
  4. Security by default with mandatory secret scanning integration
  5. CI/CD integration for defense-in-depth validation (local + remote)
  6. Real-world examples with copy-paste ready configurations

When to Use This Skill

Use this skill when you need to:

  • Set up git hooks for a new or existing project
  • Choose a git hook framework (Husky.Net vs lefthook vs Husky vs pre-commit)
  • Configure pre-commit hooks for code formatting, linting, security scanning
  • Configure commit-msg hooks for Conventional Commits validation
  • Configure pre-push hooks for running tests or build validation
  • Integrate ecosystem tools (dotnet format, ESLint/Prettier, Black/Ruff/mypy)
  • Enforce Conventional Commits with commitlint
  • Scan for secrets before commits (gitleaks, TruffleHog)
  • Optimize hook performance (slow hooks blocking developers)
  • Test git hooks (unit testing, integration testing)
  • Deploy hooks to a team (automatic installation, CI/CD enforcement)
  • Troubleshoot hook issues (activation problems, performance issues)
  • Handle monorepo hook patterns

Trigger scenarios:

  • "Set up git hooks for my .NET project"
  • "How do I enforce code formatting before commits?"
  • "Configure Conventional Commits validation"
  • "My pre-commit hook is too slow"
  • "Should I use Husky.Net or lefthook for C#?"
  • "Integrate secret scanning with git hooks"

Quick Start Decision Tree

Which framework should I use?

Answer these questions:

  1. What's your primary ecosystem?

    • .NET/C# only → Consider Husky.Net (native integration) or lefthook (performance)
    • JavaScript/TypeScript only → Use Husky + lint-staged + commitlint
    • Python only → Use pre-commit framework
    • Multiple languages (polyglot) → Use lefthook or pre-commit
  2. What's your team size/scale?

    • Solo developer or small team → Any framework works; choose based on ecosystem
    • Medium team (5-20) → Prioritize ease of installation and CI/CD integration
    • Large team/enterprise (20+) → Prioritize performance (lefthook), standardization
  3. What's your performance requirement?

    • Speed is critical → Use lefthook (parallel execution, Go-based)
    • Speed is moderate concern → Any framework with incremental processing
    • Speed is not a concern → Choose based on ecosystem familiarity

Quick recommendations

Ecosystem Solo/Small Team Medium Team Large Team/Enterprise
.NET/C# Husky.Net Husky.Net or lefthook lefthook
JavaScript/TypeScript Husky + lint-staged Husky + lint-staged Husky + lint-staged or lefthook
Python pre-commit pre-commit pre-commit or lefthook
Polyglot lefthook or pre-commit lefthook lefthook

Framework Comparison at a Glance

Feature Husky.Net lefthook Husky (JS) pre-commit
Performance Moderate Excellent (parallel) Good (with lint-staged) Good
Ecosystem .NET/C# Any JavaScript/TS Any (Python primary)
Config Format JSON (task-runner.json) YAML Shell scripts + package.json YAML
Parallel Execution ❌ No ✅ Yes ❌ No Partial
Learning Curve Low (.NET devs) Moderate Low (JS devs) Low (Python devs)
Monorepo Support Moderate Excellent Excellent Good

📖 For detailed comparison: See references/framework-comparison.md for comprehensive feature analysis, pros/cons, and selection criteria.

Core Capabilities

1. .NET/C# Workflows

Quick Start: Install Husky.Net (dotnet tool install Husky) or lefthook (scoop install lefthook), configure task-runner.json or lefthook.yml, and verify.

Key patterns:

  • Use ${staged} or {staged_files} for incremental processing
  • Integrate dotnet format (pre-commit) and dotnet test (pre-push)
  • Attach Husky.Net to .csproj for automatic team installation

📖 For complete setup: See references/setup-workflows.md

Examples:

Полный SKILL.md на GitHub

Установить git-hooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Bash
Glob
Grep

Вложенные файлы

examples/README.mdexamples/commitlint.config.jsexamples/husky-javascript-package.jsonexamples/husky-net-dotnet-format.jsonexamples/lefthook-dotnet.ymlexamples/lefthook-polyglot.ymlexamples/pre-commit-python.yamlreferences/README.mdreferences/conventional-commits.mdreferences/framework-comparison.mdreferences/performance-optimization.mdreferences/secret-scanning.mdreferences/setup-workflows.mdreferences/testing-strategies.mdreferences/troubleshooting.md

FAQ

Что делает скилл git-hooks?

Central authority on git hook implementations, modern best practices, and tooling for .NET/C#, JavaScript/TypeScript, Python, and polyglot repositories. Covers framework selection (Husky.Net, lefthook, Husky, pre-commit), setup workflows, Conventional Commits, semantic versioning, secret scanning (gitleaks, TruffleHog), performance optimization, CI/CD integration, testing strategies, and team collaboration patterns. Adaptive to project scale from solo developers to enterprise teams. Use for setting up git hooks, configuring pre-commit/commit-msg/pre-push hooks, integrating dotnet format/dotnet test, ESLint/Prettier, Black/Ruff/mypy, commitlint, choosing between frameworks, optimizing hook performance, enforcing code quality, automating testing, and troubleshooting hook issues.

Как установить скилл git-hooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл git-hooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить git-hooks с