RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Windsurf rules/danielvm-git/bigpowers

Windsurf rules

.windsurf/rules/hook-commits.md

Set up 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.

Windsurf rules

Quality

78/100

Scores the file, not the repository.

Length

326 words

12 headings · 5 code blocks

Repository

114

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
danielvm-git/bigpowers/.windsurf/rules/hook-commits.mdRawGitHub
1---
2name: hook-commits
3model: haiku
4description: "Set up 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."
5---
6 
7# Hook Commits
8> **HARD GATE** — **HARD GATE** — Pre-commit and commit-msg hooks must run before any commit lands. Skipping hooks (`--no-verify`) is forbidden unless explicitly authorized for a specific commit and documented.
9 
10 
11## What This Sets Up
12 
13- **Husky** pre-commit hook
14- **lint-staged** running Prettier on all staged files
15- **Prettier** config (if missing)
16- **typecheck** and **test** scripts in the pre-commit hook
17 
18## Steps
19 
20### 1. Detect package manager
21 
22Check for `package-lock.json` (npm), `pnpm-lock.yaml` (pnpm), `yarn.lock` (yarn), `bun.lockb` (bun). Use whichever is present. Default to npm if unclear.
23 
24### 2. Install dependencies
25 
26Install as devDependencies:
27 
28```
29husky lint-staged prettier
30```
31 
32### 3. Initialize Husky
33 
34```bash
35npx husky init
36```
37 
38This creates `.husky/` dir and adds `prepare: "husky"` to package.json.
39 
40### 4. Create `.husky/pre-commit`
41 
42Write this file (no shebang needed for Husky v9+):
43 
44```
45npx lint-staged
46npm run typecheck
47npm run test
48```
49 
50**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.
51 
52### 5. Create `.lintstagedrc`
53 
54```json
55{
56 "*": "prettier --ignore-unknown --write"
57}
58```
59 
60### 6. Create `.prettierrc` (if missing)
61 
62Only create if no Prettier config exists. Use these defaults:
63 
64```json
65{
66 "useTabs": false,
67 "tabWidth": 2,
68 "printWidth": 80,
69 "singleQuote": false,
70 "trailingComma": "es5",
71 "semi": true,
72 "arrowParens": "always"
73}
74```
75 
76### 7. Verify
77 
78- [ ] `.husky/pre-commit` exists and is executable
79- [ ] `.lintstagedrc` exists
80- [ ] `prepare` script in package.json is `"husky"`
81- [ ] `prettier` config exists
82- [ ] Run `npx lint-staged` to verify it works
83 
84### 8. Commit
85 
86Stage all changed/created files and commit with message: `chore: add pre-commit hooks (husky + lint-staged + prettier)`
87 
88This will run through the new pre-commit hooks — a good smoke test that everything works.
89 
90## Notes
91 
92- Husky v9+ doesn't need shebangs in hook files
93- `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)
94- The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests
95 

Commands it names

  • npx husky init
  • npx lint-staged
  • npm run typecheck
  • npm run test
  • pnpm-lock.yaml
  • yarn.lock
  • bun.lockb
  • npm
  • prettier
  • prettier --ignore-unknown

Sections

  • Hook Commits
  • What This Sets Up
  • Steps
  • 1. Detect package manager
  • 2. Install dependencies
  • 3. Initialize Husky
  • 4. Create `.husky/pre-commit`
  • 5. Create `.lintstagedrc`
  • 6. Create `.prettierrc` (if missing)
  • 7. Verify
  • 8. Commit
  • Notes

What it covers

setuptestlint-formatgit-prdependencies

Stack — with the evidence

node

(0.95)

shell

(0.80)

react

(0.70)

astro

(0.70)

express

(0.70)

vitest

(0.70)

typescript

(0.60)

javascript

(0.60)

python

(0.60)

github-actions

(0.60)

Format

Windsurf rules

Cursor's activation model with a different vocabulary — trigger modes instead of rule types — plus hard character caps, which is the one place a format here will silently drop instructions rather than fail loudly.

What the corpus says about it

Repository

Owner
danielvm-git
Language
—
License
—
Archived
no

All configs in this repo

Also in danielvm-git/bigpowers

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
danielvm-git/bigpowers.cursor/rules/align-grid.mdc · 114Cursor rulesnodeshell+8lint-formatdo-notagent-behaviour65/1003 days ago
danielvm-git/bigpowers.cursor/rules/assess-impact.mdc · 114Cursor rulesshellnode+8testtesting-strategydeployment66/1003 days ago
danielvm-git/bigpowers.cursor/rules/audit-code.mdc · 114Cursor rulesshellnode+8setuptestlint-formatstyle+466/1003 days ago
danielvm-git/bigpowers.cursor/rules/audit-plan.mdc · 114Cursor rulesnodeshell+8buildteststylegit74/1003 days ago
danielvm-git/bigpowers.cursor/rules/build-epic.mdc · 114Cursor rulesshellnode+8buildgit58/1003 days ago
danielvm-git/bigpowers.cursor/rules/change-request.mdc · 114Cursor rulesshellnode+8no sections48/1003 days ago
danielvm-git/bigpowers.cursor/rules/commit-message.mdc · 114Cursor rulesshellnode+8lint-formatstyletypesgit+382/1003 days ago
danielvm-git/bigpowers.cursor/rules/compose-workflow.mdc · 114Cursor rulesshellnode+8styledo-notagent-behaviour65/1003 days ago
danielvm-git/bigpowers.cursor/rules/context7-mcp.mdc · 114Cursor rulesshellnode+8style54/1003 days ago
danielvm-git/bigpowers.cursor/rules/craft-skill.mdc · 114Cursor rulesshellnode+8stylearchgitdo-not69/1003 days ago
danielvm-git/bigpowers.cursor/rules/deepen-architecture.mdc · 114Cursor rulesshellnode+8testtesting-strategydo-not57/1003 days ago
danielvm-git/bigpowers.cursor/rules/define-language.mdc · 114Cursor rulesshellnode+8lint-formatdo-not65/1003 days ago
danielvm-git/bigpowers.cursor/rules/define-success.mdc · 114Cursor rulesshellnode+8no sections4/1003 days ago
danielvm-git/bigpowers.cursor/rules/delegate-task.mdc · 114Cursor rulesshellnode+8git62/1003 days ago
danielvm-git/bigpowers.cursor/rules/deploy.mdc · 114Cursor rulesnodeshell+8setupbuildtestdeployment77/1003 days ago
danielvm-git/bigpowers.cursor/rules/design-interface.mdc · 114Cursor rulesshellnode+8styleagent-behaviour58/1003 days ago
danielvm-git/bigpowers.cursor/rules/develop-tdd.mdc · 114Cursor rulesshellnode+8teststylearchtesting-strategy+585/1003 days ago
danielvm-git/bigpowers.cursor/rules/diagnose-root.mdc · 114Cursor rulesshellnode+8no sections39/1003 days ago
danielvm-git/bigpowers.cursor/rules/diagnose-stall.mdc · 114Cursor rulesshellnode+8no sections44/1003 days ago
danielvm-git/bigpowers.cursor/rules/dispatch-agents.mdc · 114Cursor rulesshellnode+8git54/1003 days ago
Diff against .cursor/rules/align-grid.mdc Diff against .cursor/rules/assess-impact.mdc Diff against .cursor/rules/audit-code.mdc Diff against .cursor/rules/audit-plan.mdc Diff against .cursor/rules/build-epic.mdc Diff against .cursor/rules/change-request.mdc Diff against .cursor/rules/commit-message.mdc Diff against .cursor/rules/compose-workflow.mdc Diff against .cursor/rules/context7-mcp.mdc Diff against .cursor/rules/craft-skill.mdc Diff against .cursor/rules/deepen-architecture.mdc Diff against .cursor/rules/define-language.mdc Diff against .cursor/rules/define-success.mdc Diff against .cursor/rules/delegate-task.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/design-interface.mdc Diff against .cursor/rules/develop-tdd.mdc Diff against .cursor/rules/diagnose-root.mdc Diff against .cursor/rules/diagnose-stall.mdc Diff against .cursor/rules/dispatch-agents.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
danielvm-git/bigpowers.windsurf/rules/organize-workspace.md · 114Windsurf rulesshellnode+8buildstylegitdeployment+289/1003 days ago
danielvm-git/bigpowers.windsurf/rules/guard-git.md · 114Windsurf rulesshellnode+8stylearchgitsecurity+289/1003 days ago
danielvm-git/bigpowers.windsurf/rules/quick-fix.md · 114Windsurf rulesshellnode+8teststylegitdeployment+185/1003 days ago
danielvm-git/bigpowers.windsurf/rules/develop-tdd.md · 114Windsurf rulesshellnode+8teststylearchtesting-strategy+585/1003 days ago
danielvm-git/bigpowers.windsurf/rules/session-state.md · 114Windsurf rulesshellnode+8lint-formatstyleagent-behaviour82/1003 days ago
danielvm-git/bigpowers.windsurf/rules/commit-message.md · 114Windsurf rulesshellnode+8lint-formatstyletypesgit+382/1003 days ago
danielvm-git/bigpowers.windsurf/rules/extract-design.md · 114Windsurf rulesnodeshell+8lint-formatstyledependenciesui82/1003 days ago
danielvm-git/bigpowers.windsurf/rules/setup-environment.md · 114Windsurf rulesnodeshell+8setupstylesecuritydo-not+181/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack