Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

test-focus

/test-focus

Uruchamia pojedynczy plik testowy z szybkim przerwaniem po błędzie w Playwright, Vitest, Jest, pytest, cargo i go test, także w trybie headed lub debug.

Repozytorium
claude-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.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 24.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

Uruchamia pojedynczy plik testowy z szybkim przerwaniem po błędzie w Playwright, Vitest, Jest, pytest, cargo i go test, także w trybie headed lub debug.

Argumenty

/test-focus <file-path> [--serial] [--debug]
Oryginalny opis (EN)

One test file, fail-fast — Playwright, Vitest, Jest, pytest, cargo, go test. Use when running a single spec file, headed/debug mode, or serial single-worker WebGL tests.

Jak działa

  1. When to Use This Skill
  2. Context
  3. Parameters
  4. Your task
  5. Time savings context
  6. Agentic optimizations
  7. Error handling
Sekcje z nagłówków SKILL.md, w oryginale · 160 linii, 671 słów
Podgląd SKILL.md
---
created: 2026-01-19
modified: 2026-09-05
reviewed: 2026-04-25
allowed-tools: Bash, Read, Grep, Glob, TodoWrite
args: "<file-path> [--serial] [--debug]"
argument-hint: "<file-path> [--serial] [--debug]"
description: "One test file, fail-fast — Playwright, Vitest, Jest, pytest, cargo, go test. Use when running a single spec file, headed/debug mode, or serial single-worker WebGL tests."
name: test-focus
---

## When to Use This Skill

| Use this skill when... | Use test-run instead when... |
|---|---|
| Iterating on a single failing spec with fail-fast feedback | Running the full test suite for a project |
| Forcing serial execution for WebGL or shared-state tests | Running tests in watch mode across many files (use test-quick) |
| Running one test file in headed/debug mode | Triaging a directory of test results (use test-analyze) |
| Sub-30s feedback on a known-broken file | Choosing which tier to run (use test-tier-selection) |

## Context

- Project files: !`find . -maxdepth 1 \( -name 'pyproject.toml' -o -name 'package.json' -o -name 'Cargo.toml' -o -name 'go.mod' \)`
- Playwright config: !`find . -maxdepth 1 -name 'playwright.config.*'`
- Vitest config: !`find . -maxdepth 1 \( -name 'vitest.config.*' -o -name 'vite.config.*' \)`
- Jest config: !`find . -maxdepth 1 -name 'jest.config.*'`
- Pytest config: !`find . -maxdepth 1 \( -name pyproject.toml -o -name setup.cfg \) -exec grep -l 'pytest' {} +`
- Package.json exists: !`find . -maxdepth 1 -name 'package.json' -type f`

## Parameters

- `$1` (required): Test file path or pattern (e.g., `login.spec.ts`, `tests/e2e/auth.spec.ts`)
- `--serial`: Force sequential execution with single worker (useful for WebGL, database tests)
- `--debug`: Run in debug/headed mode for visual debugging

## Your task

Run a single test file in **fail-fast mode** for rapid development iteration. Stop immediately on first failure to minimize feedback time.

### 1. Detect test framework and construct command

**Playwright** (if `playwright.config.*` exists):
```bash
# Standard fail-fast
bunx playwright test "$FILE" --max-failures=1 --reporter=line

# With --serial (WebGL, shared state)
bunx playwright test "$FILE" --max-failures=1 --workers=1 --reporter=line

# With --debug
bunx playwright test "$FILE" --max-failures=1 --headed --debug
```

**Vitest** (if `vitest.config.*` or `vite.config.*` exists):
```bash
# Standard fail-fast
bunx vitest run "$FILE" --bail=1 --reporter=dot

# With --serial
bunx vitest run "$FILE" --bail=1 --pool=forks --poolOptions.threads.singleThread --reporter=dot

# With --debug
bunx vitest run "$FILE" --bail=1 --inspect-brk
```

**Jest** (if `jest.config.*` exists):
```bash
# Standard fail-fast
bunx jest "$FILE" --bail --silent

# With --serial
bunx jest "$FILE" --bail --runInBand --silent

# With --debug
bunx jest "$FILE" --bail --runInBand
```

**pytest** (Python projects):
```bash
# Standard fail-fast
python -m pytest "$FILE" -x -v --tb=short

# With --serial (already serial by default)
python -m pytest "$FILE" -x -v --tb=short

# With --debug
python -m pytest "$FILE" -x -v --tb=long -s
```

**Cargo test** (Rust projects):
```bash
# Standard fail-fast
cargo test --test "$FILE" -- --test-threads=1

# With --debug
cargo test --test "$FILE" -- --test-threads=1 --nocapture
```

**Go test**:
```bash
# Standard fail-fast
go test -v -failfast "$FILE"

# With --debug
go test -v -failfast "$FILE" -count=1
```

### 2. Execute the test

Run the constructed command. Capture and display output.

### 3. Analyze results

If the test **passes**:
```
[FILE]: PASSED
Duration: Xs

Ready for next iteration or file.
```

If the test **fails**:
```
[FILE]: FAILED (stopped at first failure)
Duration: Xs

First failure:
  Test: [test name]
  Error: [brief error message]
  Location: [file:line]

Quick actions:
- Fix the issue and re-run: /test:focus [same file]
- Debug visually: /test:focus [file] --debug
- See full output: /test:run [file]
```

### 4. Provide rerun command

Always show the exact command to rerun:
```
Rerun: /test:focus $FILE
```

## Time savings context

Focused testing dramatically reduces feedback time:

| Approach | Typical Duration | Use Case |
|----------|------------------|----------|
| `/test:focus` | 2-30 seconds | Iterating on single file |
| `/test:quick` | 30 seconds | Unit tests after changes |
| `/test:full` | 5-30 minutes | Before commit/PR |

## Agentic optimizations

| Context | Flags |
|---------|-------|
| Playwright fast | `--max-failures=1 --reporter=line` |
| Playwright WebGL | `--max-failures=1 --workers=1 --reporter=line` |
| Vitest fast | `--bail=1 --reporter=dot` |
| Jest fast | `--bail --silent` |
| pytest fast | `-x -v --tb=short` |

## Error handling

- If file not found: List similar test files with `glob` and suggest corrections
- If framework not detected: Show available package.json scripts containing "test"
- If test times out: Suggest `--serial` flag or increasing timeout

Wersje

W bazie nie ma innych skilli o nazwie test-focus.

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

  • 100test-run
    Uruchamia testy projektu z automatycznym wykryciem pytest, vitest, jest, cargo lub go test, dla całego zestawu albo według wzorca nazwy.
  • 100tdd-workflow
    Prowadzi maszynę stanów TDD w trybie obserwowania testów w terminalu, przy jest, vitest, cargo watch lub pytest-watch.
  • 100test-runner
    Zbiera wiedzę o uruchamianiu testów: wykrywanie frameworków pytest, jest, vitest, go, cargo i junit, właściwe polecenia z pokryciem oraz kroki analizy awarii.
  • 100configure-tests
    Konfiguruje frameworki testowe (Vitest, Jest, pytest, cargo-nextest): infrastrukturę testową, migrację do nowoczesnego frameworka i walidację konfiguracji pokrycia.
  • 100testing-patterns
    Opisuje wzorce pytest z moto, Jest i Vitest z React Testing Library oraz Playwright E2E, także przy debugowaniu porażek.
  • 100testing
    Pisze testy jednostkowe, integracyjne, E2E, obciążeniowe i a11y w pytest, vitest, jest i Playwright, z fixtures i mockami.

Uwagi i zgłoszenia

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