review
Structured code review with risk, security, and performance assessment. Use when the user says "/schovi:review", "review this PR", "review #123", "code review", or asks for a review of a GitHub PR, Jira ticket, branch, or local files.
What this skill does
# Review Skill
Structured code review with Risk, Security, Performance, Issues, and Verdict sections.
Casual PR mentions in conversation ("what is #123 about?") belong to the `gh-pr-auto-detector` skill, not this one.
## Codex Compatibility
If a Claude-style custom subagent is unavailable, execute the referenced reviewer workflow directly with available Codex tools. For GitHub PRs, prefer the `gh` CLI commands described in `plugins/schovi/agents/gh-pr-reviewer/AGENT.md`, then condense the result before continuing the review.
## Trigger
- User invokes `/schovi:review <arg>`
- User says "review this PR", "review #123", "code review"
---
## Workflow
### Phase 1: Input Parsing & Classification
**Input Types**:
- GitHub PR: URL, `owner/repo#123`, or `#123`
- Jira ID: `EC-1234`, `IS-8046`, etc.
- File path: `./path/to/file.md` or absolute path
- `this branch` / no arg: local diff review against base branch
- Free-form: description text
**Repository resolution for bare `#123`:**
1. Check conversation history for previous repo context
2. Check cwd: `git remote get-url origin`, parse owner/repo
3. If neither works, ask user to clarify
**Flags**:
- `--quick`: Lighter analysis, faster results
- Default: Deep review
### Phase 2: Context Fetching
**GitHub PR**:
- Spawn `schovi:gh-pr-reviewer:gh-pr-reviewer` via Agent tool
- Returns all changed files with stats, diff, reviews, CI checks
**Jira Issue**:
- Spawn `schovi:jira-analyzer:jira-analyzer` via Agent tool
**Local branch** (`this branch` or no arg):
- Run `git diff` against base branch
- List changed files
**File Path**:
- Read file directly
### Phase 2.5: Source Code Fetching (PRs only)
**Prioritize files** (up to 10 for deep, 3 for quick):
- Top files by total changes
- Core logic files over config/docs
- Related test files
- Exclude: lock files, generated files
**Fetch strategy:**
- Local filesystem when in same repo (preferred)
- GitHub API for remote repos: `gh api repos/OWNER/REPO/contents/PATH?ref=BRANCH`
**Deep review also fetches:**
- Related dependencies (imports)
- Reverse dependencies (files importing changed files)
### Phase 3: Review Analysis
#### Deep Review (Default)
**Direct code analysis on fetched files:**
- Review changed sections with full file context
- Cross-reference between related files
- Verify imports/exports
**Multi-dimensional analysis:**
- **Functionality**: Edge cases, error handling, return values
- **Code Quality**: Readability, DRY, single responsibility, complexity
- **Security** (CRITICAL): SQL injection, XSS, auth issues, data leaks, input validation, CSRF
- **Performance**: N+1 queries, memory leaks, inefficient algorithms, unnecessary re-renders
- **Testing**: Coverage for changed code, missing scenarios, test quality
- **Architecture**: Design patterns, coupling, cohesion, separation of concerns
**Common issue scan:**
- TODO/FIXME comments, console.log in production, commented-out code
- Hardcoded values, magic numbers, inconsistent naming
- Missing error handling in async code, race conditions, resource leaks
#### Quick Review (--quick)
- Use diff only, limit to 3 most important files
- No dependency exploration
- Focus on obvious issues and high-level patterns
### Phase 4: Structured Output
Terminal only, no file creation.
```markdown
# Code Review: [Input Identifier]
## Summary
[2-3 sentence overview and overall assessment]
## Risk Assessment
**Risk Level:** [Low / Low-Medium / Medium / Medium-High / High]
- [Technical risk factors]
- [Test coverage status]
- [Data/schema changes]
- [Dependencies / deployment risk]
## Security Review
[Security assessment, always include even if no concerns]
**If concerns:** Specific issue with file:line, classification, impact, recommendation
**If none:** Verified auth/validation patterns, proper sanitization, correct permissions
## Performance Impact
[Performance assessment, always include]
**If concerns:** Specific issue with file:line, classification, expected impact
**If none:** Queries optimized, no leaks, acceptable complexity
## Key Changes
- **2-5 word title**
- Detail with file:line reference
- **Another title**
- Detail with file:line reference
## Issues Found
### Must Fix
[Critical issues that block merge]
1. **Issue title** (file:line)
- Description with code evidence
- Why it's critical
- **Action:** Specific fix
### Should Fix
[Important but not blocking]
### Consider
[Minor suggestions for later]
## Recommendations
1. **Title** (file:line if applicable)
- Explanation and expected benefit
## Verdict
**[Approve / Approve with changes / Needs work / Blocked]**
[1-2 sentences reasoning]
**Merge Criteria:**
- [ ] [From Must Fix items]
- [ ] [From Should Fix items]
```
---
## Error Handling
- **PR not found**: Report error, suggest checking PR number and repository
- **Auth failure**: Suggest `gh auth login`
- **Missing repo context**: Ask user to specify as `owner/repo#123`
- **Fetch timeout**: Fall back to quick review, notify user
- **Empty context**: Report nothing found to review
## Example Usage
```bash
/schovi:review https://github.com/owner/repo/pull/123
/schovi:review owner/repo#123
/schovi:review #123
/schovi:review #123 --quick
/schovi:review EC-1234
/schovi:review ./spec.md
/schovi:review this branch
```
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.