/mauriciovieira-skills:setup-pre-commitfrom mauriciovieira-skills
Set up Husky pre-commit hooks with lint-staged (Biome), 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/linting/typechecking/testing.
Ships in mauriciovieira-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Check for package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn), bun.lockb (bun). Use whichever is present. Default to npm if unclear.
Install as devDependencies:
husky lint-staged @biomejs/biome
npx husky init
This creates .husky/ dir and adds prepare: "husky" to package.json.
.husky/pre-commitWrite this file (no shebang needed for Husky v9+):
npx lint-staged
npm run typecheck
npm run test
Adapt: Replace npm with detected package manager. If repo has no typecheck or test script in package.json, omit those lines and tell the user.
.lintstagedrc{
"*": "biome check --write --no-errors-on-unmatched"
}
biome check formats and lints. --write applies safe fixes; --no-errors-on-unmatched stops Biome erroring when a staged file isn't a type it handles (images, etc.).
biome.json (if missing)Only create if no Biome config exists (biome.json or biome.jsonc). Use these defaults:
{
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5",
"semicolons": "always",
"arrowParentheses": "always"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
Pin the $schema version to the installed Biome version (check npx biome --version) so the config matches the binary.
.husky/pre-commit exists and is executable.lintstagedrc existsprepare script in package.json is "husky"biome.json config existsnpx lint-staged to verify it worksStage all changed/created files and commit with message: Add pre-commit hooks (husky + lint-staged + biome)
This will run through the new pre-commit hooks — a good smoke test that everything works.
biome check does formatting and linting in one pass — no separate Prettier/ESLint steps--no-errors-on-unmatched skips files Biome can't handle (images, etc.) instead of failing the commitWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
45 skills in this plugin
/ansible-kamalUse when bootstrapping a Rails project that needs Ubuntu VPS provisioning (Ansible) and Kamal 2 deploy (kamal-proxy on 80/443) — scaffolds infra/ansible, infra/kamal, config/deploy*.yml, .kamal/secrets* templates from a hardened reference layout, asking IP, DNS, and whether the host runs both staging+production or only a single domain./babysit-with-github-copilotBabysit a PR through GitHub Copilot review until merge. Use when the user asks to "babysit PR/batch-grill-meA relentless interview that asks every frontier question at once, round by round./chrome-devtools-mcpScaffolds a dedicated Chrome instance with an isolated, persistent profile plus a chrome-devtools-mcp (CDP) server registration, so Claude can inspect authenticated network traffic in a web app - list open tabs, navigate, and read real requests (method, URL, sensitive headers, body, response shape) to reverse-engineer an API. Use when the user wants to inspect authenticated traffic in a browser, capture real headers/cookies for an integration, reverse-engineer a web app's undocumented API, or asks to set up chrome-devtools-mcp / CDP debugging./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.npx claudepluginhub mauriciovieira/skills --plugin mauriciovieira-skills