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…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- accessibilitySkill
- clarify-requirementsSkill
- code-review-processSkill
- component-architectureSkill
- frontend-patternsSkill
- frontend-performanceSkill
- react-patternsSkill
- responsive-designSkill
- systematic-debuggingSkill
- typescriptSkill
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
- Distinctive: line 14
When this overview and a specific rule file disagree, the specific rule file wins.
- Distinctive: line 20
Before changing code, verify:
- Distinctive: line 24
Specific rule: read the focused rule file before writing code.
- Distinctive: line 30
Use these for most work:
- Distinctive: line 59
Use low-level JavaScript patterns last, not first
- Distinctive: line 68
Use JavaScript micro-patterns only after the bigger structural issues are gone.
- Distinctive: line 69
Treat this file as an index, not the final word.
- Distinctive: line 81
If you skipped the focused rule files, say so clearly and explain why.
≈ “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.
Files
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:
- Priority: solve the biggest performance class first.
- Category: choose the rule group that matches the real bottleneck.
- 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 . rulesFor targeted work:
sed -n '1,120p' rules/<rule-file>.mdRepo 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 guidancerules/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.
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
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.

