agentleFS
ariaraminariaramin/flutter-skills/skills/flutter-sentry-engineering/SKILL.md

flutter-sentry-engineering

Skill8 starsChanged 48 days agoMITView on GitHub

Design, implement, review, debug, secure, test, migrate, and tune production Sentry observability in Flutter and Dart applications. Use when a task involves sentry_flutter, crash or handled-exception reporting, missing or duplicate Sentry events, scopes, users, tags, breadcrumbs, filtering, tracing, distributed tracing, HTTP or Dio instrumentation, profiling, app-start or frame measurements, Android ANRs, Apple app hangs, Session Replay, screenshots, attachments, structured Sentry Logs, releases, dist, dSYM or ProGuard/R8 uploads, Flutter obfuscation, Web source maps, symbolication, privacy, offline delivery, isolates, or Sentry CI/CD. Do not use for product analytics, audit logging, generic application logging without Sentry, or backend-only Sentry integrations.

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. About 0 are common, 26 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈26

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat Sentry as production observability infrastructure.

    line 8
  2. Distinctive:

    Do not add duplicate global handlers already installed by Sentry Flutter.

    line 35
  3. Distinctive:

    Keep telemetry failure from changing core product behavior.

    line 40
  4. Very specific:

    Keep sendDefaultPii disabled unless a deliberate privacy decision enables it.

    line 41
  5. Distinctive:

    Never send credentials, tokens, cookies, payment secrets, API keys, or sensitive private content.

    line 43
  6. Very specific:

    Keep beforeSend, beforeBreadcrumb, and event processors cheap and deterministic.

    line 45
  7. Distinctive:

    Use low-cardinality transaction names and spans only around meaningful work.

    line 47
  8. Distinctive:

    Do not default production tracing, profiling, or Replay to 100 percent.

    line 51
  9. Very specific:

    Keep runtime release and dist aligned with the artifacts uploaded for the exact deployed binary.

    line 52
  10. Distinctive:

    Treat unsymbolicated production failures as a broken release pipeline.

    line 54
  11. Distinctive:

    Do not flush or close after each event.

    line 57
  12. Distinctive:

    Do not mutate shared scope from Flutter rebuild paths.

    line 58
  13. Distinctive:

    Do not build new functionality on retired Sentry Metrics.

    line 59
  14. Distinctive:

    When asked to add Sentry, implement in this order:

    line 63
  15. Distinctive:

    Add optional features only when they answer a named debugging question:

    line 73
  16. Distinctive:

    Add tracing for latency breakdowns.

    line 75
  17. Distinctive:

    Add distributed tracing for cross-service latency.

    line 76
  18. Distinctive:

    Add profiling only on supported platforms and sampled traces.

    line 77
  19. Distinctive:

    Add navigator instrumentation for route performance.

    line 78
  20. Distinctive:

    Add Replay or screenshots for visual reproduction after privacy review.

    line 79
  21. Distinctive:

    Add ANR or app-hang tracking for responsiveness diagnostics.

    line 80
  22. Distinctive:

    Add structured Sentry Logs only for bounded operational messages.

    line 81
  23. Very specific:

    Read only the relevant sections of references/production-guide.md.

    line 88
  24. Distinctive:

    Use these search headings:

    line 96
  25. Distinctive:

    Put reusable privacy and filtering policy in the existing global hook rather than scattering guards across call sites.

    line 120
  26. Distinctive:

    Keep feature-specific context temporary.

    line 122
  27. Distinctive:

    Keep application-facing reporting behind the repository's existing observability abstraction when one exists.

    line 124
  28. Distinctive:

    Keep navigation, business rules, and user-facing recovery outside telemetry callbacks.

    line 128
  29. Distinctive:

    Run the narrowest relevant checks, then verify behavior in release-like builds.

    line 133
  30. Distinctive:

    Never claim production observability is ready from a debug-only Dart exception test.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

Flutter Sentry Engineering

Treat Sentry as production observability infrastructure. Optimize for actionable, symbolicated failures with deliberate privacy, cost, and runtime budgets.

Start with evidence

Before changing code:

  1. Inspect pubspec.yaml, pubspec.lock, Flutter/Dart constraints, and target platforms.
  2. Identify the locked sentry_flutter, sentry, sentry_dart_plugin, HTTP, Dio, routing, and state-management versions.
  3. Find every Sentry initialization, capture call, scope mutation, navigator observer, transaction/span, filtering hook, and shutdown/flush call.
  4. Inspect native Android, Apple, desktop, and Web build configuration relevant to the requested platforms.
  5. Inspect release, dist, obfuscation, source-map, and debug-symbol CI steps.
  6. Separate current repository behavior from version-sensitive guidance.

The bundled guide was validated against stable sentry_flutter 9.26.0 on 2026-08-11. When the installed version differs, use its API and changelog as the source of truth. Revalidate major-version changes before reusing tracing, profiling, Replay, scope, build-tooling, or native-integration guidance.

Preserve these invariants

  • Initialize once and early with SentryFlutter.init(..., appRunner: ...) for the normal Flutter path.
  • Do not add duplicate global handlers already installed by Sentry Flutter.
  • Assign one owner to automatic versus manual capture; avoid capture-and-rethrow duplicates.
  • Report unexpected actionable failures, not validation outcomes or ordinary control flow.
  • Keep telemetry failure from changing core product behavior.
  • Keep sendDefaultPii disabled unless a deliberate privacy decision enables it.
  • Never send credentials, tokens, cookies, payment secrets, API keys, or sensitive private content.
  • Keep beforeSend, beforeBreadcrumb, and event processors cheap and deterministic.
  • Use low-cardinality transaction names and spans only around meaningful work.
  • Restrict trace propagation to trusted participants.
  • Budget errors, traces, profiles, Replay, attachments, screenshots, and Logs independently.
  • Do not default production tracing, profiling, or Replay to 100 percent.
  • Keep runtime release and dist aligned with the artifacts uploaded for the exact deployed binary.
  • Treat unsymbolicated production failures as a broken release pipeline.
  • Reuse Sentry's transport, caching, and backpressure; do not add a second telemetry queue.
  • Do not flush or close after each event.
  • Do not mutate shared scope from Flutter rebuild paths.
  • Do not build new functionality on retired Sentry Metrics.

Choose the smallest complete capability set

When asked to add Sentry, implement in this order:

  1. correct early initialization;
  2. automatic Dart, Flutter, and supported native crash capture;
  3. correct environment, release, and dist metadata;
  4. matching symbol/debug-artifact upload;
  5. privacy-safe user and diagnostic context;
  6. noise filtering and duplicate ownership;
  7. release-like verification.

Add optional features only when they answer a named debugging question:

  • Add tracing for latency breakdowns.
  • Add distributed tracing for cross-service latency.
  • Add profiling only on supported platforms and sampled traces.
  • Add navigator instrumentation for route performance.
  • Add Replay or screenshots for visual reproduction after privacy review.
  • Add ANR or app-hang tracking for responsiveness diagnostics.
  • Add structured Sentry Logs only for bounded operational messages.

For each optional feature, evaluate platform support, runtime cost, payload and quota cost, sensitive-data exposure, and a concrete verification method.

Route to the production guide

Read only the relevant sections of references/production-guide.md. Because the guide is comprehensive, locate sections before reading them with:

rg -n '^#{1,3} (SECTION|RELATED SECTION)$' references/production-guide.md

Use these search headings:

TaskSearch headings
Install, configure credentials, environments, initialize`InstallationDSN and CredentialsEnvironment StrategyRelease and DistInitialization`
Diagnose missing, silent, duplicate, fatal, handled, isolate, or background errors`Automatic Error CaptureSilent Flutter ErrorsSpawned IsolatesBackground IsolatesManual Exception CaptureFatal vs Non-FatalDeduplication`
Filter noise and manage grouping`Noise Reduction StrategyException-Type FiltersignoreErrorsbeforeSendEvent ProcessorsError Grouping and Fingerprinting`
Add users, tags, contexts, extras, or breadcrumbs without scope leaks`Scope and ContextPrevent Scope LeakageUser ContextAccount SwitchingAnonymous UsersTagsExtrasBreadcrumbs`
Instrument navigation`Navigation InstrumentationRoute NamesSentryNavigatorObserverNavigator 2.0Nested NavigatorsTabsModals`
Add tracing, sampling, spans, or distributed traces`Performance MonitoringEnable TracingSampling StrategytracesSamplerStatic Tracing LifecycleChild SpansSpan Streaming LifecycleTransaction NamingDistributed TracingTrace Propagation Targets`
Instrument package:http or Dio`HTTP Instrumentationpackage:httpDioHTTP Failure CaptureAvoid Duplicate HTTP ErrorsHTTP Privacy`
Add profiling, startup, TTID/TTFD, frame, ANR, or hang diagnostics`ProfilingApp StartStandalone App-Start TracingTTID and TTFDSlow and Frozen FramesAndroid ANRsApple App Hangs`
Configure native crashes, releases, symbols, obfuscation, or Web source maps`Native Crash CaptureReleases and SymbolicationSentry Dart PluginAndroid SymbolicationApple SymbolicationFlutter Web Source MapsDart Symbol Mapping FileRelease Pipeline`
Handle sessions, offline delivery, flush, screenshots, attachments, Replay, or Logs`Release Health and SessionsOffline BehaviorFlush and CloseScreenshotsView HierarchyAttachmentsSession ReplayStructured Sentry Logs`
Audit privacy, performance, reliability, or architecture`Privacy and SecurityPerformance RulesReliability RulesApplication ArchitectureState Management Integration`
Test, debug, review, migrate, or prepare production`Testing StrategyVerification MatrixDebugging GuideCommon Anti-PatternsImplementation ChecklistCode Review ChecklistProduction Readiness ChecklistVersion-Sensitive Areas`

For a full Sentry architecture or production-readiness audit, read the entire guide after completing the repository inventory.

Implement at the shared ownership boundary

  • Fix initialization defects in the single initialization path.
  • Fix duplicate capture where automatic and manual ownership overlap.
  • Put reusable privacy and filtering policy in the existing global hook rather than scattering guards across call sites.
  • Keep feature-specific context temporary; use an event scope when global scope would leak between users, requests, or concurrent work.
  • Keep application-facing reporting behind the repository's existing observability abstraction when one exists. Do not introduce an interface or wrapper solely for Sentry unless it removes actual coupling or makes critical behavior testable.
  • Keep navigation, business rules, and user-facing recovery outside telemetry callbacks.

Validate the result

Run the narrowest relevant checks, then verify behavior in release-like builds. Cover the changed paths from this matrix:

  • handled Dart exception;
  • uncaught async/root exception;
  • Flutter framework exception outside known framework limitations;
  • native crash on each supported native target;
  • correct environment, release, and dist in Sentry;
  • symbolicated Dart and native stacks from the deployed artifact;
  • filtering, deduplication, redaction, and scope behavior;
  • tracing propagation only to intended targets;
  • offline recovery without an application-owned queue;
  • isolate/background capture when changed;
  • optional feature sampling and platform behavior when enabled.

Never claim production observability is ready from a debug-only Dart exception test. Report untested platform and release-pipeline paths explicitly.

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.