Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

make-it-robust

/make-it-robust

Projektuje kod I/O, stanu i współbieżności pod kątem awarii: waliduje dane wejściowe, zawodzi szybko, jest idempotentny i możliwy do debugowania w produkcji.

Repozytorium
truecast ↗
Licencja
MIT
Ostatnia zmiana repozytorium
17.10.2026

Ocena i bezpieczeństwo

90/ 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ść25 / 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 17.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

Projektuje kod I/O, stanu i współbieżności pod kątem awarii: waliduje dane wejściowe, zawodzi szybko, jest idempotentny i możliwy do debugowania w produkcji.

Oryginalny opis (EN)

Use when writing code that touches I/O, state, concurrency, or external systems — design for failure: validate inputs, fail fast, be idempotent and concurrency-safe, and make it debuggable in production.

Jak działa

  1. The method
  2. The discipline
Sekcje z nagłówków SKILL.md, w oryginale · 33 linii, 395 słów
Podgląd SKILL.md
---
name: make-it-robust
description: Use when writing code that touches I/O, state, concurrency, or external systems — design for failure: validate inputs, fail fast, be idempotent and concurrency-safe, and make it debuggable in production.
---
# Make it robust — design for the failure paths, not just the happy one

The happy path is the easy 80%; production lives in the other 20%. Robust code assumes things go wrong
and stays correct (or fails safely) when they do.

## The method
- **Validate at the boundary.** Treat all external input (user, network, file, env) as hostile until
  checked; validate shape and range at the edge, not deep inside.
- **Fail fast and loud.** Detect a broken invariant early and stop with a clear error, rather than
  limping on with corrupt state. Don't swallow errors; don't `catch {}` into silence.
- **Handle the failures that matter.** Network timeout mid-flow, partial write, the dependency is down,
  the disk is full — decide the behavior (retry with backoff, roll back, surface). Name what happens.
- **Idempotency + concurrency.** A retried or double-submitted request must not double-apply; concurrent
  actors must not corrupt shared state (locks, atomic ops, optimistic concurrency, transactions). These
  bugs hide until load finds them.
- **Delivery-vs-readiness races.** Don't assume the receiver is ready just because you sent. An event/
  message/callback can arrive **before the consumer has subscribed, resumed, or finished starting up** —
  and a fire-and-forget send drops it on the floor with no error. Design for it: durable/buffered delivery
  (the consumer reads when ready), an explicit ready/ack handshake before you send, or replay/catch-up of
  what was missed. Same race on the write side — don't read a value you only *just* wrote to an
  eventually-consistent or async store. These pass every happy-path test and only bite in production timing.
- **Make it debuggable.** Log the *why* with enough context to diagnose later (ids, inputs, the decision
  taken); surface clear errors, not opaque ones. Future-you, mid-incident, depends on this.
- **Secure by default.** Treat security as part of robust, not a later pass: **parameterize** queries
  (never string-build SQL); **escape/encode** output (no injection/XSS); enforce **authz at the boundary**
  for every request; **never log or commit secrets**; default-deny. For anything beyond the basics or a
  real threat model, pull in **security-engineer** — but the basics are yours, always.

## The discipline
- "It works when nothing goes wrong" is the floor, not done — the adversarial pass
  (`prove-it-then-break-it`) is how you check the failure paths you designed for.
- Prefer a small, well-handled failure surface to a sprawling try/catch that hides what broke.

Wersje

W bazie nie ma innych skilli o nazwie make-it-robust.

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

  • 100swift-concurrency-pro
    Przegląda kod Swift pod kątem współbieżności, nowoczesnych API i typowych pułapek async/await.
  • 95backend-concurrency-review
    Przegląda kod pod kątem współbieżności: wyścigów, granularności blokad, pułapek async, idempotencji ponowień i wspólnego stanu.
  • 90cpp-modern-systems
    Pisze i sprawdza nowoczesne systemy i biblioteki w C++20/23, z jawną własnością zasobów i semantyką współbieżności.
  • 90esp32-concurrency-stress-testing
    Projektuje testy obciążeniowe współbieżności dla firmware ESP32 i sprawdza, czy kod je wytrzymuje przed wydaniem.
  • 100failure-review
    Szybko przegląda różnicę pod kątem błędów w produkcji: ponowne uruchomienia, awarie, duplikaty, współbieżność i sekrety, do trzech sprawdzonych ustaleń.
  • 100swift-concurrency-expert
    Przegląda użycie Swift Concurrency w Swift 6.2+ i naprawia zgodność oraz błędy kompilatora współbieżności w funkcji lub pliku.

Uwagi i zgłoszenia

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