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

repo-source-code-review

/repo-source-code-review

Przegląda pull requesty i zmiany w bibliotece, sprawdzając typy, dokumentację, pokrycie testami i częste pułapki przed scaleniem.

Repozytorium
valibot ↗
Licencja
MIT
Ostatnia zmiana repozytorium
09.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 09.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

Przegląda pull requesty i zmiany w bibliotece, sprawdzając typy, dokumentację, pokrycie testami i częste pułapki przed scaleniem.

Oryginalny opis (EN)

Review pull requests and source code changes in /library/src/. Use when reviewing PRs, validating implementation patterns, or checking code quality before merging. Covers code quality checks, type safety, documentation review, test coverage, and common issues to watch for.

Jak działa

  1. When to Use This Guide
  2. Review Process
  3. What to Review
  4. Common Issues
  5. Checklist
  6. Related Skills
Sekcje z nagłówków SKILL.md, w oryginale · 131 linii, 642 słów
Podgląd SKILL.md
---
name: repo-source-code-review
description: Review pull requests and source code changes in /library/src/. Use when reviewing PRs, validating implementation patterns, or checking code quality before merging. Covers code quality checks, type safety, documentation review, test coverage, and common issues to watch for.
---

# Reviewing Source Code Changes

Guide for reviewing PRs and source code changes in `/library/src/`.

## When to Use This Guide

- Reviewing pull requests modifying library source
- Validating implementation patterns before merging
- Checking code quality, types, documentation, and tests

## Review Process

1. **Understand the change** — Read PR description, identify affected files
2. **Check patterns** — Verify code follows existing conventions
3. **Verify types** — Ensure type safety and proper inference
4. **Review docs** — Confirm JSDoc is complete and accurate
5. **Check tests** — Validate runtime and type test coverage

## What to Review

### Code Quality

| Check             | Requirement                                                           |
| ----------------- | --------------------------------------------------------------------- |
| Naming            | Matches existing patterns (`StringSchema`, `minLength`, `_parse`)     |
| Purity annotation | `// @__NO_SIDE_EFFECTS__` before pure factory functions               |
| Import extensions | All imports use `.ts` extension                                       |
| Interface vs type | Use `interface` for object shapes, `type` for unions/aliases          |
| Folder structure  | Each API has: `name.ts`, `name.test.ts`, `name.test-d.ts`, `index.ts` |

**Good — purity annotation:**

```typescript
// @__NO_SIDE_EFFECTS__
export function string(message?: ErrorMessage<StringIssue>): StringSchema {
  return {
    /* ... */
  };
}
```

**Bad — missing annotation:**

```typescript
export function string(message?: ErrorMessage<StringIssue>): StringSchema {
  return {
    /* ... */
  };
}
```

### Type Safety

| Check             | Requirement                                           |
| ----------------- | ----------------------------------------------------- |
| Generic inference | Types infer correctly without explicit annotations    |
| Constraints       | Generic parameters have appropriate `extends` clauses |
| Return types      | Explicit return types on exported functions           |
| Type tests        | `.test-d.ts` file covers type inference scenarios     |

**Good — constrained generic:**

```typescript
export function minLength<
  TInput extends LengthInput,
  TRequirement extends number,
>(
  requirement: TRequirement,
  message?: ErrorMessage<MinLengthIssue<TInput, TRequirement>>
): MinLengthAction<TInput, TRequirement>;
```

### Documentation

| Check          | Requirement                                       |
| -------------- | ------------------------------------------------- |
| JSDoc present  | All exported functions have JSDoc                 |
| First line     | Action verb matching function purpose (see below) |
| `@param` tags  | Every parameter documented                        |
| `@returns` tag | Return value documented                           |
| Overloads      | Every overload has its own complete JSDoc block   |

**First line patterns by category:**

| Category       | Pattern                                        |
| -------------- | ---------------------------------------------- |
| Schemas        | `Creates a ... schema.`                        |
| Actions        | `Creates a ... action.`                        |
| Parse methods  | `Parses ...`                                   |
| Type guards    | `Checks if ...`                                |
| Unwrap methods | `Unwraps ...`                                  |
| Other methods  | `Creates a ...`, `Returns ...`, `Forwards ...` |

See `repo-source-code-document` skill for full documentation rules.

### Tests

| Check          | Requirement                                                |
| -------------- | ---------------------------------------------------------- |
| Runtime tests  | `.test.ts` covers success cases, failure cases, edge cases |
| Type tests     | `.test-d.ts` validates type inference with `expectTypeOf`  |
| Issue messages | Tests verify correct error messages and issue structure    |

## Common Issues

| Issue                     | What to Look For                                             |
| ------------------------- | ------------------------------------------------------------ |
| Missing purity annotation | Factory function without `// @__NO_SIDE_EFFECTS__`           |
| Incomplete JSDoc          | Missing `@param` or `@returns`, wrong description format     |
| No type tests             | New API without `.test-d.ts` file                            |
| Wrong import extension    | Imports without `.ts` suffix                                 |
| Inconsistent naming       | Schema not ending in `Schema`, action not ending in `Action` |
| Side effects in pure code | Mutations, I/O, or global state in schema/action creation    |

## Checklist

- [ ] Implementation follows existing patterns in similar files
- [ ] `// @__NO_SIDE_EFFECTS__` on pure factory functions
- [ ] All imports use `.ts` extension
- [ ] `interface` used for object shapes
- [ ] JSDoc complete on all exports
- [ ] Runtime tests in `.test.ts`
- [ ] Type tests in `.test-d.ts`
- [ ] Naming conventions followed

## Related Skills

- `repo-structure-navigate` — Navigate the codebase
- `repo-source-code-document` — JSDoc requirements

Wersje

RepozytoriumWynikLicencja
Ta strona · open-circle/valibot100MIT
open-circle/formisch100MIT

Migawka bazy z 13.11.2026 · wersja paczki 20855f1eb351 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

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

Podobne skille

  • 96code-review
    Przegląda pull requesty w GitHub CLI (gh) i pomaga sprawdzić zmiany przed scaleniem.
  • 100pr-review
    Przegląda pull requesty PyTorch pod kątem jakości kodu, pokrycia testami, bezpieczeństwa i zgodności wstecznej.
  • 100pr-review
    Przegląda pull requesty PyTorch pod kątem jakości kodu, pokrycia testami, bezpieczeństwa i zgodności wstecznej.
  • 100code-review
    Przegląda pull requesty i zmiany w kodzie pod kątem poprawności, konwencji, utrzymywalności, wydajności, pokrycia testami i bezpieczeństwa.
  • 100pr-review-expert
    Analizuje pull requesty i diffy, szukając problemów bezpieczeństwa oraz oceniając jakość zmian przed scaleniem.
  • 100pr-review-expert
    Przegląda pull requesty i zmiany w kodzie, sprawdza problemy bezpieczeństwa w PR i ocenia jakość kodu w diffach.

Uwagi i zgłoszenia

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