agentleFS
CodeCaroSCodeCaroS/MythOs_Aegis/.agents/skills/vercel-react-best-practices/SKILL.md

vercel-react-best-practices

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Review, write, or refactor React and Next.js code for measurable performance without overriding the repository's architecture or adding speculative dependencies. Use for components, rendering, data fetching, bundles, hydration, server/client boundaries, and performance investigations.

176 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dep-refs, feature-boundary-planner and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • betacatslingSkill

    dep-refs

    Use when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.

    Also in 5 projects that use this

  • betacatslingSkill

    feature-boundary-planner

    Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.

    Also in 5 projects that use this

  • VercelSkill

    next-upgrade

    Upgrade Next.js to the latest version following official migration guides and codemods

    Also in 12 projects that use this

  • SentrySkill

    vercel-composition-patterns

    Also in 124 projects that use this

  • Cartograf666Skill

    architecture-governance

    Bootstrap, document, enforce, and review a project's architecture through layer responsibilities, dependency direction, architecture manifests, legacy baselines, Change Envelopes, cross-layer approval policy, and deterministic architecture checks. Use when starting a project, auditing an existing codebase, planning cross-layer work, preventing architecture erosion, reviewing structural changes, or deciding whether implementation may expand into another layer.

    Also in 5 projects that use this

  • VercelSkill

    next-cache-components

    Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

    Also in 17 projects that use this

  • +3 more from vercel-labs

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove serial waits that can safely run in parallel.

    line 20
  2. Distinctive:

    Avoid shipping code and data the current route does not need.

    line 21
  3. Very specific:

    Use stable keys, accessible native elements, explicit loading/error/empty states, and immutable state updates.

    line 25
  4. Distinctive:

    Read the package versions and existing data-fetching/state patterns first.

    line 29
  5. Distinctive:

    Prefer platform and framework primitives already installed.

    line 30
  6. Very specific:

    Do not add SWR, an LRU package, better-all, memoization, dynamic imports, or caches without a demonstrated need.

    line 31
  7. Very specific:

    Treat useMemo, useCallback, and memo as measured optimizations, not defaults.

    line 33
  8. Distinctive:

    Keep request-specific mutable state out of shared server modules.

    line 34

“Common” is measured: kept by at least 6 in 10 of the 173 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React Best Practices

Diagnose before optimizing. Fetch current React or Next.js documentation when version-specific behavior matters.

Priority

  1. Remove serial waits that can safely run in parallel.
  2. Avoid shipping code and data the current route does not need.
  3. Preserve server/client trust boundaries; authenticate server actions like other endpoints.
  4. Derive state during render when possible; reserve effects for synchronization with external systems.
  5. Prevent avoidable subscriptions and re-renders only where the component is hot or the cost is visible.
  6. Use stable keys, accessible native elements, explicit loading/error/empty states, and immutable state updates.

Guardrails

  • Read the package versions and existing data-fetching/state patterns first.
  • Prefer platform and framework primitives already installed.
  • Do not add SWR, an LRU package, better-all, memoization, dynamic imports, or caches without a demonstrated need.
  • Parallelize only independent work. Preserve ordering, authorization, rate limits, and transaction semantics.
  • Treat useMemo, useCallback, and memo as measured optimizations, not defaults.
  • Keep request-specific mutable state out of shared server modules.
  • Minimize data crossing server-to-client boundaries and avoid leaking secrets.
  • For each non-trivial change, leave the smallest runnable regression or performance check.

Report the observed bottleneck, the narrow fix, and the evidence. Do not label stylistic preferences as performance defects.

Adapted for MythOs Aegis from Vercel's react-best-practices.

Shared output profile

Compose the review profile from output-templates. Report each finding with evidence, measurement or unknown impact, smallest fix, and verification method. Preserve stricter domain rules above, omit empty components, and never fill a component with invented evidence.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.