coding-standards
30
总安装量
30
周安装量
#12362
全站排名
安装命令
npx skills add https://github.com/expensify/app --skill coding-standards
Agent 安装分布
amp
30
gemini-cli
30
github-copilot
30
codex
30
windsurf
30
kimi-cli
30
Skill 文档
Expensify Coding Standards
Coding standards for the Expensify App. Each standard is a standalone file in rules/ with reasoning, examples, and applicability conditions.
Categories
| Category | Prefix | Focus |
|---|---|---|
| Performance | PERF-* |
Render optimization, memo patterns, useEffect hygiene, data selection |
| Consistency | CONSISTENCY-* |
Platform checks, magic values, unused props, ESLint discipline |
| Clean React Patterns | CLEAN-REACT-PATTERNS-* |
Composition, component ownership, state structure |
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
Consistency
- CONSISTENCY-1 â No platform-specific checks in components
- CONSISTENCY-2 â No magic numbers/strings
- CONSISTENCY-3 â No code duplication
- CONSISTENCY-4 â No unused props
- CONSISTENCY-5 â Justify ESLint disables
- CONSISTENCY-6 â Proper error handling
Clean React Patterns
- CLEAN-REACT-PATTERNS-1 â Composition over configuration
- CLEAN-REACT-PATTERNS-2 â Components own their behavior
- CLEAN-REACT-PATTERNS-3 â Context-free component contracts
- CLEAN-REACT-PATTERNS-4 â No side-effect spaghetti
- CLEAN-REACT-PATTERNS-5 â Keep state narrow
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.