mattpocock-setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.
Skill by hedysom
Chalk Labs
Need help deploying mattpocock-setup-pre-commit?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hedysom-mattpocock-setup-pre-commit
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mattpocock-setup-pre-commit
What's inside
- Skill name
mattpocock-setup-pre-commit- Description
- 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.
- License
- MIT
- Instructions
- 88 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Setup Pre-Commit Hooks
## What This Sets Up
- **Husky** pre-commit hook
- **lint-staged** running Prettier on all staged files
- **Prettier** config (if missing)
- **typecheck** and **test** scripts in the pre-commit hook
## Steps
### 1. Detect package manager
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.
### 2. Install dependencies
Install as devDependencies:
```
husky lint-staged prettier
```
### 3. Initialize Husky
```bash
npx husky init
```
This creates `.husky/` dir and adds `prepare: "husky"` to package.json.
### 4. Create `.husky/pre-commit`
Write 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.
### 5. Create `.lintstagedrc`
```json
{
"*": "prettier --ignore-unknown --write"
}
```
### 6. Create `.prettierrc` (if missing)
Only create if no Prettier config exists. Use these defaults:
```json
{
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": false,
"trailingComma": "es5",
"semi": true,
"arrowParens": "always"
}
```
### 7. Verify
- [ ] `.husky/pre-commit` exists and is executable
- [ ] `.lintstagedrc` exists
- [ ] `prepare` script in package.json is `"husky"`
- [ ] `prettier` config exists
- [ ] Run `npx lint-staged` to verify it works
### 8. Commit
Stage all changed/created files and commit with message: `Add pre-commit hooks (husky + lint-staged + prettier)`
This will run through the new pre-commit hooks — a good smoke test that everything works.
## Notes
- Husky v9+ doesn't need shebangs in hook files
- `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)
- The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and testsFrom hedysom/pi-mattpocock-skills, MIT.
More from hedysom/pi-mattpocock-skills
- 0.474score
mattpocock-scaffold-exercises
hedysom
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting.
SkillCFreshness: CClaude Code +9 - 0.474score
mattpocock-obsidian-vault
hedysom
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes.
SkillCFreshness: CClaude Code +9 - 0.455score
mattpocock-diagnose
hedysom
Disciplined diagnosis loop for hard bugs and performance regressions.
SkillCFreshness: CClaude Code +9 - 0.455score
mattpocock-git-guardrails-claude-code
hedysom
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-qa
hedysom
Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-request-refactor-plan
hedysom
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-caveman
hedysom
Ultra-compressed communication mode.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-grill-with-docs
hedysom
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as…
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-improve-codebase-architecture
hedysom
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-migrate-to-shoehorn
hedysom
Migrate test files from `as` type assertions to @total-typescript/shoehorn.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-ubiquitous-language
hedysom
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-design-an-interface
hedysom
Generate multiple radically different interface designs for a module using parallel sub-agents.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Apr 28, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hedysom/pi-mattpocock-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hedysom
- 0.474score
mattpocock-obsidian-vault
hedysom
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes.
SkillCFreshness: CClaude Code +9 - 0.474score
mattpocock-scaffold-exercises
hedysom
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting.
SkillCFreshness: CClaude Code +9 - 0.455score
mattpocock-git-guardrails-claude-code
hedysom
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute.
SkillCFreshness: CClaude Code +9 - 0.455score
mattpocock-diagnose
hedysom
Disciplined diagnosis loop for hard bugs and performance regressions.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-improve-codebase-architecture
hedysom
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.
SkillCFreshness: CClaude Code +9 - 0.450score
mattpocock-design-an-interface
hedysom
Generate multiple radically different interface designs for a module using parallel sub-agents.
SkillCFreshness: CClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get mattpocock-setup-pre-commit running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
mattpocock-setup-pre-commit skill. Agent Mart. https://agentmart.dev/skills/hedysom-mattpocock-setup-pre-commit (last updated 2026-10-24)