microsoft/vscode-python-environments/run-pre-commit-checks
Claude Code and agent skill by microsoft/vscode-python-environments
- vendor
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
Install
npx vskill@latest install microsoft/vscode-python-environments/run-pre-commit-checksSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Run Pre-Commit Checks
This skill defines the mandatory checks that must pass before any commit.
When to Use
- ALWAYS before committing code changes
- After fixing reviewer or Copilot review comments
- Before pushing changes
- When the maintainer agent requests pre-commit validation
Required Checks
All three checks must pass before committing:
1. Lint Check (Required)
What it checks:
- ESLint rules defined in
eslint.config.mjs - TypeScript-specific linting rules
- Import ordering and unused imports
- Code style consistency
To auto-fix issues:
2. Type Check (Required)
What it checks:
- TypeScript type errors
- Missing imports
- Type mismatches
- Strict null checks
Output location: out/ directory (not used for production)
3. Unit Tests (Required)
What it checks:
- All unit tests in
src/test/pass - Tests run with Mocha framework
- Uses configuration from
build/.mocha.unittests.json
Full Pre-Commit Workflow
Common Failures and Fixes
ESLint Errors
| 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 |
Type Errors
| 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 |
Test Failures
- Read the test failure message carefully
- Check if you changed behavior that tests depend on
- Update tests if behavior change is intentional
- Fix code if behavior change is unintentional
Integration with Review Process
The maintainer agent workflow requires:
Never skip pre-commit checks. They catch:
- Type errors that would break the extension
- Style inconsistencies
- Regressions in existing functionality
Automation Note
These checks should also be run:
- By CI on every PR (automated)
- After addressing review comments (manual trigger)
- Before merging (automated by CI)
The hooks system can automate running lint after file edits (see .github/hooks/).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 9 Jul 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/run-pre-commit-checks/SKILL.md
Popularity
- Repository stars
- 130
- Repository forks
- 49
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/vscode-python-environments/run-pre-commit-checks)