agentleFS
SentryKnown publishergetsentry/sentry-react-native/AGENTS.md

sentry-react-native

AGENTS.md1.8k starsChanged 3 months agoMITView on GitHub

Sentry React Native SDK — a hybrid SDK: a TypeScript/JS layer on top that wraps the native sentry-cocoa (iOS) and sentry-android/java SDKs through a JS↔native bridge. Monorepo using yarn workspaces; the SDK itself is the packages/core package. Changes to the wrapped native SDKs can ripple to them and to downstream hybrid SDKs (Flutter, .NET/MAUI, Unity) — see Cross-Platform Dependencies. ✅ Always - Run yarn lint, yarn test, and yarn circularDepCheck before calling a change done; regenerate the API report (yarn…

  • Deletes or force-pushes

Trending

Quiet this year.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the getsentry/sentry-react-native repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about getsentry/sentry-react-native

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

4 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

12 rules. About 1 is common, 5 are distinctive, and 6 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    Continuous Learning: when you discover a durable pattern, record it in the nearest nested AGENTS.md (or the relevant skill), not inline in …

    line 17
  2. Distinctive:

    Context Management: after compaction, re-read the AGENTS.md for the surface you're touching before continuing.

    line 18
  3. Very specific:

    Run yarn lint, yarn test, and yarn circularDepCheck before calling a change done.

    line 48
  4. Very specific:

    Add CHANGELOG.md noise for routine internal/CI/test/chore changes — the user-facing sections (### Features, ### Fixes) are for user-visible …

    line 62
  5. Common:

    Commit secrets, tokens, or DSNs.

    line 63
  6. Very specific:

    Follow conventional commit format: <type>(<scope>): <subject>

    line 67
  7. Distinctive:

    When asked to open a PR:

    line 81
  8. Distinctive:

    Ask: if it should be a draft PR (default: draft).

    line 82
  9. Very specific:

    Use the repo's PR template (.github/pull_request_template.md) for the body.

    line 83
  10. Very specific:

    Update CHANGELOG.md for user-visible changes

    line 130
  11. Very specific:

    Ensure build is up to date: yarn build

    line 163
  12. Distinctive:

    When discovering new patterns, add them to the nearest nested AGENTS.md file.

    line 170

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Sentry React Native SDK — a hybrid SDK: a TypeScript/JS layer on top that wraps the native sentry-cocoa (iOS) and sentry-android/java SDKs through a JS↔native bridge. Monorepo using yarn workspaces; the SDK itself is the packages/core package.

Stack

  • Published packages: @sentry/react-native (packages/core, the SDK) + companion @sentry/expo-upload-sourcemaps; yarn 4 workspaces.
  • Wraps native SDKs: sentry-cocoa (iOS) + sentry-android/java (Android) through the JS↔native bridge.
  • Hosts: React Native on both the New (TurboModule/Fabric) and Old (bridge) Architecture, plus Expo and React.
  • Exact versions (don't copy them here — they rot): JS deps and host peer ranges in packages/core/package.json; the bundled native SDK versions per release in SDK-VERSIONS.md (regenerated each release by craft-pre-release.sh).

Changes to the wrapped native SDKs can ripple to them and to downstream hybrid SDKs (Flutter, .NET/MAUI, Unity) — see Cross-Platform Dependencies.

Agent Responsibilities

  • Reach for a skill first. For anything beyond a trivial edit, load the matching skill (see Skills) — it carries the deep, current guidance this file only indexes.
  • Continuous Learning: when you discover a durable pattern, record it in the nearest nested AGENTS.md (or the relevant skill), not inline in a PR.
  • Context Management: after compaction, re-read the AGENTS.md for the surface you're touching before continuing.

Setup

yarn install
yarn build

Quick Reference

TaskCommand
Build all packagesyarn build
Build SDK (watch)cd packages/core && yarn build:sdk:watch
Run all testsyarn test
Run all lintersyarn lint
Auto-fix lintyarn fix
Circular dep checkyarn circularDepCheck
API report generateyarn api-report
API report checkcd packages/core && yarn api-report:check
TS/JS lintyarn lint:lerna
Android lintyarn lint:android
Kotlin lintyarn lint:kotlin
ObjC/C++ lintyarn lint:clang
Swift lintyarn lint:swift

Boundaries

✅ Always

  • Run yarn lint, yarn test, and yarn circularDepCheck before calling a change done; regenerate the API report (yarn api-report) when the public surface moved.
  • Make a change work on both architectures (New + Old) and both platforms (iOS + Android) — a fix that only covers one is not done.
  • Gate any user data placed in events/breadcrumbs/spans/logs on options.sendDefaultPii.
  • Catch native errors at the bridge boundary and degrade — reject/log, never let them propagate.

⚠️ Ask first

  • Adding or changing any dependency, .vscode extension, GitHub Action, or native dependency — verify provenance first (load code-guidelines → Adding dependencies).
  • Changing the public API (packages/core/src/js/index.ts barrel, exported options) or a codegen/bridge spec (NativeRNSentry.ts, *NativeComponent.ts) — these are breaking and need a deprecation path.
  • Changing CI workflows, release config, or anything under scripts/.

🚫 Never

  • Crash the host app — a native exception that reaches the app is the highest-severity failure this SDK can cause.
  • Break the public API or bridge ABI without a @deprecated migration path (an app can ship new JS against an older cached native binary).
  • Hand-edit generated files: packages/core/etc/sentry-react-native.api.md (regenerate it) or New-Architecture codegen output — regenerate, never edit by hand.
  • Add CHANGELOG.md noise for routine internal/CI/test/chore changes — the user-facing sections (### Features, ### Fixes) are for user-visible changes. A genuinely notable internal change goes under the ### Internal section instead, not among the user-facing entries.
  • Commit secrets, tokens, or DSNs.

Commit Conventions

Follow conventional commit format: <type>(<scope>): <subject>

Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore

Scopes: android, ios, core, tracing, replay, profiling, e2e

Examples:

feat(replay): Add mobile replay masking support
fix(android): Fix crash on startup with Hermes

Pull Requests

When asked to open a PR:

  • Ask if it should be a draft PR (default: draft).
  • Use the repo's PR template (.github/pull_request_template.md) for the body. Fill in the sections:
    • Type of change — check the applicable boxes (Bugfix, New feature, Enhancement, Refactoring).
    • Description — describe the changes in detail.
    • Motivation and Context — why the change is needed, link related issues.
    • How did you test it? — list tests added/run.
    • Checklist — check the applicable boxes.
    • Next steps — note any follow-up work, or leave empty.

Pre-Commit Checklist

  • Code compiles without errors (yarn build)
  • All tests pass (yarn test)
  • Linting passes (yarn lint)
  • No circular dependencies (yarn circularDepCheck)
  • API report up to date (yarn api-report after yarn build:sdk)
  • Native code formatted correctly
  • TypeScript types are correct
  • Tests added/updated for changes

CI Overview

Workflows in .github/workflows/:

WorkflowPurpose
buildandtest.ymlTS compilation, Jest tests, linting, circular dep check, API report, TS 3.8 compat
native-tests.ymliOS/Android native tests across RN versions
e2e-v2.ymlE2E tests with Maestro on Sauce Labs
sample-application.ymlSample RN app builds (iOS, Android, old/new arch)
sample-application-expo.ymlSample Expo app builds

Ready-to-merge gate: Expensive tests (native, E2E, sample builds) only run when the PR has the ready-to-merge label. Basic tests run on every commit.

Concurrency: PR workflows cancel previous runs on new pushes. Main branch workflows never cancel.

Cross-Platform Dependencies

Changes may impact downstream SDKs. Coordinate with other teams when modifying native bridge APIs.

  • Sentry Cocoa → iOS native SDK
  • Sentry Java/Android → Android native SDK
  • Flutter, .NET (MAUI), Unity → depend on native SDKs

Documentation

  • JSDoc comments for public APIs
  • Inline comments for complex logic only
  • Update CHANGELOG.md for user-visible changes

Skills — load on demand

The deep, task-specific guidance lives in .agents/skills/ (registered in agents.toml) and is loaded when you need it — this file is the always-on operating manual, the skills are the specialists. Reach for one before doing the matching work:

SkillLoad it when
specThe what isn't pinned down yet — a fuzzy issue or idea to scope into acceptance criteria. Hands off to design-first.
design-firstStarting a feature/integration, changing the public barrel, crossing the bridge, or changing a codegen spec — shape modules and seams before coding.
code-guidelinesImplementing, refactoring, designing APIs, writing integrations, handling breaking changes, or adding dependencies.
test-guidelinesWriting, modifying, or reviewing Jest tests, fixtures, and mocks.
reviewA three-axis (Standards / Spec / Correctness) pass on a branch or PR before opening or merging.
diagnosing-bugsA hard bug, flaky test, CI hang, native crash, or perf regression — builds a red-capable loop before hypothesizing.

Warden's automated PR review and agents.toml also pull remote specialists (security-review, gha-security-review, span-convention-review, and more) — invoke those for depth beyond the local pass.

Nested AGENTS.md Files

  • packages/core/AGENTS.md — TypeScript/JavaScript code style, testing, patterns
  • packages/core/android/AGENTS.md — Java/Kotlin conventions
  • packages/core/ios/AGENTS.md — Objective-C/Swift conventions
  • samples/react-native/AGENTS.md — Running & troubleshooting the RN sample
  • samples/expo/AGENTS.md — Running the Expo sample

Troubleshooting

Build Failures:

  • Clear and reinstall: rm -rf node_modules && yarn install
  • Clean build: yarn clean && yarn build

Test Failures:

  • Clear Jest cache: jest --clearCache
  • Ensure build is up to date: yarn build

Linting Failures:

  • Auto-fix: yarn fix

Maintenance

When discovering new patterns, add them to the nearest nested AGENTS.md file. Keep examples concise but complete. Remove outdated information during reviews.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.