hk

Configure git hooks and linters with hk using Pkl-based configuration.

3|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/KyleKing/vcr-tui --skill hk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hk
Source: https://github.com/KyleKing/vcr-tui/tree/main/.claude/skills/hk
Command: npx skills add https://github.com/KyleKing/vcr-tui --skill hk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually enforcing code quality standards and running linters before commits or pushes can be inconsistent and slow. This skill provides expert guidance on hk, a high-performance Git hook manager, to automate code quality checks, ensuring consistent standards and a smoother development workflow.

Core Features & Use Cases

  • Git Hook Management: Set up and configure pre-commit, pre-push, and other Git hooks using hk's Pkl-based configuration.
  • Linter Integration: Easily integrate popular linters and formatters (Black, Ruff, ESLint, Prettier, etc.) into your Git workflow with built-in support and custom commands.
  • Performance Optimization: Leverage hk's concurrency and file-locking features for fast, efficient code quality checks, even in large repositories.
  • Use Case: Your team needs to enforce Python code formatting with Black and linting with Ruff before every commit. Use this skill to generate the hk.pkl configuration, install the hooks, and ensure all code adheres to standards automatically.

Quick Start

Help me set up hk to run Black and Ruff as pre-commit hooks for my Python project.

Frequently Asked Questions about hk

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

FAQPage Schema
How do I automate code quality checks with Git hooks before commits?

Git hooks automate code quality checks by running linters and formatters before commits or pushes. `hk` is a high-performance Git hook manager that lets you configure pre-commit and pre-push hooks using Pkl-based configuration, ensuring consistent code standards across your team without manual enforcement.

Can I integrate multiple linters like Black and Ruff into my Git workflow?

Yes, `hk` supports integration with popular linters and formatters including Black, Ruff, ESLint, and Prettier. You define linters in `hk.pkl` with glob patterns, check and fix commands, and staging behavior, enabling concurrent execution across your codebase.

What's the fastest way to run pre-commit hooks on large repositories?

Pre-commit hooks can be slow on large codebases without optimization. `hk` addresses this through concurrency and file-locking features that parallelize linter execution, reducing hook runtime significantly while maintaining workspace-aware configurations across different languages and project structures.

How do I configure workspace-aware linting for projects with multiple languages?

Workspace-aware configuration lets you apply different linters to different file types and directories. `hk` uses Pkl configuration with workspace indicators, glob patterns, and exclusive flags to define language-specific linting rules, ensuring each part of your project runs the appropriate tools.

Do Git hooks work with pre-push and pre-commit stages?

Yes, `hk` manages both pre-commit and pre-push hooks, plus other Git hook stages. You configure which linters run at each stage in `hk.pkl`, choose stash strategies to preserve uncommitted changes, and set batch behavior for efficient multi-file processing.

What environment setup do I need before using hk with my linters?

Before configuring `hk`, ensure your linters (Black, Ruff, etc.) are installed and your project has a Git repository. `hk` integrates with common tooling and package managers via mise-en-place and Builtins, but requires these tools to be available in your environment.