CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

95

1.33x
Quality

94%

Does it follow best practices?

Impact

100%

1.33x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is setup-pre-commit in mattpocock/skills

SKILL.md
Quality
Evals
Security

Quality

Content

92%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

An efficient, highly actionable skill body with a clear sequenced workflow, verification checklist, and appropriate single-file structure. The sole weakness is the install step, which lists packages rather than the executable install command for each package manager.

Suggestions

Replace the bare package list with the actual per-package-manager install commands (e.g., `npm install -D husky lint-staged prettier`, `pnpm add -D ...`) so step 2 is copy-paste ready.

Note that `npm run test` in the pre-commit hook can hang if the repo's test script uses watch mode, and suggest a non-watch invocation (e.g., `test -- --run` or `CI=true npm run test`).

Clarify in step 7 how to make `.husky/pre-commit` executable (e.g., `chmod +x`) since the checklist asserts executability but no step establishes it.

DimensionReasoningScore

Conciseness

The body is lean and imperative with zero padding: commands, file contents, and short adapt notes. The Notes section carries only non-obvious facts (v9 shebang behavior, --ignore-unknown, run ordering), so every token earns its place. This matches anchor 5 rather than anchor 4, which expects trimmable over-explanation.

5 / 5

Actionability

Guidance is largely copy-paste ready: `npx husky init`, verbatim contents for `.husky/pre-commit`, `.lintstagedrc`, and `.prettierrc`, plus a concrete verify step. However, the install step shows only the package list `husky lint-staged prettier` without the actual install command per detected package manager (e.g., `npm install -D ...`), a minor gap that fits anchor 4 ("concrete code or commands with minor gaps") rather than anchor 5's fully copy-paste-ready bar.

4 / 5

Workflow Clarity

The eight numbered steps are clearly sequenced with an explicit verification checklist (step 7), conditional adaptation ("If repo has no `typecheck` or `test` script in package.json, omit those lines and tell the user"), and a final commit that doubles as a smoke test. This matches the anchor for explicit validation steps and error-recovery guidance, exceeding anchor 4's "minor validation gaps".

5 / 5

Progressive Disclosure

There are no bundle files; this compact single-task skill (~90 lines) keeps everything appropriately inline with well-organized sections (What This Sets Up, Steps, Notes). Nothing belongs in a separate reference file, and there are no nested or buried references, matching the well-organized-structure condition for a top score.

5 / 5

Total

19

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description with concrete capabilities, an explicit trigger clause, and a clearly bounded niche. The only weakness is keyword coverage that omits a few natural synonyms such as "git hooks" or "format on commit".

Suggestions

Add a few natural trigger synonyms such as "git hooks", "format on commit", or "run tests before committing" to broaden keyword coverage.

Consider mentioning the JS/Node repo context explicitly (e.g., "in Node.js projects") to sharpen distinctiveness against non-JS commit-hook tooling.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — "Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo" — with comprehensive coverage of the skill's scope. It matches the anchor for multiple specific concrete actions rather than the anchor 4 example, which anticipates gaps in coverage.

5 / 5

Completeness

It explicitly answers both questions: the "what" in the first sentence (Husky + lint-staged/Prettier + type checking + tests) and the "when" via a concrete "Use when..." clause with specific trigger phrases. This matches the anchor 5 example structure exactly.

5 / 5

Trigger Term Quality

"Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing" covers good natural phrases users would say. A few common variations are missing (e.g., "git hooks", "format on commit", "run prettier before commit"), which places it at anchor 4 rather than the comprehensive synonym/extension coverage of anchor 5.

4 / 5

Distinctiveness Conflict Risk

The skill occupies a clear niche (JS pre-commit tooling: Husky, lint-staged, Prettier) with distinct named triggers, making conflict with other skills unlikely. It is not merely anchor 4's "minor overlap risk" — the named tools make it uniquely identifiable.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

SnowingFox/ai-skills

Path

.cursor/skills/setup-pre-commit/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.