Copilot instructions
.github/instructions/studio-composition-patterns.instructions.mdCopilot instructions
Quality
61/100
Scores the file, not the repository.Length
349 words
9 headings · 5 code blocksRepository
108k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.12345# React Composition Patterns Review Rules67All comments are **advisory**.89## Core Principle1011Avoid boolean prop proliferation. Use composition (compound components, explicit variants, children) instead of boolean flags to customize behavior.1213## When to Flag1415### 1. Boolean Prop Proliferation (HIGH)1617Flag components accumulating boolean props like `isThread`, `isEditing`, `showAttachments`. Each boolean doubles the state space.1819```tsx20// BAD — unclear intent, combinatorial explosion21<Composer isThread isDMThread isEditing isForwarding={false} />2223// GOOD — self-documenting variants24<ThreadComposer channelId="abc" />25<EditMessageComposer messageId="xyz" />26```2728### 2. Render Props Instead of Children (MEDIUM)2930Flag `renderX` callback props when `children` composition would work.3132```tsx33// BAD — render prop for structure34<Composer renderFooter={() => <F />} />3536// GOOD — compound component37<Composer.Footer>38 <Composer.Formatting />39 <Composer.Emojis />40</Composer.Footer>41```4243### 3. UI Coupled to State Implementation (MEDIUM)4445Flag UI components calling specific state hooks like `useGlobalChannelState()` directly. The provider should own the state implementation; UI should only use a generic context interface.4647```tsx48// BAD — UI knows HOW state is managed49const state = useGlobalChannelState(channelId)5051// GOOD — provider owns implementation, UI uses context52<ChannelProvider channelId={channelId}>53 <Composer /> {/* reads from context */}54</ChannelProvider>55```5657### 4. State Trapped in Child Components (MEDIUM)5859Flag state that siblings or dialogs need but can't access without prop drilling or refs. Lift it into a provider.6061```tsx62// BAD — sibling can't access state63function ForwardComposer() {64 const [state, setState] = useState(init)65}66// ForwardButton is a sibling and can't reach state6768// GOOD — provider at shared ancestor69<ForwardMessageProvider>70 <Composer /> {/* can access state */}71 <ForwardButton /> {/* can also access state */}72</ForwardMessageProvider>73```7475### 5. React 19 API Updates7677Flag `forwardRef` and `useContext` in new code — use `ref` as a regular prop and `use()` instead.7879```tsx80// BAD81const Input = forwardRef((props, ref) => <input ref={ref} />)82const value = useContext(MyContext)8384// GOOD85function Input({ ref, ...props }) { return <input ref={ref} /> }86const value = use(MyContext)87```8889## Key Principle9091Lift state → Compose UI → Inject via generic context → No boolean prop proliferation.9293Canonical standard: `.claude/skills/vercel-composition-patterns/SKILL.md`94
Also in supabase/supabase
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| supabase/supabase.claude/CLAUDE.md · 108k | CLAUDE.md | testlint-formatstylearch+1 | 97/100 | 3 days ago | |
| supabase/supabase.claude/skills/vercel-composition-patterns/AGENTS.md · 108k | AGENTS.md | styleapiuido-not | 45/100 | 3 days ago | |
| supabase/supabase.github/copilot-instructions.md · 108k | Copilot instructions | lint-formatstylegitagent-behaviour | 56/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-copy.instructions.md · 108k | Copilot instructions | uiagent-behaviourdocs | 25/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-e2e-tests.instructions.md · 108k | Copilot instructions | teststyletesting-strategygit+2 | 60/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-error-handling.instructions.md · 108k | Copilot instructions | gitdo-not | 57/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-shadcn-components.instructions.md · 108k | Copilot instructions | gituido-not | 55/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-shortcuts.instructions.md · 108k | Copilot instructions | stylegitdo-not | 61/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-telemetry.instructions.md · 108k | Copilot instructions | stylegitdo-notdocs | 65/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-testing.instructions.md · 108k | Copilot instructions | testtypestesting-strategygit+1 | 55/100 | 3 days ago | |
| supabase/supabaseapps/studio/CLAUDE.md · 108k | CLAUDE.md | testlint-formatstyletesting-strategy+1 | 81/100 | 3 days ago |
Diff against .claude/CLAUDE.md Diff against .claude/skills/vercel-composition-patterns/AGENTS.md Diff against .github/copilot-instructions.md Diff against .github/instructions/studio-copy.instructions.md Diff against .github/instructions/studio-e2e-tests.instructions.md Diff against .github/instructions/studio-error-handling.instructions.md Diff against .github/instructions/studio-shadcn-components.instructions.md Diff against .github/instructions/studio-shortcuts.instructions.md Diff against .github/instructions/studio-telemetry.instructions.md Diff against .github/instructions/studio-testing.instructions.md Diff against apps/studio/CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago |
