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

code-review

/code-review

Przegląda lokalne zmiany przed otwarciem pull requesta: szuka błędów i naruszeń konwencji repozytorium, uruchamia testy i linter, a uwagi może opublikować w PR.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.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 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Przegląda lokalne zmiany przed otwarciem pull requesta: szuka błędów i naruszeń konwencji repozytorium, uruchamia testy i linter, a uwagi może opublikować w PR.

Wyzwalacze z opisu

review my changesreview this PRpre-PR review
Oryginalny opis (EN)

Use before opening a pull request to this repo. Reviews the working diff for correctness bugs and repo conventions, runs the test/lint gates, and can post findings directly on the PR. Triggers on "review my changes", "review this PR", "pre-PR review".

Jak działa

  1. How to Use This Skill
  2. Determine the Diff
  3. Review for Correctness
  4. Check Repo Conventions
  5. Run the Gates
  6. Summarize Findings
  7. Posting Comments on the PR
  8. Dry-Run Mode (Default)
Sekcje z nagłówków SKILL.md, w oryginale · 146 linii, 1 067 słów
Podgląd SKILL.md
---
name: code-review
description: Use before opening a pull request to this repo. Reviews the working diff for correctness bugs and repo conventions, runs the test/lint gates, and can post findings directly on the PR. Triggers on "review my changes", "review this PR", "pre-PR review".
---

# Pre-PR Code Review

Review the current branch's changes against `main` for correctness, repo conventions, and gate compliance. Optionally post findings directly to the GitHub PR.

## How to Use This Skill

1. Determine the diff (see [Determine the Diff](#determine-the-diff))
2. Review the changes (see [Review for Correctness](#review-for-correctness) and [Check Repo Conventions](#check-repo-conventions))
3. Run the gates (see [Run the Gates](#run-the-gates))
4. Summarize findings (see [Summarize Findings](#summarize-findings))
5. Optionally post review comments to the PR (see [Posting Comments on the PR](#posting-comments-on-the-pr))

The default is **local-only / dry-run** — print findings, post nothing. Only post to the PR when the user explicitly asks.

## Determine the Diff

Compare the current branch against `main` and capture any uncommitted work:

```bash
git diff main...HEAD
git status
```

Use `git diff main...HEAD` (three-dot) to limit the diff to commits introduced on this branch — not unrelated commits that landed on `main` after the branch diverged. If `main` is not up to date locally, run `git fetch origin main` first and compare against `origin/main`.

If there is no diff against `main` and no uncommitted work, tell the user there is nothing to review and stop.

## Review for Correctness

Read the full diff and look for:

- **Logic bugs** — off-by-one errors, inverted conditionals, wrong default values, copy-paste mistakes between similar branches.
- **Error handling** — exceptions that are silently swallowed, missing cleanup in error paths, error messages that lose the original cause.
- **Edge cases** — empty inputs, missing keys/files, network/IO failures, concurrency, large inputs.
- **Resource handling** — file handles, sockets, subprocesses, and locks closed/released on every path.
- **Security** — untrusted input flowing into shell commands, paths, SQL, or HTTP requests; secrets leaking into logs or spans.

Be specific. Cite the file and line numbers; quote the offending lines when useful.

## Check Repo Conventions

This repo emits OpenTelemetry / OpenInference spans from AI coding-assistant harnesses to Arize AX or Phoenix. Shared logic lives in `core/`; each harness lives under `tracing/<harness>/`.

### New harness integrations

A new harness must mirror the layout of an existing directory under `tracing/` (see `CONTRIBUTING.md`):

- A `tracing/<harness>/` package (with hooks, span builders, and any harness-specific helpers).
- A `tracing/<harness>/install.py` installer that handles harness-specific install and uninstall behavior, using shared helpers from `core/setup/` where appropriate.
- `arize-hook-*` console-script entry points in `pyproject.toml` `[project.scripts]` for hooks invoked through those commands.
- `install.sh` and `install.bat` dispatch, and a `core/setup/status.py` `_REGISTRATION` line.

Flag any new harness that skips one of these.

### Python 3.11 floor

The repo targets `>=3.11`. CI runs on 3.11 through 3.14. Reject any 3.12+ syntax in the diff:

- No `typing.override` or `typing.TypeAliasType`; use compatible `typing` constructs.
- No f-string grammar that requires Python 3.12.
- No other 3.12+ standard-library APIs or syntax.

### No new runtime dependencies

The only allowed runtime PyPI dependency is `python-dotenv`, imported by the installer in `core/setup` only. Anything imported from hook code under `core/` or `tracing/` must be stdlib. Flag any new entry under `[project] dependencies` in `pyproject.toml` other than `python-dotenv`. New `[project.optional-dependencies] dev = [...]` entries are allowed but should be justified.

## Run the Gates

Run both gates and capture their output. Report pass/fail for each.

```bash
uv run pytest tests/ -m "not slow"
uv run pre-commit run --all-files
```

If either fails, include the failing test names / hook names and the relevant error excerpts in the findings. Do not attempt to "fix" anything in this skill. The goal is to surface issues.

OpenCode plugin tests call `node --experimental-transform-types` and need Node 22 or newer. `test_run_hook_bootstraps_on_python312_without_setuptools` needs a system Python 3.12 on PATH outside the venv, not a uv-managed standalone. Note those as environment skips when they fail that way. They are not automatic blockers for an unrelated harness change.

## Summarize Findings

Produce a single prioritized, actionable list. Group findings as:

1. **Blocking** — gate failures, correctness bugs, convention violations that must be fixed before merge.
2. **Suggested** — improvements, smaller risks, code-quality nits worth addressing.
3. **Optional** — style preferences and forward-looking ideas.

Each finding must be self-contained: file path, line number(s), a one-line description of the problem, and a concrete suggested change. If a finding spans multiple files, list each location.

## Posting Comments on the PR

**Default: print findings locally and post nothing.** Only post when the user explicitly asks ("post these to the PR", "leave these as review comments", etc.).

### Preconditions

1. `gh auth status` must succeed. If it does not, fall back to printing findings locally and tell the user that `gh` is unavailable and nothing was posted.
2. Identify the target PR. By default, look up the PR for the current branch:

   ```bash
   gh pr view --json number,headRefName
   ```

   If no PR exists for the branch, or the user passed an explicit PR number, use the value they provided. **Confirm the PR number and title with the user before posting anything.**

### Inline, diff-anchored comments (line-specific findings)

For findings tied to a specific line, post inline review comments via the REST API. Resolve `{owner}/{repo}` from `gh repo view --json nameWithOwner` (or the user's input):

```bash
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/{owner}/{repo}/pulls/{number}/comments \
  -f body="<finding body>" \
  -f commit_id="<head sha of the PR>" \
  -f path="<path/in/repo>" \
  -F line=<line number> \
  -f side="RIGHT"
```

Notes:

- `commit_id` should be the HEAD SHA of the PR (read from `gh pr view --json headRefOid -q .headRefOid`).
- `side` is `RIGHT` for the new version (added/modified lines), `LEFT` for the original. Use `RIGHT` for almost all findings on this-branch code.
- For multi-line ranges, set `start_line`, `start_side`, and `line`.
- One API call per finding.

### Summary review comment (non-line-specific findings)

For overall summary, gate results, and any findings not tied to a single line, post a single review comment:

```bash
gh pr review {number} --comment --body "<summary body>"
```

The summary should reference the inline comments by file/line so reviewers can navigate.

### After posting

Print a short confirmation listing how many inline comments were created and that the summary review was posted, including the PR URL (`gh pr view {number} --json url -q .url`).

## Dry-Run Mode (Default)

Unless the user has explicitly asked to post, do not call `gh api` or `gh pr review`. Print the same summary that would have been posted, prefixed with `[dry-run]`, and tell the user to re-run with "post to the PR" if they want the comments published.

Wersje

RepozytoriumWynikLicencja
Ta strona · arize-ai/coding-harness-tracing100Apache-2.0
microsoft/aspire100MIT
kdlbs/kandev100AGPL-3.0
dotnet/runtime100MIT
drosam/agents100MIT
ggml-org/llama.cpp100MIT
ShamelesAbyss/Nyx100Apache-2.0
dzhng/jevgrep100MIT
iuliandita/skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki e3cf1602a277 (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

  • 90ship
    Sprawdza przed otwarciem PR typy, lint i testy, przegląda zmiany pod kątem błędów i przygotowuje opis pull requesta.
  • 96small-prs-review
    Przegląda cały diff tuż przed otwarciem pull requesta, żeby zmiany były małe i czytelne.
  • 100review-pr
    Przegląda pull request pod kątem jakości kodu i problemów bezpieczeństwa.
  • 90laravel-review
    Przegląda pull request w Laravelu pod kątem błędów i naruszeń reguł, a wyniki publikuje jako komentarze na GitHubie.
  • 100pr-review
    Przegląda pull request lub lokalne zmiany, sprawdzając diff względem zgłoszenia i błędy poprawności, a zgłasza tylko uwagi potwierdzone scenariuszem awarii, publikowane jako sugestie inline.
  • 100review
    Prowadzi pełny code review pull requesta na GitHubie pod kątem jakości, bezpieczeństwa, błędów i dobrych praktyk.

Uwagi i zgłoszenia

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