Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/getsentry/sentry-java/feature_flagsgit clone --depth 1 https://github.com/getsentry/sentry-javaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/getsentry/sentry-java/feature_flags)<a href="https://agentmods.dev/rules/getsentry/sentry-java/feature_flags"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/feature_flags.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00002 | $0.00528 |
| Opus 5 | $0.00001 | $0.00264 |
| Sonnet 5 | $0.00000 | $0.00106 |
| Haiku 4.5 | $0.00000 | $0.00053 |
Grade A, and why
feature_flags scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Java SDK Feature Flags
There is a scope based and a span based API for tracking feature flag evaluations.
Scope Based API
The addFeatureFlag method can be used to track feature flag evaluations. It exists on Sentry static API as well as IScopes and IScope.
When using static API, IScopes or COMBINED scope type, Sentry will also invoke addFeatureFlag on the current span. This does not happen, when directly invoking addFeatureFlag on IScope (except for COMBINED scope type).
The maxFeatureFlags option controls how many flags are tracked per scope and also how many are sent to Sentry as part of events.
Scope based feature flags can also be disabled by setting the value to 0. Defaults to 100 feature flag evaluations.
Order of feature flag evaluations is important as we only keep track of the last {maxFeatureFlag} items.
When a feature flag evaluation with the same name is added, the previous one is removed and the new one is stored so that it'll be dropped last.
Refer to FeatureFlagBuffer fore more details. FeatureFlagBuffer has been optimized for storing scope based feature flag evaluations, especially clone performance.
When sending out an error event, feature flag buffers from all three scope types (global, isolation and current scope) are merged, choosing the newest {maxFeatureFlag} entries across all scope types. Feature flags are sent as part of the flags context.
Span Based API
It's also possible to use the addFeatureFlag method on ISpan (and by extension ITransaction). Feature flag evaluations tracked this way
will not be added to the scope and thus won't be added to error events.
Each span has its own SpanFeatureFlagBuffer. When starting a child span, feature flag evaluations are NOT copied from the parent. Each span starts out with an empty buffer and has its own limit.
SpanFeatureFlagBuffer has been optimized for storing feature flag evaluations on spans.
Spans have a hard coded limit of 10 feature flag evaluations. When full, new entries are rejected. Updates to existing entries are still allowed even if full.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 45 lines · 2 tokens per session scan A 43c58780e146
feature_flags is a cursor rule published in the GitHub repository getsentry/sentry-java (1,349 stars, last pushed today), licensed MIT. It adds 2 tokens to every session and 528 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
android-viewmodel
Android ViewModel conventions — StateFlow, repository abstraction, coroutines, no LiveData.
swiftui-accessibility
SwiftUI accessibility rules for VoiceOver — labels, hints, traits, values, and attribute preservation.
security-threat-and-stability
Maximum security scrutiny on issues/PRs and stability-first code changes.
project-status
PriceGrab shipped state and product backlog (read first).
best-practices
Engineering best practices for this codebase.
android-gradle-build-logic
Shape Android build logic with Gradle, version catalogs, plugins, convention patterns, and toolchain compatibility.