consumer-app-starter
AGENTS.md0 starsChanged 2 months agoMITView on GitHub
This is a minimal consumer-app foundation: Expo mobile, Next.js/tRPC backend, Supabase Auth/Postgres, Drizzle, and shared packages in a pnpm/Turborepo workspace. Product behavior is intentionally undefined. - Setup and commands: README.md, getting started. - Data access and auth: architecture, authentication. - Schema, migrations, RLS, grants: database. - UI work: design principles. - Builds, environments, submissions, updates: releases. - Skill selection and sources: skills. Read existing code before editing. State the intended scope. Keep changes focused and preserve work you did not…
- Reads credentials
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 repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- building-native-uiSkill
- expo-cicd-workflowsSkill
- expo-deploymentSkill
- expo-dev-clientSkill
- hig-components-controlsSkill
- hig-components-dialogsSkill
- hig-components-layoutSkill
- hig-foundationsSkill
- hig-patternsSkill
- native-data-fetchingSkill
- no-use-effectSkill
- supabase-postgres-best-practicesSkill
- upgrading-expoSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 1 is common, 6 are distinctive, and 6 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 18
Read existing code before editing.
- Very specific: line 25
Run commands from the repository root.
- Very specific: line 32
Use EAS development clients for native work.
- Very specific: line 48
Never expose a database URL or service secret with an EXPO_PUBLIC_ or NEXT_PUBLIC_ prefix.
- Distinctive: line 56
Use kebab-case filenames. Keep CLAUDE.md as a one-line import of this file.
- Very specific: line 64
No new direct useEffect in app code.
- Distinctive: line 75
Verify UI through an available browser or simulator tool.
- Very specific: line 98
Run the narrowest useful checks for the change.
- Distinctive: line 103
Update docs alongside command, environment, architecture, or workflow changes.
- Very specific: line 104
Keep durable documentation in docs/.
- Distinctive: line 109
Use existing explicit user authorization.
- Distinctive: line 110
Read-only checks and reversible local work can proceed within the task.
- Common: line 116
Never commit secrets or personal tool permissions.
≈ “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
Agent operating manual
This is a minimal consumer-app foundation: Expo mobile, Next.js/tRPC backend, Supabase Auth/Postgres, Drizzle, and shared packages in a pnpm/Turborepo workspace. Product behavior is intentionally undefined.
Read the relevant contract
- Setup and commands: README.md, getting started.
- Data access and auth: architecture, authentication.
- Schema, migrations, RLS, grants: database.
- UI work: design principles.
- Builds, environments, submissions, updates: releases.
- Skill selection and sources: skills.
Read existing code before editing. State the intended scope. Keep changes focused and preserve work you did not create. Follow the owner's request; do not invent an app concept, business schema, onboarding flow, guest policy, or visual brand.
Development
Run commands from the repository root. Use pnpm dev for the development
environment. Check whether the relevant servers are already running before
starting another instance. The default ports are API 3001 and Metro 8081. The
dev script refuses occupied ports and never kills an arbitrary listener. Set
PORT, EXPO_PORT, and EXPO_PUBLIC_API_URL for another instance. Restart
after editing .env.
Use EAS development clients for native work. Native builds are EAS-only in this
starter: no expo run:ios, expo run:android, or local Xcode/Gradle builds.
This is a project convention; bundled upstream examples do not override it. Do
not create builds or provision services just to inspect source.
Architecture
- Supabase owns authentication. Keep provider secrets in Supabase, never the client.
- Direct application data access uses the Supabase client through React Query, protected by grants and RLS. tRPC is available for server operations. Do not rewrite one path into the other without a reason tied to the requested behavior.
- Server code uses Drizzle. A privileged Postgres connection can bypass RLS; authenticated tRPC middleware does not establish row ownership. Check ownership in every applicable server operation.
- Never expose a database URL or service secret with an
EXPO_PUBLIC_orNEXT_PUBLIC_prefix. - Supabase
{ error }values must be handled. A failed read must render a failure with retry, never an empty result. Keep user data out of logs. - React Query keys come from the shared key factory. Invalidate affected views after writes and clear user-specific cache when identity changes.
- Route files compose screens. Share code when there is a real consumer; do not introduce a feature hierarchy before a feature exists.
- Use kebab-case filenames. Keep
CLAUDE.mdas a one-line import of this file.
React and UI
Use no-use-effect, native data fetching, and native UI in their domains.
No new direct useEffect in app code. Prefer derived state, event handlers,
React Query, and declarative navigation. The documented mount helper is for true
external lifecycle synchronization; it is not an escape hatch for fetching or
state mirroring. ESLint enforces the import convention.
Apply Apple HIG principles to React Native: accessibility, Dynamic Type, touch targets, safe areas, platform navigation, and reduced motion. Upstream SwiftUI/UIKit examples are guidance, not instructions to generate an Xcode project. Product-specific design decisions belong in docs once the owner makes them.
Verify UI through an available browser or simulator tool. Exercise the actual interaction, inspect resulting state and a screenshot, and report what was checked. Prefer the project's registered UI tools when available. Do not assume a particular MCP server, IDE, paid service, or simulator is installed. If native testing is unavailable, report that limit instead of claiming a native pass.
Database changes
Read Supabase Postgres guidance. Edit the Drizzle schema and generate migrations in the same change. Never use schema push or apply untracked production DDL. Keep migration testing on disposable databases. Add ownership/RLS assertions when the first user-owned tables are introduced. Never recreate Supabase's auth schema in application migrations.
Mobile clients and databases release separately: use additive changes first, ship compatible clients, and retire old columns only when installed clients are safe. This empty starter does not claim an app-specific compatibility scanner; add checks for the schema and client selects as the product grows.
Verification and handoff
- Run the narrowest useful checks for the change.
pnpm checkcovers formatting, lint, types, tests, and skill snapshots.pnpm buildchecks Next.js and iOS bundling. Schema changes also needpnpm db:test. - Make small focused commits as changes land. Explain what changed, why, and what was verified.
- Update docs alongside command, environment, architecture, or workflow changes.
- Keep durable documentation in
docs/. Keep transient plans and session notes out of the repository.
Authorization
Use existing explicit user authorization; do not ask twice for the same action. Read-only checks and reversible local work can proceed within the task.
Get authorization before new spending, provisioning external services, destructive data changes, production migrations/deployments, EAS submissions or updates, and merging PRs. A request to prepare a change does not authorize publishing it. Changing app identity after release also requires owner approval. Never commit secrets or personal tool permissions.
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.

