modules/programs/agents/shared/skills/init-lefthook/SKILL.md
Set up lefthook with standard pre-commit hooks
npx skillsauth add MichaelVessia/nixos-config init-lefthookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up lefthook with standard pre-commit checks for this project.
Detect environment:
flake.nix (if yes, ask if hooks should use nix develop -c).beads/ directoryInstall lefthook:
[bun/pnpm/npm] add -D lefthook
Create lefthook.yml:
Standard (with beads):
pre-commit:
commands:
beads-sync:
run: |
if command -v bd >/dev/null 2>&1 && [ -d .beads ]; then
bd sync --flush-only >/dev/null 2>&1 || echo "Warning: bd sync failed"
git add .beads/issues.jsonl 2>/dev/null || true
fi
priority: 1
format-fix:
glob: "*.{ts,tsx,mjs,js,jsx}"
run: bunx oxfmt {staged_files}
stage_fixed: true
priority: 2
lint-fix:
glob: "*.{ts,tsx,mjs,js,jsx}"
run: bunx oxlint --fix {staged_files}
stage_fixed: true
priority: 3
typecheck:
run: bun run typecheck
priority: 4
test:
run: bun run test
priority: 4
post-merge:
commands:
beads-prime:
run: |
if command -v bd >/dev/null 2>&1 && [ -d .beads ]; then
bd prime >/dev/null 2>&1 || true
fi
install-deps:
run: bun install
Without beads: Omit beads-sync, beads-prime commands.
With nix develop: Prefix commands with nix develop -c or nix develop --command:
run: nix develop -c bunx oxfmt {staged_files}run: nix develop -c bun run typecheckRun lefthook install:
[bunx/npx/pnpm] lefthook install
Add to .gitignore (if not present):
.lefthook-local.yml
Summary: List created files and note that hooks are active.
typecheck or test scripts, omit those hookstools
User guide for the local squash-safe `stack` CLI for stacked PR/MR repair on GitHub and GitLab. Use when someone asks how to inspect, track, sync, merge, document, or undo stacked pull requests / merge requests in squash-merge repositories. Prefer this tool over GitHub's `gh stack` command for this workflow.
tools
Control herdr from inside it. Manage workspaces and tabs, split panes, spawn agents, read output, and wait for state changes — all via CLI commands that talk to the running herdr instance over a local unix socket. Use when running inside herdr (HERDR_ENV=1).
development
Inspect my self-hosted AutoCaliWeb library. Use when the user asks about AutoCaliWeb, books in Calibre, OPDS status, recent imports, shelves, catalog stats, or wants to search the ebook library.
data-ai
Subscribe a YouTube channel in TubeArchivist, queue its top videos by views from recent uploads, wait for the first file, scan Jellyfin, and rename + lock the channel folder to a friendly display name. Use when the user says "add a youtube channel", "subscribe to <channel>", or wants a curated TubeArchivist + Jellyfin import for a creator.