skills/coding/pre-commit-review/SKILL.md
Chain-combined skill that merges git-commit behavior with code-review judgment to create intelligent pre-commit workflow. Encapsulates the decision of WHEN to require review before commit, WHAT to check in pre-commit review, and HOW to structure commit workflow. Use when user mentions pre-commit review, commit with review, pre-commit checks, or when they want to establish commit quality gates. Triggers especially when user says "should I review before commit?", "what should I check before committing?", "commit workflow", or when they're unsure whether their commit is ready.
npx skillsauth add ImaginerLabs/skill-manager pre-commit-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pre-commit-review is a chain-combined behavioral specification skill that merges:
git-commit — Intelligent commit behavior规范code-review — Review judgment and criteriastaged-code-review — Focused pre-commit workflowThe core judgment it encapsulates: "When should I require review before committing, and what should that review cover?"
This skill doesn't just execute a workflow — it embodies the decision-making framework of an experienced developer who knows when commits need extra scrutiny.
Not every commit needs review. This skill helps you navigate the spectrum:
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Quick Fix │ ──► │ Normal Push │ ──► │ Major UX │
│ (instant) │ │ (reviewed) │ │ (reviewed) │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Any pattern │ │ Complex │ │ Breaking │
│ Trivial fix │ │ logic │ │ changes │
│ Doc updates │ │ Business │ │ New API │
└─────────────┘ │ logic │ └─────────────┘
└──────────────┘
┌─ Is this a hotfix?
│ └─ NO → Continue
│ └─ YES → Commit freely (but document)
│
└─ Does this affect other teams?
└─ YES → Require review
└─ NO → Continue
│
└─ Is logic complex (>10 lines changed)?
└─ YES → Recommend review
└─ NO → Continue
│
└─ Does this touch security/auth?
└─ YES → Require review
└─ NO → Commit freely
Before EVERY commit, run through these checkpoints:
# Review what you're about to commit
git diff --staged --stat
# Check for unexpected changes
git diff --staged --name-only
Ask yourself:
Run these checks mentally (or with tools):
| Check | What to Look For | |-------|------------------| | Naming | Variables/functions clearly named? | | Complexity | Any function >20 lines doing multiple things? | | Comments | Comments explain WHY, not WHAT? | | Tests | Logic changes have corresponding tests? | | Types | New code properly typed (TypeScript)? |
Does your commit message follow convention?
<type>(<scope>): <subject>
[optional body]
[optional footer]
Check:
Determine if this commit needs extra review:
| Risk Type | Indicators | Action | |-----------|------------|--------| | Security | Auth, permissions, data handling | Mandatory review | | Data | Database, migrations, queries | Mandatory review | | API | Endpoint changes, contracts | Mandatory review | | Breaking | Public API, major behavior | Mandatory review |
| Risk Type | Indicators | Action | |-----------|------------|--------| | Business | Core logic, calculations | Consider review | | Complex | Multi-file, non-trivial | Consider review | | Shared | Utils, shared components | Consider review |
| Type | Examples | |------|----------| | Chores | Deps, configs, build | | Docs | Readme, comments | | Fixes | Simple bug fixes (1-3 lines) | | Refactors | Rename, format (no logic) |
When review IS needed, here's the focused protocol:
Based on risk assessment, here's when to use each type:
| Type | When to Use | Review Needed? |
|------|-------------|----------------|
| feat | New features | Recommended |
| fix | Bug fixes | Low risk: No / High risk: Yes |
| docs | Documentation | No |
| refactor | Restructure (no behavior change) | Low risk: No / Complex: Yes |
| perf | Performance improvements | Recommended |
| test | Adding tests | No |
| build | Build system changes | Yes |
| ci | CI/CD changes | Yes |
| chore | Maintenance | No |
PRE-COMMIT REVIEW CHECKLIST
==========================
□ 1. Changes are intentional
□ 2. No debug code (console.log, debugger)
□ 3. No credentials or secrets
□ 4. Code follows project conventions
□ 5. Types are properly defined
□ 6. Tests cover new logic
□ 7. Commit message follows convention
□ 8. Subject line ≤72 chars
□ 9. Imperative mood used
□ 10. Breaking changes documented
RISK ASSESSMENT
===============
□ Security-sensitive changes?
□ Data integrity affected?
□ API contract changed?
□ Breaking change?
REVIEW REQUIRED? [ ] YES [ ] NO
If YES, reviewer: _______________
When using git-commit, extend it with pre-commit-review judgment:
1. git add <files>
2. Run pre-commit-review judgment
3. Based on risk assessment:
- Low risk → Proceed with git commit
- Medium risk → Do quick self-review
- High risk → Find a reviewer first
4. Write commit message (use convention)
5. Execute commit
<type>(<scope>): <subject>
<body>
<footer>
---
Reviewed by: [reviewer]
Risk level: [low/medium/high]
Tests added: [yes/no]
Breaking change: [yes/no]
Analysis:
- 3 files changed, 50 lines added
- Touches authentication logic
- Adds new API endpoint
Risk: HIGH (security + API)
Recommendation: Get review before committing.
Analysis:
- 1 file changed, 5 lines
- Documentation only
- No logic affected
Risk: LOW
Recommendation: Commit freely.
Analysis:
- 5 files changed
- Shared utility used by 10+ places
- No behavior change (rename/format)
Risk: MEDIUM (high blast radius)
Recommendation: Self-review carefully, or get quick review from one person.
Code review isn't criticism — it's collaboration. Frame it positively.
Large commits are hard to review. If you need review, small commits are easier to approve.
Your judgment about "is this ready" improves with experience. This skill helps you formalize that judgment.
The same change might need review in one codebase but not another. Consider:
If you're unsure whether to review, the answer is usually "yes."
git-commit — The commit execution skill this builds uponcode-review — Provides the review criteriastaged-code-review — Provides the focused review protocolsafe-refactor — Use before refactoring to ensure coveragetest-think — Use to determine what tests are neededdevelopment
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
devops
Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.
tools
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
documentation
Generates standardized porting documentation from completed feature changes. Analyzes commit diffs or file contents, extracts change intent, and outputs Markdown documentation for cross-team understanding. Should be used when the user needs to document a change for cross-team or cross-project consumption. Distinguished from cross-branch-fix-porter which actively re-implements fixes, this skill documents changes.