new_module

new_module is a cursor rule for Cursor from getsentry/sentry-java. It costs 7 tokens per session (1,213 once invoked), scanned A, original, MIT.

A contribution guide for adding a new module to the sentry-java code repository. It explains which project files, build settings, names, and release details must be updated.

In plain words
What is it for?
Use it when creating a Java or Android integration module, updating Gradle configuration, registering the module, or preparing its SDK metadata.
Why use it?
It reduces the chance that a new module is added incompletely or cannot be built and released with the rest of the repository.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating a Java or Android integration module, updating Gradle configuration, registering the module, or preparing its SDK metadata.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/getsentry/sentry-java/new_module
About the project

getsentry/sentry-java is a Java and Android software development kit for sending application errors, events, and diagnostic information to Sentry. It is used by developers working with Java, Android, Kotlin, and other JVM-based applications to monitor software behavior. The catalogue rules, skills, instructions, and setting support workflows around this SDK.

getsentry/sentry-java · 1,357 stars · on GitHub · docs.sentry.io

Install

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.

Clone the repo
git clone --depth 1 https://github.com/getsentry/sentry-java

Made for: Cursor.

Wrote 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.

agentmods badge for new_module

README.md
[![agentmods](https://agentmods.dev/badge/rules/getsentry/sentry-java/new_module/github.svg)](https://agentmods.dev/rules/getsentry/sentry-java/new_module)
Your own site
<a href="https://agentmods.dev/rules/getsentry/sentry-java/new_module"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/new_module/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new_module

Your own site · 80×15
<a href="https://agentmods.dev/rules/getsentry/sentry-java/new_module"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/new_module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00007 $0.01213
Opus 5.5 $0.00003 $0.00485
Sonnet 5.5 $0.00001 $0.00243
Haiku 4.5 $0.00001 $0.00121

Measured 13d ago against content hash ca161857c67e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

new_module 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 13d ago.

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.

.cursor/rules/new_module.mdc · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Module Addition Rules for sentry-java

Overview

This document outlines the complete process for adding a new module to the sentry-java repository. Follow these steps in order to ensure proper integration and release management.

Publishing Gate

Nothing below is enforced by the build, so a module can look finished, pass CI, and still break the release that first ships it. All of the following have to be merged before that release:

  • The module is in the include list in settings.gradle.kts (step 1.2)
  • Android (AAR) modules are in Config.BuildScript.androidLibs (step 1.4)
  • The module has a row in the packages table in the main README.md (step 3)
  • The module is in the integrations dropdown of the matching issue template (step 4)
  • The docs page exists on docs.sentry.io (step 5), because .craft.yml has to point at a live URL
  • The module has a full entry in the registry target of .craft.yml (step 6) — this one fails the release itself, not just the module

Step-by-Step Process

1. Create the Module Structure

  1. Create the new module, conforming to the existing naming conventions and build scripts. Copy the build.gradle.kts of the closest existing integration rather than writing one from scratch — sentry-kafka is a good JVM template, sentry-android-timber a good Android one.

  2. Add the module to the include list in settings.gradle.kts

If adding a sentry-samples module, also add it to the ignoredProjects list in the root build.gradle.kts:

ignoredProjects.addAll(
    listOf(
        // ... existing projects ...
        "sentry-samples-{module-name}"
    )
)
  1. Add a SENTRY_{MODULE}_SDK_NAME constant to the Config.Sentry block in buildSrc/src/main/java/Config.kt:
val SENTRY_FOO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.foo"

The module's build.gradle.kts consumes it in both buildConfig and the jar manifest (Sentry-SDK-Name / Sentry-SDK-Package-Name) — see sentry-kafka/build.gradle.kts.

Read the full file on GitHub · 116 lines

Changes

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.

  1. 13d ago Changed · -2 lines ca161857c67e
  2. 1mo ago First seen · 118 lines · 7 tokens per session scan A 586a6ef55c05

Subscribe to this mod's changes

new_module is a cursor rule published in the GitHub repository getsentry/sentry-java (1,357 stars, last pushed today), licensed MIT. It adds 7 tokens to every session and 1,213 once invoked, about $0.0000 per session on Opus 5.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.