putio-frontend-patterns

Installation
SKILL.md

put.io Frontend Patterns

Use this skill when writing or reviewing UI/frontend code in a put.io frontend repository, or when seeding the repo's .patterns/ folder.

Bundled references: frontend-defaults.md and pattern-template.md.

Use this skill for put.io-wide code defaults and .patterns/ for repo-specific choices such as schema, state-machine, styling, and testing libraries.

Quick Rules

  • Type/schema-driven: schemas at the boundary are the source of truth. Types follow from schemas, not the other way around.
  • Parse at the boundary: turn unknown input into typed values at the boundary. Pass typed values inward so raw unknown, untyped JSON, and "validated but still loosely typed" data stay out of the render tree.
  • Make impossible states impossible: discriminated unions, sealed shapes, exhaustive matches. No sentinel nulls or isLoading + data + error boolean salads.
  • State machines for bug-sensitive flows: auth, payment, video conversion, video playback, upload, transfer lifecycle — model them as explicit state machines, not ad-hoc useState cascades.
  • Localize expected errors, bound unexpected errors: feature code maps known failures to actionable localized messages; route or feature boundaries catch unknown crashes without blanking the whole app.
  • Effects at leaves: data fetching, navigation, storage, telemetry happen in adapters and leaves. Render trees stay pure and easy to test.
  • No type escape hatches: no as, no non-null !, no @ts-expect-error without a written reason. If you need one, the model is wrong — fix the model.
  • Repo overrides skill: .patterns/<topic>.md in the repo wins over this skill's defaults. The skill is the fallback when the repo is silent.
Related skills

More from putdotio/skills

Installs
5
Repository
putdotio/skills
First Seen
Apr 29, 2026