Official agent skill

Code Guidelines

by getsentry in getsentry/sentry-dart

Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review.

OfficialMITAuto-check passedDevelopment

Install Code Guidelines

skills CLI
$ npx skills add getsentry/sentry-dart --skill code-guidelines -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install getsentry/sentry-dart code-guidelines --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/getsentry/sentry-dart.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-guidelines .claude/skills/code-guidelines && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-guidelines
GitHub stars
873
Token cost
~2.2k tokens
SKILL.md length
1,051 words
Files
2 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review.

  • Implementing features
  • SKILL.md covers SDK Development Rules, Modern Dart, API & Dart Style and Documentation Comments
  • Calls dart
  • Adding new functionality

What it does

Code Guidelines is an agent skill from getsentry/sentry-dart, published by the product's own GitHub organization. Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review. Use when implementing features, adding new functionality, refactoring code, reviewing code, designing APIs, modifying public API surface, handling breaking changes, deprecating APIs, writing integrations, or making architecture decisions in any package in this Melos monorepo.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/effective-dart.md`).

It sits in Development, covering Cross-platform mobile apps, Monorepo tooling and Refactoring. It works with Sentry, Dart and Flutter. The repository describes itself as: Sentry SDK for Dart and Flutter. The licence is MIT.

When your agent uses it

  • Implementing features
  • Adding new functionality
  • Refactoring code
  • Modifying public API surface

Example prompts

  • “/code-guidelines”

What it can do on your machine

Read from SKILL.md and the folder at commit 96d6367. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dart

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Guidelines loads about 2.2k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 96 tokens; SKILL.md has 1,051 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from getsentry/sentry-dart at commit 96d6367, republished under its MIT licence (© getsentry). 1,051 words, ~2,241 tokens.

Download SKILL.mdSave it as .claude/skills/code-guidelines/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
code-guidelines
description
Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review. Use when implementing features, adding new functionality, refactoring code, reviewing code, designing APIs, modifying public API surface, handling breaking changes, deprecating APIs, writing integrations, or making architecture decisions in any package in this Melos monorepo.

Apply these guidelines to all new and modified code across every package in this monorepo. Existing code may not follow these conventions — do not refactor it unless asked.

Use only language features available in the Dart/Flutter versions specified in AGENTS.md.

For non-trivial work — a new feature or integration, a public barrel-file change, or a cross-package/native-interop change — load the design-first skill to shape the modules and seams before writing code. When writing or modifying tests as part of implementation, also load the test-guidelines skill.

SDK Development Rules

Integrations

Encapsulate SDK features as Integration classes that implement call() and close():

  • Check feature flags and prerequisites early, log and return if disabled
  • Mark the integration as active for usage tracking — see Usage Tracking below
  • Clean up resources in close() if needed
  • See packages/flutter/lib/src/integrations/ for examples
  • Integrations should be order-independent; if yours requires running before/after another, reconsider the design
Usage Tracking

Record which integrations and features an app actually uses, so usage can be tracked internally. This metadata lives on options.sdk and is serialized onto events as sdk.integrations / sdk.features.

  • options.sdk.addIntegration('IntegrationName') — mark an integration as active. Call it from the integration's call(). Do not confuse it with options.addIntegration(integration), which registers an integration to run — options.sdk.addIntegration only attaches the name as metadata.
  • options.sdk.addFeature(SentryFeatures.x) — mark a feature as used, gated on whether it is actually configured (e.g. a beforeSend* callback is set, a privacy option is enabled).
  • Use named constants from SentryFeatures (packages/dart/lib/src/constants.dart, @internal) — never inline string literals — so the analytics vocabulary stays consistent. Add a constant there when introducing a new feature.
  • Both calls dedupe, so calling them more than once is safe.
  • Canonical example: TrackBeforeSendUsageIntegration (packages/dart/lib/src/track_before_send_usage_integration.dart).
Logging

Use internalLogger for all diagnostic logging. options.log is deprecated — migrate any options.log calls you encounter to internalLogger.

Each package must have its own internalLogger instance. If one doesn't exist, create lib/src/internal_logger.dart:

dart
import 'package:meta/meta.dart';
import 'package:sentry/sentry.dart';

/// Logger for the Sentry <Package> SDK.
@internal
const internalLogger = SentryInternalLogger('sentry_<package>');

Log levels:

LevelUse for
debugRoutine lifecycle events, configuration confirmations, verbose tracing
infoNotable but expected events (parsing results, fallback paths taken)
warningRecoverable problems (rate limits hit, missing optional config, degraded functionality)
errorFailures that affect SDK behavior (transport errors, parsing failures)
fatalUnrecoverable errors requiring SDK shutdown

Lazy evaluation — use a closure when the message involves expensive computation:

dart
internalLogger.debug(() => 'Envelope size: ${envelope.computeSize()}');

Logs are debug-only — all logging is tree-shaken in release builds via RuntimeChecker.kDebugMode.

Privacy
  • Never collect Personally Identifiable Information (PII) without checking options.sendDefaultPii
  • Flag any changes that could leak PII for review
Breaking Changes
  • Signal breaking changes clearly (API removals, behavior changes, renamed options)
  • Prefer deprecation with migration path over immediate removal
Native Code (JNI/FFI)
  • Release all native memory (JNI local refs, malloc allocations)
  • Handle native exceptions gracefully—don't crash the host app
File Organization

Group by feature, not by type. A processor or integration a feature owns lives in that feature's dir (a replay processor in replay/); a cross-cutting one earns its own top-level concept dir (exception/, enricher/). Cohesive subsystems already do this — transport/, telemetry/span/, and native/ (the binding boundary to the platform SDKs; features call it rather than embed native code). Native interop is special for testing and memory, not for placement — see design-first and the Native Code (JNI/FFI) rules above.

Two shapes are scatter — grow neither, and don't read the repo's current use of them as the target:

  • Type-buckets (event_processor/, integrations/) collect classes for sharing a base type. A bucket legitimately holds only its runner (run_event_processors.dart); the base contract belongs at src/ root (event_processor.dart, beside integration.dart). The repo hasn't finished migrating — enrichment, exceptions, and dedup still sit under event_processor/, and flutter has loose replay_event_processor/screenshot_event_processor.
  • The loose src/ root. Core primitives (hub.dart, scope.dart, sentry_client.dart, the sentry.dart barrel) belong there; feature code does not. The v1 span/tracer files strewn across the root, protocol/, and tracing/ are the counter-example to telemetry/span/, which keeps the whole v2 subsystem in one dir.

Where a given piece goes is a locality judgment — see design-first (Shape the modules).

Show full SKILL.md (415 more words)Show less

Modern Dart

Prefer modern Dart (3.5+) where it improves clarity — sealed classes for exhaustive matching, records for multi-value returns, pattern matching and switch expressions, extension types for zero-cost wrappers, enhanced enums, and class modifiers (final / base / interface). Don't force them where plain code reads better.

API & Dart Style

Shape the public surface deliberately — see design-first for module shape. These habits matter more in an SDK than in app code, and several are easy to get wrong:

  • Private by default. Keep declarations private; widen to public only when a type is genuinely part of the SDK's API. Every public symbol is a maintenance burden and a breaking-change liability — see packages/dart/AGENTS.md on the barrel-file cascade.
  • Control extension with class modifiers. Use final / base / interface / sealed to declare whether a public class may be extended or implemented — without them every public class is implicitly both, and you can't evolve it without breaking consumers.
  • No public late final field without an initializer. It silently defines a public setter, leaking API surface — use a normal field or an explicit getter instead.
  • Prefer a function to a one-member abstract class, and avoid classes of only static members.
  • Keep imports inside lib. Never let an import cross the lib boundary (../lib/..., or into another package's src/) — relative imports that escape lib create duplicate library instances Dart treats as unrelated.
  • Re-raise with rethrow, never throw e. throw e resets the stack trace to the rethrow site; rethrow preserves the origin — and stack-trace fidelity is the product.

For everything else — naming, asynchrony, nullability, parameters, equality — follow Effective Dart; a frontier model and dart analyze already apply most of it, so it isn't restated here. The full checklist (and the standard the review skill cites) is in references/effective-dart.md.

Documentation Comments

Prefer self-documenting code — clear names and structure so comments become unnecessary.

Comment when:

  • Public APIs — document for users who can't see the implementation.
  • Non-obvious why — reasoning not clear from the code (workarounds, edge cases, constraints).

Don't comment when:

  • Obvious behavior — don't describe what the code plainly does.
  • Inline play-by-play — don't narrate every step of a method.

dart doc gotchas (tooling behavior, not taste):

  • Document a getter or its setter, never both — dart doc merges the pair and discards the setter's comment.
  • The first sentence becomes the summary in API listings — keep it standalone in its own paragraph.
  • Put doc comments before annotations (@override, @internal); placed after, dart doc won't associate them with the declaration.

Remaining doc-comment style (///, [bracket] references) is standard Effective Dart — see references/effective-dart.md.

© getsentry, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/code-guidelines of getsentry/sentry-dart.

  • SKILL.md
  • references/effective-dart.md

Open the folder on GitHubat commit 96d6367

Compare with similar skills

Code Guidelines next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Guidelines compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Guidelines this skillgetsentry/sentry-dart873—~2.2kAutomated safety check: PassMIT
Code Guidelinesgetsentry/sentry-react-native1.8k—~3.2kAutomated safety check: PassMIT
Flutter Pub ReleaseMixinNetwork/flutter-plugins512—~1.3kAutomated safety check: PassMIT
Squadron Workerd-markey/squadron138—~1.6kAutomated safety check: PassMIT
Layered ArchitectureVeryGoodOpenSource/vgv-ai-flutter-plugin169—~4.6kAutomated safety check: PassMIT
Update Dependenciessesori-ai/sesori_apps_monorepo126—~7.8kAutomated safety check: PassCustom licence

Similar skills

  • Code Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK code guidelines for implementation, refactoring, and review.

    1.8k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Flutter Pub Release

    MixinNetwork/flutter-plugins

    Prepare and draft a pub.dev release for a package in the flutter-plugins monorepo.

    512 GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Squadron Worker

    d-markey/squadron

    A skill your agent uses when building, writing, or refactoring Squadron workers, worker pools, worker services, or using squadronbuilder annotations (@SquadronService, @SquadronMethod) for…

    138 GitHub stars~1.6k tokensUpdated 15 days ago
    MobileAuto-check passed
  • Layered Architecture

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    VGV layered monorepo architecture in Flutter: four layers Data, Repository, Business Logic, and Presentation, unidirectional dependency rules, and model transformation across layers.

    169 GitHub stars~4.6k tokensUpdated yesterday
    MobileAuto-check passed
  • Update Dependencies

    sesori-ai/sesori_apps_monorepo

    Weekly dependency update workflow for Sesori Apps Monorepo. An agent skill from sesori-ai/sesori_apps_monorepo.

    126 GitHub stars~7.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    712 GitHub stars~3.8k tokensUpdated today
    MobileAuto-check passed

More from getsentry/sentry-dart

  • Test Guidelines

    getsentry/sentry-dart

    Official

    Enforce Sentry Dart/Flutter SDK test conventions for naming, structure, and fixtures.

    873 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Design First

    getsentry/sentry-dart

    Official

    Shape non-trivial work before writing it — decide the modules, the seams, and the public API surface up front.

    873 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Review

    getsentry/sentry-dart

    Official

    Three-axis review of the branch diff — Standards (this repo's documented standards + public API surface), Spec (the originating Linear issue / PR), and Correctness (runtime bugs + the SDK threat…

    873 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Diagnosing Bugs

    getsentry/sentry-dart

    Official

    A discipline for hard bugs, flaky tests, CI hangs, and performance regressions in this SDK.

    873 GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about Code Guidelines

What does Code Guidelines do?

Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review. Code Guidelines is an agent skill from getsentry/sentry-dart, published by the product's own GitHub organization. Enforce Sentry Dart/Flutter SDK code guidelines for implementation, refactoring, and review.

When should I use Code Guidelines?

Code Guidelines fits situations like: implementing features; adding new functionality; refactoring code; modifying public API surface.

How do I install Code Guidelines in Claude Code?

Run `npx skills add getsentry/sentry-dart --skill code-guidelines -a claude-code`. Or copy the skill folder (.agents/skills/code-guidelines in getsentry/sentry-dart) into .claude/skills/code-guidelines in your project. Claude Code loads it when a task matches its description.

How do I install Code Guidelines in Codex?

Run `npx skills add getsentry/sentry-dart --skill code-guidelines -a codex`. Or copy the skill folder (.agents/skills/code-guidelines in getsentry/sentry-dart) into .agents/skills/code-guidelines in your project. Codex loads it when a task matches its description.

Can I use Code Guidelines in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add getsentry/sentry-dart --skill code-guidelines -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-guidelines, .gemini/skills/code-guidelines, .github/skills/code-guidelines and .opencode/skills/code-guidelines in your project.

What does Code Guidelines need to run?

Going by SKILL.md and its folder, Code Guidelines needs the command-line tools its instructions call (dart).

Does Code Guidelines access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Guidelines safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Guidelines use?

Code Guidelines is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Guidelines use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Code Guidelines?

Skills that share tags, products or a category with Code Guidelines: Code Guidelines (getsentry/sentry-react-native, 1.8k stars), Flutter Pub Release (MixinNetwork/flutter-plugins, 512 stars), Squadron Worker (d-markey/squadron, 138 stars) and Layered Architecture (VeryGoodOpenSource/vgv-ai-flutter-plugin, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Guidelines?

getsentry (a GitHub organization, an official publisher) maintains it in getsentry/sentry-dart, which has 873 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: getsentry/sentry-dart on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.