microsoft/run-pre-commit-checks
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
npx skills add https://github.com/microsoft/vscode-python-environments --skill run-pre-commit-checks
This skill defines the mandatory checks that must pass before any commit.
All three checks must pass before committing:
npm run lint
What it checks:
eslint.config.mjsTo auto-fix issues:
npm run lint -- --fix
npm run compile-tests
What it checks:
Output location: out/ directory (not used for production)
npm run unittest
What it checks:
src/test/ passbuild/.mocha.unittests.json# Run all checks in sequence
npm run lint
npm run compile-tests
npm run unittest
# If all pass, commit
git add -A
git commit -m "feat: your change description (Fixes #N)"
| Error | Fix |
| ------------------------------------ | ------------------------------------------------------ |
| @typescript-eslint/no-unused-vars | Remove unused variable or prefix with _ |
| import/order | Run npm run lint -- --fix |
| @typescript-eslint/no-explicit-any | Add proper type annotation |
| no-console | Use traceLog/traceVerbose instead of console.log |
| Error | Fix |
| -------------------------------------- | --------------------------------------- |
| TS2339: Property does not exist | Check property name or add type guard |
| TS2345: Argument type not assignable | Check function parameter types |
| TS2322: Type not assignable | Add type assertion or fix type mismatch |
| TS18048: possibly undefined | Add null check or use optional chaining |
The maintainer agent workflow requires:
Code Change → Reviewer Agent → Pre-Commit Checks → Commit
↓
Fix Issues → Re-run Reviewer → Pre-Commit Checks
Never skip pre-commit checks. They catch:
These checks should also be run:
The hooks system can automate running lint after file edits (see .github/hooks/).
Take microsoft/run-pre-commit-checks from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.