smithery.ai

pre-commit

Run before committing code. Runs lint, format, type check, and tests to ensure code quality. Use when preparing to commit changes or when asked to verify code quality.

First seen Apr 6, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,418 B
  • docs SUMMARY.md 185 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Pre-Commit Checklist

Run these checks before committing code to ensure quality.

Quick Commands

npm run check      # TypeScript type checking
npm run lint       # Prettier + ESLint check
npm run test       # Run all tests
npm run format     # Auto-fix formatting issues

Full Pre-Commit Flow

  1. Format code (auto-fix):

``bash npm run format ``

  1. Check types:

``bash npm run check ``

  1. Run linter:

``bash npm run lint ``

  1. Run tests:

``bash npm run test ``

  1. Stage and commit (if all pass):

``bash git add <files> git commit -m "message" ``

One-Liner

Run all checks in sequence (stops on first failure):

npm run format && npm run check && npm run lint && npm run test

Common Issues

Issue Fix
Prettier errors Run npm run format
ESLint errors Fix manually or check .eslintrc
Type errors Fix TypeScript issues in code
Test failures Fix failing tests before commit

Notes

  • Always run checks before pushing to remote
  • Format first to avoid unnecessary lint errors
  • Tests should pass in CI - don't skip locally