com um clique
review-commit
// Reviews a git commit to create a test plan document. Invoke when user asks to review a commit, analyze changes, or create test coverage plan for recent changes.
// Reviews a git commit to create a test plan document. Invoke when user asks to review a commit, analyze changes, or create test coverage plan for recent changes.
Guide how to write test cases in this project by first analyzing the target class to decide which test pattern, base class, and test utilities to use. Activate when user asks to write tests, add test coverage, or create test cases for any class.
Identifies and fixes bugs systematically. Invoke when user reports an error, test failure, or unexpected behavior that needs debugging and fixing.
| name | review-commit |
| description | Reviews a git commit to create a test plan document. Invoke when user asks to review a commit, analyze changes, or create test coverage plan for recent changes. |
This skill analyzes a git commit and generates a comprehensive test plan document for all changed files.
Invoke this skill when:
Use git commands to identify all changed files in the target commit:
# Get commit info
git log -1 --pretty=format:"%H%n%an%n%ad%n%s%n%b"
# Get all changed files with status (A=Added, M=Modified, D=Deleted)
git diff HEAD~1 --name-status
# Get list of changed files only
git diff HEAD~1 --name-only
Organize the changed files into categories:
Filter to focus on source code files:
src/main/kotlin/**/*.kt - Main source filessrc/main/java/**/*.java - Java source filesFor each changed source file:
mcp_Filesystem_read_text_file or Read toolCreate a markdown document at docs/test-plan-<feature-name>.md with:
# Test Case Plan for Commit: <commit-message>
**Commit:** `<commit-hash>`
**Author:** <author>
**Date:** <date>
**Message:** <commit-message>
---
## Summary
<Brief description of what the commit changes>
---
## 1. New Classes Requiring Tests (Added - A)
### 1.1 <Category Name>
| Class | Path | Priority | Test Status | Description |
|-------|------|----------|-------------|-------------|
| `ClassName` | `path/to/File.kt` | **HIGH** | ❌ No test | <Detailed description> |
**Test Scenarios:**
1. **ClassName**
- Test scenario 1
- Test scenario 2
- ...
---
## 2. Modified Classes Requiring Test Updates (Modified - M)
### 2.1 <Category Name>
| Class | Path | Priority | Test Status | Description |
|-------|------|----------|-------------|-------------|
| `ClassName` | `path/to/File.kt` | **MEDIUM** | ✅ Has test | <What changed and what to verify> |
**Test Scenarios:**
1. **ClassName**
- Verify new behavior
- Test edge cases
- ...
---
## 3. Deleted Classes
| Class | Path | Notes |
|-------|------|-------|
| `ClassName` | `path/to/File.kt` | <Why deleted, migration notes> |
---
## 4. Test Implementation Priority
### Phase 1: Critical Tests (HIGH Priority)
| # | Test Class | Target Class | Key Scenarios |
|---|------------|--------------|---------------|
| 1 | `ClassTest` | `Class` | Key scenarios |
### Phase 2: Important Tests (HIGH Priority)
...
### Phase 3: Medium Priority Tests
...
### Phase 4: Low Priority Tests
...
---
## 5. Test File Locations
src/test/kotlin/com/example/ ├── package/ │ ├── ClassTest.kt │ └── ...
---
## 6. Existing Tests to Verify
| Test File | Status | Notes |
|-----------|--------|-------|
| `ExistingTest.kt` | ✅ Modified | <What to verify> |
---
## 7. Test Coverage Summary
| Category | Total | Has Test | Needs Test |
|----------|-------|----------|------------|
| New Classes | X | Y | Z |
| Modified Classes | X | Y | Z |
| **Total** | **X** | **Y** | **Z** |
---
## 8. Test Patterns and Utilities
### Test Base Classes
- List applicable test base classes
### Test Data
- Test data file locations
### Mock Utilities
- Available mock utilities
---
## 9. Next Steps
1. ⬜ Review each class without test coverage
2. ⬜ Prioritize based on complexity and usage
3. ⬜ Create test cases following the project's test patterns
4. ⬜ Ensure integration tests cover the full workflow
5. ⬜ Update this document as tests are implemented
For each class in the test plan, include:
Look at existing tests in the project to identify:
User: review the latest commit
The skill will:
git log -1 to get commit infogit diff HEAD~1 --name-status to get changed filesdocs/test-plan-<feature>.mdThe skill produces a comprehensive test plan document that: