AGENTS.md Pattern for React Native: Claude Code Generates Better Project-Aware Code

A Reddit user, julia_ships, has been experimenting with an AGENTS.md file for React Native/Expo projects. The file acts as a structured document that tells AI coding agents like Claude Code and Cursor about project-specific conventions. The difference is significant — before using the file, Claude generated generic React Native code; after, it generates components using the project's exact theme tokens, hooks, and patterns.
What Goes Into the AGENTS.md File
The user includes the following sections in their AGENTS.md:
- Folder structure and file naming conventions — e.g., where components live, how files are named (PascalCase, kebab-case, etc.)
- Theme system and color tokens — exact token names and how to apply them
- Custom hooks and their usage patterns — how to import and use project-specific hooks
- Component patterns — functional components with typed props (TypeScript), structure, and export style
Results
With the AGENTS.md in place, Claude Code produces code that matches the project's conventions on the first try. For example, it uses the correct theme colors.primary instead of hardcoded '#6200ee', imports custom hooks like useAuth() instead of writing inline logic, and follows the established component pattern (functional, typed props, proper export).
Who It's For
React Native / Expo developers using Claude Code, Cursor, or similar AI coding agents who want to reduce manual code review and force the AI to respect project conventions.
📖 Read the full source: r/ClaudeAI
👀 See Also

Use CLAUDE.md to Persist Project Conventions Across Claude AI Sessions
Drop a CLAUDE.md file in your project root and Claude reads it at the start of every session, remembering your TypeScript rules, no default exports, testing conventions, and architecture context without re-explanation.

How a Non-Coder Built a Reusable Claude Workflow for Founder Content Marketing
A former magazine editor with zero coding background shares how they accidentally built a repeatable Claude workflow for solo founder content marketing: dump raw thoughts, then restructure with Claude into platform-specific formats.

How to disable Claude Code's verb spinner feature
Claude Code includes a default verb spinner that displays whimsical gerunds like 'Seasoning' and 'Crafting' during processing. You can disable it by editing the settings.json file with a blank space in the spinnerVerbs array.

6 Loop Types Found in Production AI Agents: A Week-Long Log Analysis
Analysis of 670 events from 5 production agents over a week reveals 6 high-severity loop patterns including decision oscillation, retry loops, ping pong loops, recall-write loops, reflection loops, and tool non-determinism.