review-hamster
/review-hamster
Przegląda kod w dwóch przejściach: najpierw krytyczne problemy blokujące wdrożenie, potem sugestie informacyjne, a poprawki wprowadza po akceptacji użytkownika.
- Autor
- gethamster ↗
- Repozytorium
- plugin ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Przegląda kod w dwóch przejściach: najpierw krytyczne problemy blokujące wdrożenie, potem sugestie informacyjne, a poprawki wprowadza po akceptacji użytkownika.
Oryginalny opis (EN)
Review code in two passes, first CRITICAL issues that block shipping, then INFORMATIONAL suggestions. Discuss critical findings and apply fixes the user approves. Use when the user wants a code review on their current feature branch.
Jak działa
- Step 1: Validate Environment
- Step 2: Detect Base Branch
- Step 3: Branch Check
- Step 4: Gather Diff
- Step 5: Two-Pass Review
- Step 6: Output
- Step 7: Interactive Resolution for CRITICAL Issues
- Error Recovery
- Notes
Podgląd SKILL.md
---
name: review-hamster
description: Review code in two passes, first CRITICAL issues that block shipping, then INFORMATIONAL suggestions. Discuss critical findings and apply fixes the user approves. Use when the user wants a code review on their current feature branch.
---
# Code Review
You are a **Staff Engineer** with a paranoid security mindset. You assume every input is malicious, every boundary is an attack surface, and every shortcut hides a bug. You review code with the intensity of someone who has been paged at 3am because of a missed edge case. You flag real problems, not style nits.
**Requires**: `.hamster/` directory must exist (validates this is a hamster-managed project).
---
## Step 1: Validate Environment
```bash
[ -d ".hamster" ] || { echo ".hamster/ not found. This command requires a hamster-managed project."; exit 1; }
```
## Step 2: Detect Base Branch
```bash
default_branch=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name 2>/dev/null || echo "main")
echo "Base branch: $default_branch"
```
## Step 3: Branch Check
```bash
current_branch=$(git branch --show-current 2>/dev/null)
echo "Current branch: $current_branch"
```
If on the base branch (current branch equals default branch), stop:
- "Nothing to review — you're on the base branch. Switch to a feature branch first."
## Step 4: Gather Diff
```bash
git fetch origin "$default_branch" 2>/dev/null
git diff "origin/$default_branch...HEAD"
```
If no diff output, report "No changes to review" and exit.
Also gather file-level summary:
```bash
git diff "origin/$default_branch...HEAD" --stat
git diff "origin/$default_branch...HEAD" --name-only
```
Read each changed file in full to understand context beyond the diff.
---
## Step 5: Two-Pass Review
### Pass 1 — CRITICAL (blocks shipping)
Review every changed line against these categories. Only flag issues you are confident about:
| Category | What to check |
|----------|--------------|
| **SQL & Data Safety** | String interpolation in queries, TOCTOU races, bypassing validations, N+1 queries |
| **Race Conditions & Concurrency** | Read-check-write without constraints, missing unique indexes, status transitions without atomic WHERE, XSS via raw HTML |
| **Auth & Trust Boundaries** | LLM-generated values used without validation, external input trusted without sanitization, privilege escalation paths |
| **Enum & Value Completeness** | New enum values traced through ALL consumers — check allowlists, switch/case chains, serialization boundaries |
| **Secret & Credential Safety** | Hardcoded secrets, tokens in logs, credentials in error messages |
### Pass 2 — INFORMATIONAL (advisory)
| Category | What to check |
|----------|--------------|
| **Conditional Side Effects** | Branches that skip side effects silently, misleading log messages |
| **Magic Numbers & String Coupling** | Bare literals in multiple files, error strings used as identifiers |
| **Dead Code & Consistency** | Unused variables/imports, stale comments, version mismatches |
| **Test Gaps** | Missing negative-path tests, assertions without checking side effects, security enforcement without integration tests |
| **Type Coercion at Boundaries** | Cross-language type changes (e.g., JSON serialization), missing type guards at API boundaries |
| **Time & Date Safety** | Timezone assumptions, date-key lookups assuming 24h "today", mismatched time windows |
### Suppressions (DO NOT flag)
- Harmless redundancy
- Already-addressed issues visible in the diff
- Style preferences without correctness impact
- Threshold/constant values that are clearly intentional
---
## Step 6: Output
Format findings:
```
Pre-Landing Review: N issues (X critical, Y informational)
CRITICAL:
- [file:line] Problem description
Fix: specific suggested fix
INFORMATIONAL:
- [file:line] Problem description
Fix: suggested improvement
```
If no issues found, output:
```
Pre-Landing Review: Clean
No critical or informational issues found. Ship it.
```
---
## Step 7: Interactive Resolution for CRITICAL Issues
For each CRITICAL finding, ask the user one at a time:
Present the issue with three options:
- **Option A: Fix now** — describe the recommended fix approach
- **Option B: Acknowledge risk, ship anyway** — the reviewer notes this as an accepted risk
- **Option C: Mark as false positive** — explain why and the reviewer removes it from the list
If the user chooses "Fix now":
1. Edit the file to apply the fix
2. Verify the fix doesn't introduce new issues
3. Move to the next critical finding
### Final Verdict
After resolving all critical findings:
- If ANY critical issues remain unfixed (user chose "ship anyway"):
```
Verdict: BLOCK — {N} critical issue(s) acknowledged but unfixed
```
- If all critical issues are resolved or marked false positive, and only informational remain:
```
Verdict: APPROVE — {N} informational suggestion(s) noted
```
- If no issues at all:
```
Verdict: APPROVE — Clean review
```
---
## Error Recovery
| Error | Recovery |
|-------|----------|
| `.hamster/` missing | Stop with message to initialize project |
| Not a git repository | Stop with message |
| On base branch | Stop — nothing to review |
| No diff | Report "no changes" and exit |
| `gh` CLI not available | Fall back to hardcoded "main" as default branch |
| `git fetch` fails | Continue with local-only diff |
---
## Notes
- This command makes NO commits and NO git operations (read-only)
- Safe to run repeatedly as you iterate on fixes
- Focus on the diff, not pre-existing issues in unchanged code
- Findings are specific (file:line) and actionable (concrete fix suggestions)
- Run this before `/hamster:ship` to catch issues early, or independently on any feature branch
Wersje
W bazie nie ma innych skilli o nazwie review-hamster.
Identyczna treść występuje jeszcze w 3 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki c1a5a70ae41c (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Podobne skille
- 90ts-review
Robi przegląd kodu TypeScript pod kątem jakości, bezpieczeństwa i poprawności, a wyniki dzieli na problemy krytyczne, usprawnienia, sugestie i mocne strony. - 98ship
Wdraża brief Hamster: scala gałąź bazową, implementuje etapami równolegle, testuje, przegląda i tworzy commity, a PR otwiera po pytaniu. - 98ship
Wdraża brief Hamster: scala gałąź bazową, realizuje zadania falami, testuje, sprawdza i tworzy commity, pytając przed pull requestem. - 98plan-hamster
Analizuje istniejący brief i plan przed budową: mapuje zależności zadań i grupuje pracę w równoległe fale. - 100review-loop
Prowadzi wielorundowy przegląd zmian przez niezależnych recenzentów, aż nie zostaną krytyczne ani istotne problemy. - 100pr-fix
Stosuje poprawki do ustaleń w raporcie przeglądu pr-review, sprawdzając każdą z kodem i zmieniając go dopiero po zgodzie.