Loading...
Loading...
Use this skill when > Configure automated code quality checks at commit time using Husky and lint-staged. Sets up pre-commit hooks for formatting (Prettier), type checking, and tests. Adapts to existing project configurations and omits missing scripts gracefully.
npx skill4agent add akillness/oh-my-skills setup-pre-commitdeployment-automationgit-workflowtesting-strategies# Check for lockfiles in order of precedence
ls package-lock.json # npm
ls yarn.lock # yarn
ls pnpm-lock.yaml # pnpm
ls bun.lockb # bun# npm
npm install --save-dev husky lint-staged prettier
# pnpm
pnpm add -D husky lint-staged prettier
# yarn
yarn add -D husky lint-staged prettiernpx husky init.husky/preparepackage.json.husky/pre-commitnpx lint-staged
npm run typecheck # omit if script doesn't exist
npm test # omit if script doesn't exist.lintstagedrc{
"**/*": "prettier --write --ignore-unknown"
}.prettierrc{
"tabWidth": 2,
"printWidth": 80,
"singleQuote": false,
"trailingComma": "es5",
"semi": true,
"arrowParens": "always"
}git add -A
git commit -m "test: verify pre-commit hooks"typechecktestpackage.json.agent-skills/skill-standardization/SKILL.md.agent-skills/skill-standardization/scripts/validate_skill.sh