Loading...
Loading...
Comprehensive review of staged Git changes for risk assessment, error detection, and impact analysis. Use when the user wants to review staged changes, check for errors before commit, analyze risks in git staged files, validate code changes before committing, or needs suggestions on staged modifications.
npx skill4agent add adonis0123/adonis-skills staged-changes-review# Get the diff of staged changes
git diff --cached
# Get list of staged files
git status --short | grep "^[MARC]"# Search for usages of modified functions/classes
git grep -n "functionName" -- "*.js" "*.ts"
# Check if migrations are included for schema changes
find . -name "*migration*" -mtime -1
# Review related test files
git diff --cached --name-only | grep test# View full file context
git show HEAD:<filename>
# Search related code patterns
git grep -n "relatedPattern" -- "*.ext"| Level | Score | Examples |
|---|---|---|
| HIGH | 90-100 | Syntax errors, type mismatches, clear security issues |
| MEDIUM | 60-89 | Potential logic errors, suspicious patterns |
| LOW | 20-59 | Code smells, style concerns |
## Staged Changes Review
### Summary
- **Files Changed**: <count>
- **High Risk Issues**: <count>
- **Medium Risk Issues**: <count>
- **Security Concerns**: <count>
### Critical Issues (Confidence >= 80)
#### 1. [Category] Issue Title
**File**: `path/to/file.ext:line`
**Severity**: CRITICAL | HIGH | MEDIUM
**Confidence**: <score>/100
**Problem**: [Description]
**Impact**: [What happens if committed]
**Recommendation**: [Specific fix]
### Files Review Summary
| File | Status | Issues | Risk Level |
|------|--------|--------|-----------|
| path/to/file1 | Clean | 0 | Low |
| path/to/file2 | Warning | 2 | Medium |
| path/to/file3 | Critical | 1 | High || Perspective | Key Checks |
|---|---|
| Syntax | Imports, types, brackets, API usage |
| Logic | Null access, loops, error handling, async |
| Breaking | API changes, schema, dependencies |
| Security | Secrets, injection, XSS, auth |
references/language-patterns.mdreferences/edge-cases.md