From utility
Detect project language and toolchain, then configure pre-commit hooks that enforce formatting, type checking, and tests. Gives agents deterministic feedback loops they cannot bypass. Use when user says "setup pre-commit", "setup guard rails", "add pre-commit hooks", "enforce feedback loops", or wants to prevent agents from committing broken code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/utility:setup-pre-commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect the project's language and toolchain, then install pre-commit hooks that deterministically
Detect the project's language and toolchain, then install pre-commit hooks that deterministically enforce code quality on every commit. Agents cannot bypass these -- a failing check blocks the commit and reports the error back.
Scan the project root to determine:
tsconfig.json, Cargo.toml, go.mod, pyproject.toml,
requirements.txt, mix.exs, Gemfile, etc.pnpm-lock.yaml, package-lock.json, yarn.lock,
Cargo.lock, go.sum, poetry.lock, etc.).husky/, .pre-commit-config.yaml, .lefthook.yml, git hooks dirtypecheck, test, lint, format scripts/tasksPresent findings and proposed hook strategy:
Detected: {language} with {package manager} Formatter: {tool} | none detected Linter: {tool} | none detected Type checker: {tool} | not applicable Test runner: {tool} | none detected Existing hooks: {tool} | none
Proposed checks:
- {format step}
- {lint step}
- {typecheck step} (if applicable)
- {test step}
Proceed?
If critical tools are missing (no test runner, no formatter), flag it and ask how to proceed.
Based on detected stack:
husky + lint-staged via detected package managerhusky initpre-commit framework (pip install pre-commit or add to dev dependencies)pre-commit installcargo-husky or a shell-based git hooklefthook or a shell-based git hook.git/hooks/pre-commit or use lefthook/pre-commit frameworkConfigure the hook to run checks in order:
Adapt to project conventions -- use existing scripts/tasks where they exist rather than inventing new ones. If a monorepo, scope checks to affected packages where possible.
Report which checks are enforced and confirm the hook is working.
Commit all setup files (hook config, formatter config if new, package/dependency changes, lockfile updates).
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub xxkeefer/skills --plugin utility