Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

code-review

/code-review

Weryfikuje napisany kod przed commitem oraz wykonuje przegląd kodu lub kontrolę bezpieczeństwa na prośbę użytkownika.

Licencja
MIT
Ostatnia zmiana repozytorium
19.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 19.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Weryfikuje napisany kod przed commitem oraz wykonuje przegląd kodu lub kontrolę bezpieczeństwa na prośbę użytkownika.

Oryginalny opis (EN)

Use when code has been written and needs validation before committing, or when the user asks for a code review or security check.

Jak działa

  1. Overview
  2. The Process
  3. Review Checks
  4. Error Handling
  5. Red Flags
  6. Common Rationalizations
  7. Remember
  8. Related
Sekcje z nagłówków SKILL.md, w oryginale · 157 linii, 608 słów
Podgląd SKILL.md
---
name: code-review
description: Use when code has been written and needs validation before committing, or when the user asks for a code review or security check.
context: fork
agent: code-reviewer
---

# Code Review

## Overview
Review code for security, correctness, and quality. Runs in isolated code-reviewer context with pre-loaded standards.

**Announce at start:** "I'm using the code-review skill to validate [files/feature]."

## The Process

### Step 1: Pre-Load Context (Main Agent)

Load standards BEFORE invoking review:

```bash
Read: .opencode/context/core/standards/code-quality.md
Read: .opencode/context/core/standards/security-patterns.md
```

### Step 2: Invoke Review

```bash
/code-review path/to/file.ts
/code-review src/auth/*.ts
/code-review $(git diff --name-only HEAD~1)
```

### Step 3: Analyze Report

Code-reviewer returns structured findings:

```markdown
## Code Review: Auth Service

### 🔴 CRITICAL (Must Fix)
1. **SQL Injection Risk** — src/db/query.ts:42
   - Problem: Unparameterized query with user input
   - Risk: Database compromise
   - Fix:
     ```diff
     - db.query(`SELECT * FROM users WHERE id = ${userId}`)
     + db.query('SELECT * FROM users WHERE id = ?', [userId])
     ```

### 🟠 HIGH (Correctness)
2. **Missing Error Handling** — src/auth/service.ts:28
   - Problem: Async function without try/catch
   - Risk: Unhandled promise rejection
   - Fix: Wrap in try/catch with proper logging

### 🟡 MEDIUM (Style)
3. **Naming Convention** — src/auth/middleware.ts:15
   - Problem: snake_case instead of camelCase
   - Fix: Rename verify_token → verifyToken

### Summary
Total Issues: 3 (1 Critical, 1 High, 1 Medium)
Recommendation: REQUEST CHANGES
```

### Step 4: Take Action

**If CRITICAL or HIGH issues:**
1. STOP—do not commit
2. Fix issues using suggested diffs
3. Re-run `/code-review` to verify
4. Proceed only when clean

**If only MEDIUM or LOW issues:**
1. Evaluate whether to fix now or later
2. Apply quality improvements
3. Safe to commit

**If no issues:**
1. Commit with confidence
2. Note positive patterns

## Review Checks

**🔴 CRITICAL (Security):**
- SQL injection, XSS, command injection
- Hardcoded credentials or secrets
- Path traversal, auth bypass

**🟠 HIGH (Correctness):**
- Missing error handling
- Type mismatches
- Null/undefined gaps
- Logic errors, race conditions

**🟡 MEDIUM (Maintainability):**
- Naming violations
- Code duplication
- Poor organization

**🟢 LOW (Suggestions):**
- Performance optimizations
- Documentation improvements

## Error Handling

**Review fails:**
- Ensure context files pre-loaded

**Too many findings:**
- Fix CRITICAL first, then re-review

**Unclear findings:**
- Request clarification in report

## Red Flags

If you think any of these, STOP and re-read this skill:

- "The code looks fine, a review is overkill"
- "I wrote it, I know it's correct"
- "We're in a hurry, we can review later"
- "It's a small change, no security risk"

## Common Rationalizations

| Excuse | Reality |
|--------|---------|
| "I just wrote it so I know it's right" | The author is the worst reviewer. Fresh eyes catch what familiarity hides. |
| "It's a small change" | Security vulnerabilities are almost always in small, "obvious" changes. |
| "We can review after merging" | Post-merge review finds bugs in production. Pre-merge review finds them for free. |
| "There's no user input so no injection risk" | Internal data becomes user input when requirements change. Review now. |

## Remember

- Pre-load standards BEFORE invoking review
- CRITICAL and HIGH issues BLOCK commits
- Apply suggested fixes with code diffs
- Re-review after fixing blocking issues
- Review does NOT modify code—only suggests changes
- Review does NOT run tests—use test-generation for that

## Related

- context-discovery
- code-execution
- test-generation

---

**Task**: Review the following files: **$ARGUMENTS**

**Instructions for code-reviewer subagent:**

1. Read all files in $ARGUMENTS
2. Apply pre-loaded standards (code quality, security, conventions)
3. Scan for: Security (HIGHEST PRIORITY) → Correctness → Style → Performance
4. Structure findings by severity: CRITICAL → HIGH → MEDIUM → LOW
5. For each finding: Problem + Risk + Suggested fix with diff
6. Include positive observations
7. Return recommendation: APPROVE | REQUEST CHANGES | COMMENT

Wersje

RepozytoriumWynikLicencja
Ta strona · darrenhinde/OpenAgentsControl100MIT
microsoft/aspire100MIT
kdlbs/kandev100AGPL-3.0
dotnet/runtime100MIT
ggml-org/llama.cpp100MIT
RediSearch/RediSearch100AGPL-3.0
alexhawat/mergeCraft100MIT
ericrisco/rsc-harness100MIT
aws-solutions/konductor100Apache-2.0

Migawka bazy z 28.10.2026 · wersja paczki c4a7fc333385 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100code-review-and-quality
    Recenzuje kod przed scaleniem, napisany przez agenta lub człowieka.
  • 100review
    Sprawdza przed commitem jakość kodu, bezpieczeństwo i łatwość utrzymania zmian w kodzie.
  • 100review-code
    Przeprowadza przegląd kodu na poziomie starszego inżyniera: review PR, zmian i jakości kodu.
  • 100pr-review
    Wykonuje lokalny przegląd kodu PR z pełnym kontekstem projektu, po poleceniu /pr-review lub przed scaleniem zmian.
  • 100uw-code-review
    Przegląda jakość kodu C# w Unity przed commitem: sprawdza zgodność z regułami, CODING_STANDARDS.md, NAMING_CONVENTIONS.md i pokryciem scenariuszy Gherkin z GDD, po przejściu testów.
  • 100pre-commit-quality-review
    Wykonuje przegląd strukturalnej jakości kodu przed commitem, poprawieniem lub scaleniem commitów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.