OpenParable
Skip to content
← Back to skills

Coding Standards

Development
coding-standards

Coding Standards is an Agent Skill for development published in the Expensify/App repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Provides coding standards for React Native — performance patterns, consistency rules, and clean React architecture. Use when writing, modifying, or reviewing code.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Expensify/App/blob/HEAD/.claude/skills/coding-standards/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/coding-standards, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Expensify Coding Standards

Coding standards for the Expensify App. Each standard is a standalone file in rules/ with reasoning, examples, and applicability conditions.

Categories

CategoryPrefixFocus
PerformancePERF-*Render optimization, memo patterns, useEffect hygiene, data selection
ConsistencyCONSISTENCY-*Platform checks, magic values, unused props, ESLint discipline, localization, file naming, JSDoc
Clean React PatternsCLEAN-REACT-PATTERNS-*Composition, component ownership, state structure, prop typing, function components
UIUI-*Loading indicators, scrollable pages, styling conventions

Quick Reference

Performance

  • PERF-1 — No spread in renderItem
  • PERF-2 — Return early before expensive work
  • PERF-3 — Use OnyxListItemProvider in renderItem
  • PERF-5 — Shallow over deep comparisons
  • PERF-6 — Derive state from props
  • PERF-7 — Reset via key prop
  • PERF-8 — Handle events in handlers
  • PERF-9 — No useEffect chains
  • PERF-10 — No useEffect parent communication
  • PERF-11 — Optimize data selection
  • PERF-12 — Prevent memory leaks
  • PERF-13 — Hoist iterator-independent calls
  • PERF-14 — Use useSyncExternalStore
  • PERF-15 — Clean up async Effects
  • PERF-16 — Guard double initialization
  • PERF-17 — Pass raw source, index on demand (no pre-built digest)
  • PERF-18 — Use usePreMountDestination for RHP pre-mounting

Consistency

Clean React Patterns

UI

  • UI-1 — Use the correct loading indicator based on navigation context
  • UI-2 — New pages must be scrollable
  • UI-3 — Do not use inline style objects

Usage

During development: When writing or modifying src/ files, consult the relevant standard files for detailed conditions, examples, and exceptions.

During review: The code-inline-reviewer agent loads all standards from this directory. See .claude/agents/code-inline-reviewer.md.