preact-best-practices
Installation
SKILL.md
Preact Best Practices
Use this skill to write and review Preact v10 code with Preact-first defaults, while selectively importing React best practices when they transfer cleanly. Keep preact/compat guidance explicit: treat it as an interop boundary, not the default.
Use This Skill When
- Building or reviewing Preact components, hooks, or shared UI patterns
- Deciding between signals, hooks, and local component state
- Debugging rerenders, effect loops, stale closures, or hydration mismatches
- Writing or fixing tests using Preact Testing Library patterns
- Integrating React-ecosystem packages via
preact/compatand wanting the tradeoffs made explicit
Out Of Scope
- Generic React-only advice that assumes React internals apply unchanged to Preact
- Full framework selection debates (keep advice bounded to Preact usage once chosen)
- Tooling or bundler setup tutorials unless the user explicitly asks