hk

Migrate legacy git hooks to maintainable hk.pkl configurations.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/hschne/pi-stuff --skill hk-hschne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hk
Source: https://github.com/hschne/pi-stuff/tree/main/skills/hk
Command: npx skills add https://github.com/hschne/pi-stuff --skill hk-hschne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the hassle of managing fragmented, duplicated git hook configurations across projects, especially when migrating away from legacy pre-commit setups or mise hook wrappers to a unified hk workflow.

Core Features & Use Cases

  • Pkl-based hk Configuration: Write clean, maintainable hk.pkl files to orchestrate git hooks, replacing old .git/hooks shims and duplicate pre-commit configurations.
  • Mise Task Integration: Reuse existing mise lint and fix task definitions in hk configs to avoid duplicating command logic across projects.
  • Hook Validation & Debugging: Validate hk configs, preview hook execution plans, and troubleshoot staged-file linting or autofix hook issues.
  • Use Case: For example, if your team uses mise to run linters but has a messy, unmaintained pre-commit setup, this Skill guides you through migrating to a single source of truth in hk.pkl without breaking existing workflows.

Quick Start

Use the hk skill to migrate your project's existing pre-commit hooks to a clean hk.pkl configuration that reuses your current mise lint and fix tasks.

Frequently Asked Questions about hk

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

FAQPage Schema
How do I migrate pre-commit configurations to a unified hk.pkl setup?

Migrating pre-commit configurations to hk involves writing a clean hk.pkl file that orchestrates git hooks, replacing fragmented .git/hooks shims and eliminating duplicate wrapper scripts. This provides a single source of truth for hook management.

Can I reuse existing mise lint and fix tasks in hk hook configurations?

Yes, hk supports mise task integration, allowing you to reuse existing mise lint and fix task definitions directly in your hk configs. This avoids duplicating command logic across development projects and maintains workflow continuity.

What is the best way to configure staged-file linting with hk and Pkl?

Configuring staged-file linting with hk requires defining your linting rules within a maintainable hk.pkl file. This Pkl-based approach replaces legacy pre-commit setups and standardizes hook execution across your projects.

How do I validate hk hook execution plans and troubleshoot autofix hooks?

You can validate hk configs and preview hook execution plans to troubleshoot staged-file linting or autofix hook issues. This validation ensures your hk.pkl configurations execute correctly before committing changes.

Does hk work with existing git hooks and mise wrappers without breaking workflows?

Yes, hk is designed for migration scenarios from pre-commit or mise hook systems, allowing you to transition to Pkl-based hook orchestration without breaking existing development workflows. It removes legacy shims while preserving task logic.