Skip to content
Development
Command

/f5-review

Code review and quality checks

From plugin
f5-framework
2469 skills104 agents69 commands
Install
$ npx -y skills add Fujigo-Software/f5-framework-claude --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/f5-review

Context preview

What this command does when you run it.

Code review and quality checks

Command definition

f5-review.md
description: Code review and quality checks
argument-hint: <check|full|security|pr> [path]

F5 Code Review Command

Code review toàn diện với security focus, OWASP compliance, và quality metrics.

---

USAGE

/f5-review <subcommand> [path] [options]

Subcommands

| Command | Description | |---------|-------------| | `check [path]` | Quick review (lint, types, complexity) | | `full [path]` | Full review với 6 categories | | `security [path]` | Security-focused OWASP review | | `pr` | Review PR/branch changes | | `report` | Generate G2 review report | | `status` | Show review history |

Options

| Option | Description | |--------|-------------| | `--fix` | Auto-fix issues where possible | | `--strict` | Fail on warnings | | `--output <format>` | Output format: markdown, json, html | | `--save` | Save report to `.f5/reviews/` | | `--ci` | CI mode (non-interactive, exit codes) |

---

WORKFLOW

┌───────────────────────────────────────────────────────────────────────┐
│                        CODE REVIEW WORKFLOW                            │
├───────────────────────────────────────────────────────────────────────┤
│                                                                        │
│  1. DETECT STACK       2. LOAD RULES        3. ANALYZE                │
│  ──────────────        ──────────           ────────                  │
│  • Read config.json    • Load lint config   • Run lint/type checks    │
│  • Identify stack      • Load security      • Check complexity        │
│  • Load tools          • Load patterns      • Scan for issues         │
│        ↓                     ↓                    ↓                    │
│  4. CATEGORIZE         5. SCORE             6. REPORT                 │
│  ───────────           ─────                ──────                    │
│  • Architecture        • Calculate scores   • Generate report         │
│  • Quality             • Weight by priority • Prioritize actions      │
│  • Security            • Determine grade    • Save to .f5/reviews/    │
│  • Performance                                                         │
│                                                                        │
└───────────────────────────────────────────────────────────────────────┘

---

STEP 1: DETECT STACK & TOOLS

Tự động detect từ `.f5/config.json`:

| Stack | Lint Tool | Type Check | Format | Complexity | Security | |-------|-----------|------------|--------|------------|----------| | nestjs | ESLint | tsc | Prettier | complexity-report | npm audit | | spring | Checkstyle | javac | google-java-format | PMD | OWASP DC | | fastapi | Ruff/Flake8 | mypy | Black | radon | bandit | | go | golint | go vet | gofmt | gocyclo | gosec | | django | Ruff/Flake8 | mypy | Black | radon | bandit | | laravel | PHP_CodeSniffer | PHPStan | PHP-CS-Fixer | PHPMD | phpstan | | rails | Rubocop | Sorbet | Rubocop | flog | brakeman | | react | ESLint | tsc | Prettier | complexity-report | npm audit | | nextjs | ESLint | tsc | Prettier | complexity-report | npm audit | | vue | ESLint | vue-tsc | Prettier | complexity-report | npm audit | | angular | ESLint | tsc | Prettier | complexity-report | npm audit | | flutter | flutter_lints | dart analyze | dart format | - | - |

---

REVIEW TYPES

1. `/f5-review check [path]` - Quick Check

Kiểm tra nhanh các vấn đề cơ bản:

| Category | Checks | Tool | |----------|--------|------| | Lint | ESLint/TSLint rules | eslint | | Types | TypeScript errors | tsc | | Format | Prettier compliance | prettier | | Complexity | Cyclomatic complexity | complexity-report | | Duplication | Code duplication | jscpd |

Commands by Stack

**NestJS/TypeScript:**

# Lint
npm run lint

# Type check
npx tsc --noEmit

# Format check
npx prettier --check "src/**/*.ts"

# Complexity
npx complexity-report src/

**FastAPI/Python:**

# Lint
ruff check .

# Type check
mypy app/

# Format check
black --check app/
isort --check-only app/

# Complexity
radon cc app/ -a

**Go:**

# Lint
golangci-lint run

# Vet
go vet ./...

# Format check
gofmt -l .

# Complexity
gocyclo -over 10 .

Output Format

## 🔍 Quick Review: {{PATH}}

### Lint Issues
| Severity | Count |
|----------|-------|
| 🔴 Error | 2 |
| 🟡 Warning | 5 |
| 🔵 Info | 3 |

**Errors:**
1. `src/user/user.service.ts:45` - 'userId' is defined but never used (@typescript-eslint/no-unused-vars)
2. `src/auth/auth.controller.ts:23` - Unexpected any type (@typescript-eslint/no-explicit-any)

**Warnings:**
1. `src/order/order.service.ts:12` - Missing return type on function (@typescript-eslint/explicit-function-return-type)
2. `src/product/product.service.ts:78` - Prefer const over let (@typescript-eslint/prefer-const)

### Type Check
| Status | Count |
|--------|-------|
| ✅ Pass | - |
| ❌ Errors | 0 |

### Format Check
| Status | Files |
|--------|-------|
| ✅ Formatted | 45 |
| ⚠️ Need Format | 3 |

**Files needing format:**
- `src/user/user.service.ts`
- `src/auth/dto/login.dto.ts`
- `src/order/order.controller.ts`

### Complexity Analysis
| File | Function | Complexity | Status |
|------|----------|------------|--------|
| user.service.ts | processOrder | 15 | ⚠️ High (>10) |
| order.service.ts | calculateTotal | 12 | ⚠️ High (>10) |
| auth.service.ts | validateToken | 5 | ✅ OK |

### Code Duplication
| Metric | Value | Target | Status |
|--------|-------|--------|--------|
| Duplication | 3.5% | <5% | ✅ |

**Duplicated Blocks:**
1. `user.service.ts:20-35` ↔ `admin.service.ts:15-30` (80% similar)

### Summary
| Check | Status |
|-------|--------|
| Lint | ⚠️ 2 errors, 5 warnings |
| Types | ✅ Pass |
| Format | ⚠️ 3 files need formatting |
| Complexity | ⚠️ 2 high complexity functions |
| Duplication | ✅ Pass |

### Action Required
1. 🔴 **Fix lint errors** before committing
2. 🟡 Run `npm run format` to fix formatting
3. 🟡 Consider refactoring high complexity functions

### Quick Fix Commands
```bash
# Fix lint is
Read more
Ships withf5-framework

AI-Powered Development Framework for Claude Code

Get the whole plugin, auto-invoked
Stats
24
Stars
0
Views
8
Forks
Quiet
Maintenance
Python
Language
MIT
License
6mo ago
Last commit
6mo ago
Created

Repo: Fujigo-Software/f5-framework-claude