CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

setup-pre-commit

在当前仓库设置 Husky pre-commit hooks,集成 lint-staged (Prettier)、类型检查和测试。适用于用户想添加 pre-commit hooks、设置 Husky、配置 lint-staged,或在提交时运行格式化、类型检查和测试时。

Quality

88%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

78%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.

A well-structured, executable setup guide with exact file contents, a verification checklist, and sensible adaptation notes. The main improvements are small: deduplicate the shebang note, give the literal install command, and add recovery guidance for failed verification checks.

Suggestions

State the shebang rule once — either the step-4 parenthetical or the 备注 bullet — instead of repeating "Husky v9+ 不需要 shebang" in both places.

In step 2, provide the literal install command per detected package manager (e.g., `npm install -D husky lint-staged prettier`, `pnpm add -D ...`) instead of just listing the package names.

Add a short recovery note to the step-7 verification checklist, e.g., if `.husky/pre-commit` is not executable run `chmod +x .husky/pre-commit`, so failed checks have a feedback loop.

DimensionReasoningScore

Conciseness

The body is lean and step-driven with no background padding — it never explains what Husky or Prettier are. However, the Husky v9 shebang note is stated twice ("Husky v9+ 不需要 shebang" in step 4 and again in 备注), a minor duplication that could be trimmed, placing it at anchor 4 rather than 5.

4 / 5

Actionability

Most guidance is copy-paste ready: exact `.husky/pre-commit` contents, exact `.lintstagedrc` and `.prettierrc` JSON, `npx husky init`, and an exact commit message. The minor gap is step 2, which lists the packages ("husky lint-staged prettier") without the literal per-package-manager install command, fitting anchor 4's 'minor gaps' rather than anchor 5's fully-executable standard.

4 / 5

Workflow Clarity

Steps 1–8 are clearly sequenced with an explicit verification checklist in step 7 and a smoke-test rationale for the commit in step 8, plus adaptation guidance for missing scripts. It falls short of anchor 5 because there is no error-recovery feedback loop telling Claude what to do if a checklist item fails (e.g., the pre-commit file not being executable).

4 / 5

Progressive Disclosure

This is a single-file, single-purpose skill (~87 lines) with no bundle directories and no content that warrants separate reference files; sections are well-organized with clear headers. Per the simple-skill scoring note, this earns a 5 with just well-organized sections.

5 / 5

Total

17

/

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 that clearly states what the skill does and when to use it, with concrete named tools (Husky, lint-staged, Prettier) and natural trigger phrases. Only minor room to grow in synonym coverage for trigger terms.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — "设置 Husky pre-commit hooks,集成 lint-staged (Prettier)、类型检查和测试" (set up Husky pre-commit hooks, integrate lint-staged (Prettier), typecheck and tests) — which comprehensively covers the skill's actions. It matches anchor 5 rather than 4 because there are no coverage gaps relative to what the skill does; it stays in third person with no voice penalty.

5 / 5

Completeness

Both 'what' ("在当前仓库设置 Husky pre-commit hooks,集成 lint-staged (Prettier)、类型检查和测试") and 'when' ("适用于用户想添加 pre-commit hooks、设置 Husky、配置 lint-staged,或在提交时运行格式化、类型检查和测试时") are explicitly stated. The when-clause enumerates concrete trigger phrases, matching anchor 5's pattern exactly rather than anchor 4's 'when could be more explicit'.

5 / 5

Trigger Term Quality

Natural trigger phrases users would say are present: "添加 pre-commit hooks", "设置 Husky", "配置 lint-staged", "在提交时运行格式化、类型检查和测试", plus tool names Prettier and lint-staged. It falls short of anchor 5's comprehensive synonym coverage — variations like "git hooks" or "提交前运行测试" (run tests before commit) are missing.

4 / 5

Distinctiveness Conflict Risk

The description occupies a clear niche — Husky/lint-staged pre-commit setup — with distinct, named triggers (Husky, lint-staged, pre-commit hooks). Conflict risk with generic formatting or testing skills is minimal, matching anchor 5.

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

vinvcn/mattpocock-skills-zh-CN

Path

skills/misc/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.