Skill / SKILL.md

Frontend Optimistic Mutations

stareezy-1/frontend-architecture-skill

A portable, framework-agnostic discipline for the write path of any React or React Native app using a query/cache layer. Codifies the optimistic-update lifecycle (cancel in-flight queries → snapshot every affected cache → patch instantly → roll back verbatim on error → invalidate on settle), idempotency keys generated once at form init so retries replay the original response on money-moving writes, multi-cache coherence so a detail view and every list page update in lock-step, and the rule that server state is never mirrored into a client store. Shows TanStack Query, RTK Query, and SWR variants. Use this skill when writing create/update/delete mutations, adding optimistic UI with rollback, making writes idempotent, keeping list and detail caches consistent after a write, or reviewing mutation and cache-invalidation code. Works with React + Vite, Next.js, Remix, and Expo / React Native.
1 views 10 repository starsUpdated Nov 28, 2026
Overview

A portable, framework-agnostic discipline for the write path of any React or React Native app using a query/cache layer. Codifies the optimistic-update lifecycle (cancel in-flight queries → snapshot every affected cache → patch instantly → roll back verbatim on error → invalidate on settle), idempotency keys generated once at form init so retries replay the original response on money-moving writes, multi-cache coherence so a detail view and every list page update in lock-step, and the rule that server state is never mirrored into a client store. Shows TanStack Query, RTK Query, and SWR variants. Use this skill when writing create/update/delete mutations, adding optimistic UI with rollback, making writes idempotent, keeping list and detail caches consistent after a write, or reviewing mutation and cache-invalidation code. Works with React + Vite, Next.js, Remix, and Expo / React Native.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/stareezy-1/frontend-architecture-skill' skill-source

Use the complete skill-source/skills/frontend-optimistic-mutations directory with your client’s skill installer.

  • skills/frontend-optimistic-mutations

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory skills/frontend-optimistic-mutations

Compatibility & requirements

Declared compatibility

Works with Claude Code, OpenCode, Codex, Cursor, Windsurf, Copilot, and any tool that reads SKILL.md or is pointed here from AGENTS.md / CLAUDE.md.

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Included files
Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
e21e27ae0f3f143076229f00753a3f1872803b8f471c0f6367a156cea551975d
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills