java-sdk

java-sdk is a cursor rule for Cursor from sunra-ai/sunra-clients. It costs 2,517 tokens per session, scanned A, original, Apache-2.0.

A project rule for developing Sunra Clients’ Java SDK, including its synchronous, asynchronous, and Kotlin-compatible client modules. It defines the project structure and coding conventions for those libraries.

In plain words
What is it for?
Use it when changing the Java, asynchronous Java, or Kotlin-compatible client modules and when adding or reviewing SDK code.
Why use it?
It gives contributors shared expectations for naming, formatting, module boundaries, and client design. That helps keep related SDK implementations consistent.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when changing the Java, asynchronous Java, or Kotlin-compatible client modules…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sunra-ai/sunra-clients/java-sdk
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/sunra-ai/sunra-clients

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 java-sdk

README.md
[![agentmods](https://agentmods.dev/badge/rules/sunra-ai/sunra-clients/java-sdk.svg)](https://agentmods.dev/rules/sunra-ai/sunra-clients/java-sdk)
Your own site
<a href="https://agentmods.dev/rules/sunra-ai/sunra-clients/java-sdk"><img src="https://agentmods.dev/badge/rules/sunra-ai/sunra-clients/java-sdk.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,517 This file is loaded in full into every session.
When invoked 2,517 The same file — it is already loaded in full.
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.02517 $0.02517
Opus 5 $0.01259 $0.01259
Sonnet 5 $0.00503 $0.00503
Haiku 4.5 $0.00252 $0.00252

Measured yesterday against content hash 3ac0be677542, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

java-sdk 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 yesterday.

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/roles/java-sdk.mdc · 374 lines

How it starts

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


description: This document defines the role and responsibilities of a Java SDK Developer for the Sunra Clients project. The Java SDK provides synchronous, asynchronous, and Kotlin-compatible client libraries for interacting with Sunra.ai services. globs: alwaysApply: false

Sunra Clients - Java SDK Developer Role Document

Overview

This document defines the role and responsibilities of a Java SDK Developer for the Sunra Clients project. The Java SDK provides synchronous, asynchronous, and Kotlin-compatible client libraries for interacting with Sunra.ai services.

Project Structure

The Java SDK consists of three main modules:

  • client/: Main synchronous Java client
  • client-async/: Asynchronous Java client implementation
  • client-kotlin/: Kotlin-specific client with coroutines support

Development Guidelines

1. Code Style and Standards

Java Style Guide
  • Follow Google Java Style Guide conventions
  • Use 2 spaces for indentation (as per user preference)
  • Maximum line length: 120 characters
  • Use PascalCase for class names: SunraClient, QueueClient
  • Use camelCase for method names: submitRequest, getStatus
  • Use UPPER_SNAKE_CASE for constants: DEFAULT_TIMEOUT, MAX_RETRIES
Kotlin Style Guide
  • Follow Kotlin Coding Conventions
  • Use 2 spaces for indentation
  • Prefer data classes for DTOs and configuration objects
  • Use nullable types appropriately: String? instead of Optional<String>
  • Leverage coroutines for asynchronous operations

2. Architecture Patterns

Client Architecture
// Synchronous client pattern
public class SunraClient {
  private final HttpClient httpClient;
  private final CredentialsResolver credentialsResolver;
  private final QueueClient queueClient;

  public static SunraClient withEnvCredentials() {
    return new SunraClientImpl(CredentialsResolver.fromEnvironment());
  }
}

// Asynchronous client pattern
public class AsyncSunraClient {
  public CompletableFuture<Output> subscribe(String endpointId, SubscribeOptions options) {
    return CompletableFuture.supplyAsync(() -> {
      // Implementation
    });
  }
}

Read the full file on GitHub · 374 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. yesterday First seen · 374 lines · 2,517 tokens per session scan A 3ac0be677542

Subscribe to this mod's changes

java-sdk is a cursor rule published in the GitHub repository sunra-ai/sunra-clients (7 stars, last pushed 8d ago), licensed Apache-2.0. It adds 2,517 tokens to every session, about $0.0126 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-04.