code-review-skill
Comprehensive code review and analysis. AUTO-TRIGGERS when user asks to review, refactor, debug, critique, or analyze code.
What this skill does
# Code Review Skill
## What This Skill Does
This skill **automatically activates** when you ask Claude to review, refactor, debug, or analyze code. It's a demonstration of the **auto-trigger pattern**—the skill detects your intent and applies specialized code review expertise without you explicitly requesting "code review mode."
## Auto-Trigger Keywords
This skill engages when you mention:
- "review" (code review, peer review, security review)
- "refactor" (improve, restructure, simplify)
- "debug" (find the bug, what's wrong, why doesn't it work)
- "analyze" (code analysis, code smell, technical debt)
- "critique" (code critique, feedback, improvement)
- "vulnerabilities" (security issues, exploits, vulnerabilities)
- "performance" (optimization, slow, inefficient)
- "best practices" (coding standards, conventions, idiomatic)
## Review Workflow
### Step 1: Understand the Context
- Identify the programming language
- Determine the purpose/intent of the code
- Note the specific area of focus (performance, security, clarity, etc.)
### Step 2: Structured Analysis
Review across these dimensions:
1. **Correctness** - Does it do what it's supposed to?
2. **Readability** - Is the code clear and maintainable?
3. **Performance** - Are there inefficiencies?
4. **Security** - Are there vulnerabilities or risks?
5. **Best Practices** - Does it follow language conventions?
6. **Testing** - Is the code testable? Are edge cases handled?
### Step 3: Provide Feedback
- Highlight what works well (positive feedback)
- Point out specific issues with line references
- Suggest concrete improvements
- Explain the "why" behind recommendations
### Step 4: Prioritize Suggestions
- **Critical** - Security issues, bugs, breaking issues
- **Important** - Performance, maintainability, design
- **Nice-to-have** - Style, minor improvements
## Review Scenarios (Examples)
### Example 1: Security Review
**User:** "Review this for vulnerabilities"
```python
import hashlib
password = input("Enter password: ")
hash = hashlib.md5(password.encode()).hexdigest()
```
**Response:** (Auto-triggers code-review-skill)
- Point out: MD5 is cryptographically broken
- Suggest: Use bcrypt, scrypt, or Argon2 instead
- Explain: MD5 is vulnerable to collision attacks
### Example 2: Refactoring Request
**User:** "How can I refactor this to be cleaner?"
```python
if x > 5:
if y > 10:
if z < 3:
print("conditions met")
```
**Response:** (Auto-triggers code-review-skill)
- Suggest: Use logical operators to flatten nesting
- Show: `if x > 5 and y > 10 and z < 3:`
- Explain: Reduces cognitive complexity
### Example 3: Performance Analysis
**User:** "This code is slow, find the bottleneck"
```python
result = []
for item in large_list:
if item not in result:
result.append(item)
```
**Response:** (Auto-triggers code-review-skill)
- Identify: O(n²) behavior due to list lookup
- Suggest: Use `set()` for O(1) lookups
- Show: `result = list(set(large_list))`
### Example 4: Bug Hunting
**User:** "Debug this—there's a logic error"
```javascript
for (let i = 0; i <= arr.length; i++) {
console.log(arr[i]);
}
```
**Response:** (Auto-triggers code-review-skill)
- Spot: Off-by-one error (i <= arr.length)
- Explain: arr[arr.length] is undefined
- Fix: Change `<=` to `<`
## Key Points
- **Auto-trigger is implicit** - Just ask about code quality/bugs, and this skill engages
- **Context-aware** - Adapts to language, domain, and review focus
- **Positive & constructive** - Always acknowledge good practices first
- **Specific feedback** - Reference line numbers and concrete examples
- **Educational** - Explain the "why" behind suggestions
## When This Skill Doesn't Apply
This skill focuses on **code itself**. For other needs, use different tools:
- Architecture design → Use planning/design tools
- Project setup → Use project initialization tools
- Documentation → Use documentation skills
- Testing framework selection → Use research skills
## Review Priorities
**Always check first (if relevant):**
1. Security vulnerabilities
2. Correctness/logic bugs
3. Performance critical paths
4. Maintainability
5. Style/conventions
**Only after above are addressed:**
6. Minor improvements
7. Code style preferences
8. Formatting
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.