agentleFS
basidiocarpbasidiocarp/pileus/.claude/skills/react-patterns/AGENTS.md

pileus / react-patterns

AGENTS.md0 starsChanged 6 months agoMITView on GitHub

This file is the routing index for the focused React and Next.js rule files in rules/. Use it to pick the right category fast, then read the specific rule file that matches the problem. The detailed rule files are the source of truth; this overview only tells you where to look first. When this overview and a specific rule file disagree, the specific rule file wins. Before changing code, verify: Use these for most work: For targeted work: This is…

The file

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this overview and a specific rule file disagree, the specific rule file wins.

    line 14
  2. Distinctive:

    Before changing code, verify:

    line 20
  3. Distinctive:

    Specific rule: read the focused rule file before writing code.

    line 24
  4. Distinctive:

    Use these for most work:

    line 30
  5. Distinctive:

    Use low-level JavaScript patterns last, not first

    line 59
  6. Distinctive:

    Use JavaScript micro-patterns only after the bigger structural issues are gone.

    line 68
  7. Distinctive:

    Treat this file as an index, not the final word.

    line 69
  8. Distinctive:

    If you skipped the focused rule files, say so clearly and explain why.

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

React Pattern Agent Notes

Purpose

This file is the routing index for the focused React and Next.js rule files in rules/. Use it to pick the right category fast, then read the specific rule file that matches the problem. The detailed rule files are the source of truth; this overview only tells you where to look first.


Source of Truth

  • rules/: authoritative focused guidance for React and Next.js performance work.
  • This file: routing order and category map.

When this overview and a specific rule file disagree, the specific rule file wins.


Before You Start

Before changing code, verify:

  1. Priority: solve the biggest performance class first.
  2. Category: choose the rule group that matches the real bottleneck.
  3. Specific rule: read the focused rule file before writing code.

Preferred Commands

Use these for most work:

rg "async-|bundle-|server-|client-|rerender-|rendering-|advanced-" rules
fd . rules

For targeted work:

sed -n '1,120p' rules/<rule-file>.md

Repo Architecture

This is a routing layer over a deeper rule set. The overview should stay short, ordered, and practical. The rule files should carry the real implementation guidance.

Key boundaries:

  • this file: category order and routing
  • rules/async-*: waterfall and async guidance
  • rules/bundle-*, rules/server-*, rules/client-*, rules/rerender-*, rules/rendering-*, rules/js-*, rules/advanced-*: focused problem-specific rules

Current direction:

  • Fix waterfalls before micro-optimizations
  • Fix bundle shape before low-level rerender tweaks
  • Use low-level JavaScript patterns last, not first

Working Rules

  • Eliminate waterfalls first.
  • Reduce bundle size before tuning fine-grained rerender behavior.
  • Fix server fetch and caching mistakes before low-level client work.
  • Use JavaScript micro-patterns only after the bigger structural issues are gone.
  • Treat this file as an index, not the final word.

Done Means

A task is not complete until:

  • The bottleneck category was identified first
  • The focused rule file, not just this index, informed the change
  • The final recommendation or code change reflects the priority order in this file

If you skipped the focused rule files, say so clearly and explain why.

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.