一键导入
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | run-pre-commit-checks |
| description | Run the mandatory pre-commit checks before committing code. Includes lint, type checking, and unit tests. MUST be run before every commit. |
| argument-hint | --fix to auto-fix lint issues |
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/).
Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the #1 source of issues. Use this skill when reviewing or writing path-related code.
Generate a codebase health snapshot for technical debt tracking and planning. Analyzes git history, code complexity, debt markers, and dependencies to identify hotspots and refactoring priorities.
Environment manager-specific discovery patterns and known issues. Use when working on or reviewing environment discovery code for conda, poetry, pipenv, pyenv, or venv.
VS Code settings precedence rules and common pitfalls. Essential for any code that reads or writes settings. Covers getConfiguration scope, inspect() vs get(), and multi-workspace handling.
Debug a failing test using an iterative logging approach, then clean up and document the learning.
Run E2E tests to verify complete user workflows like environment discovery, creation, and selection. Use this before releases or after major changes.