design-first
Skill1.8k starsChanged 3 months agoMITView on GitHub
Shape non-trivial work before writing it — decide the modules, the seams, and the public API surface up front. Use when starting a feature, adding an integration, changing the public barrel (`packages/core/src/js/index.ts`), crossing the JS↔native bridge, changing a codegen spec, or deciding where a seam should go. Produces a design sketch to approve before implementation, then hands off to code-guidelines and test-guidelines.
3 other projects use a version of this, 1 of them edited.
Trending
Quiet this year.thin dataabout the whole repository
Most recently taken up by
- techygarg/latticetheir own version, first seen Sep 3, 2026
- valsecchi75/project-scaffoldertheir own version, first seen Aug 3, 2026
- getsentry/sentry-dartedited, first seen Jul 1, 2026
Who's talking about getsentry/sentry-react-native
- bluesky-social/social-app“Make Sentry optional”GitHub · Sep 8, 2023 · 21 reactions
- expo/sentry-expo“Critical Security - Upgrade @sentry/react-native to 1.3.9”GitHub · May 21, 2020 · 15 reactions
- expo/expo“[SDK 51] Xcode 16 compilation fails on pegged Sentry version”GitHub · Jul 2, 2024 · 14 reactions
- react/react-native“[0.60.3] --sourcemap-output | enableHermes: false | gradle file | wrong output path”GitHub · Jul 17, 2019 · 10 reactions
- expo/expo“[expo] Bump recommended @sentry/react-native version”GitHub · Sep 25, 2024 · 8 reactions
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub (9 times).
On GitHub · 9
- Sep 8, 2023Make Sentry optional — bluesky-social/social-app21 reactions
- May 21, 2020Critical Security - Upgrade @sentry/react-native to 1.3.9 — expo/sentry-expo15 reactions · 28 comments
- Jul 2, 2024[SDK 51] Xcode 16 compilation fails on pegged Sentry version — expo/expo14 reactions · 12 comments
- Jul 17, 2019[0.60.3] --sourcemap-output | enableHermes: false | gradle file | wrong output path — react/react-native10 reactions · 8 comments
- Sep 25, 2024[expo] Bump recommended @sentry/react-native version — expo/expo8 reactions · 1 comment
4 more on GitHub
- Jul 19, 2024Update sessions after running beforeSend — getsentry/sentry-cocoa7 reactions · 6 comments
- Jun 22, 2022Bundling React Native with Hermes manually — react/react-native7 reactions · 24 comments
- Nov 6, 2019Implement hermes source maps — getsentry/rust-sourcemap7 reactions · 2 comments
- May 30, 2023Upgrade `@sentry/react-native` to version `5` — expo/sentry-expo6 reactions · 6 comments
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- getsentry/sentry-dart★ 87344% same
Wrote their own version · 2
- techygarg/lattice★ 197same name
- valsecchi75/project-scaffolder★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- packages/core/AGENTS.mdAGENTS.md
- packages/core/android/AGENTS.mdAGENTS.md
- packages/core/ios/AGENTS.mdAGENTS.md
- samples/expo/AGENTS.mdAGENTS.md
- samples/react-native/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-guidelinesSkill
- diagnosing-bugsSkill
- reviewSkill
- specSkill
- test-guidelinesSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run for work where the shape is a real decision:
- Distinctive: line 23
Use these terms exactly in the sketch — consistent language is what makes the design legible across sessions.
- Distinctive: line 64
If the change crosses the bridge, decide *now* (not during implementation):
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design the shape before writing the code. The pass ends in a design sketch the user approves; implementation does not start until it does. Aim for deep modules placed at clean seams — so callers get leverage, maintainers get locality, and tests get a surface to push against.
This is a design pass, not an implementation plan. Decide what shape the code takes and why; leave line-level rules to code-guidelines and test structure to test-guidelines.
When to run
Run for work where the shape is a real decision:
- A new feature or a new integration
- A change to the public barrel (
packages/core/src/js/index.ts) or a public option inoptions.ts— it cascades to every downstream user and the API report - A change to a codegen spec (
src/js/NativeRNSentry.ts,*NativeComponent.ts) or anything crossing the JS↔native bridge — the ABI must move in lockstep across JS/iOS/Android - Any moment you are choosing where a seam goes, or how a module is shaped to be testable
Skip it — and say you are skipping it — for one-line fixes, localized bug fixes with obvious placement, and refactors that change no interface.
Vocabulary
Use these terms exactly in the sketch — consistent language is what makes the design legible across sessions. Don't substitute "component," "service," or "layer."
- Module — anything with an interface and an implementation: a function, a factory, a class, a file.
- Interface — everything a caller must know to use it correctly: the signature, plus invariants, ordering, error modes, required config.
- Deep module — a lot of behavior behind a small interface. The goal. A shallow module has an interface nearly as complex as its implementation — avoid it.
- Seam — the place where you can swap behavior without editing in that place. Where an interface lives, and where a test double crosses. In this SDK the biggest seam is the
NATIVEwrapper (src/js/wrapper.ts) between JS and native. - Adapter — a concrete thing satisfying an interface at a seam.
Two checks settle most design questions:
- The deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through — don't build it. If complexity reappears across N callers, it earns its keep.
- The interface is the test surface. Callers and tests cross the same seam. If you need to test past the interface, the module is the wrong shape.
The design pass
1. Frame the change
State the behavior the change introduces, in the domain's own words. Name the surface(s) it lands in — JS, Android, iOS, bridge — and read the relevant AGENTS.md (root, packages/core/, packages/core/android/, packages/core/ios/).
Find the nearest well-shaped precedent and align to it. The codebase has almost certainly solved something adjacent — locate its best current example and match it, or improve on it deliberately and say why. The TurboModule subsystem (turbomodule/ + thin integrations/turboModuleContext*.ts wiring) is a strong precedent for a cohesive feature that touches JS, native, and the bridge; the integration factory in integrations/nativelinkederrors.ts is the precedent for a plain JS integration.
2. Shape the modules
Decide the modules and where their seams go. Prefer fewer, deeper modules over many shallow ones. For each module, name its interface — not just the signature, but the invariants and error modes a caller must know. Run the deletion test on anything you suspect is a pass-through.
Decide where the code lives as part of shaping it — a locality call: co-locate what changes together so one change stays directory-local.
- A cohesive subsystem owns its model, lifecycle, and pipeline as one concept — group it in its own dir (like
turbomodule/), and let theintegrations/file be thin wiring.integrations/is a type-bucket, not a home for a subsystem's logic. - Native code belongs behind the bridge seam under
packages/core/android/andpackages/core/ios/; JS features call it viaNATIVE, they don't embed native code. - If you can't name the concern a piece serves, that's a smell — it's doing two things, or belongs to a concept you haven't named.
3. Design for testability
A seam exists so a test can cross it (test-guidelines builds the fakes there). Three rules make that possible:
- Accept dependencies, don't create them. A module that reaches for
NativeModules.RNSentryitself can't be faked; one that receives the bridge (or goes through theNATIVEseam a test can mock) can. - Keep the platform/arch branch at the edge. Push
Platform.OS/isTurboModuleEnabled()decisions to a thin boundary so the core logic is arch-agnostic and unit-testable without simulating a device. - Make the observable output the contract. Tests assert on the produced event/envelope/resolved value, not on private state — so the design must route results through the interface.
4. Account for the bridge, up front
If the change crosses the bridge, decide now (not during implementation):
- What the payload shape is and whether it is codegen-expressible or must be an
Objectvalidated natively (seecode-guidelines/references/native-bridge.md). - Whether it's an ABI change and how JS/iOS/Android land in lockstep while staying backward-compatible with older cached native binaries.
- How it behaves when
enableNativeis false or the module isn't linked. - What crosses regarding PII and how it's gated.
5. Write the sketch and get sign-off
Produce, in the conversation: the modules and their interfaces; where each lives and why (locality); the seams and what fakes cross them; the bridge/ABI decisions; and what you deliberately chose not to build (deletion-test casualties). Get the user's approval before implementing, then hand off to code-guidelines + test-guidelines.
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.

