Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/sunra-ai/sunra-clientsnpx agentmods add rules/sunra-ai/sunra-clients/javascript-sdkWrote 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/sunra-ai/sunra-clients/javascript-sdk)<a href="https://agentmods.dev/rules/sunra-ai/sunra-clients/javascript-sdk"><img src="https://agentmods.dev/badge/rules/sunra-ai/sunra-clients/javascript-sdk.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.1 | $0.00051 | $0.06541 |
| Opus 5 | $0.00026 | $0.03270 |
| Sonnet 5 | $0.00010 | $0.01308 |
| Haiku 4.5 | $0.00005 | $0.00654 |
Grade A, and why
javascript-sdk scanned grade A with 1 finding 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
this.axiosInstance = axios.create({ How it starts
The opening of the file, as written. The whole thing — 1,002 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sunra Clients - JavaScript/TypeScript SDK Developer Role Document
Overview
This document defines the role and responsibilities of a JavaScript/TypeScript SDK Developer for the Sunra Clients project. The JavaScript SDK provides a comprehensive TypeScript-first client library for interacting with Sunra.ai services, supporting both Node.js and browser environments.
Project Structure
The JavaScript SDK is organized as follows:
- src/: Main source directory
- client.ts: Main client implementation
- config.ts: Configuration management
- queue.ts: Queue operations
- request.ts: HTTP request handling
- storage.ts: File storage operations
- types.ts: TypeScript type definitions
- utils.ts: Utility functions
- index.ts: Public API exports
Development Guidelines
1. Code Style and Standards
TypeScript Style Guide
- Use strict TypeScript configuration
- Use 2 spaces for indentation (as per user preference)
- Maximum line length: 120 characters
- Use camelCase for functions and variables:
submitRequest,getStatus - Use PascalCase for classes and interfaces:
SunraClient,QueueClient - Use UPPER_SNAKE_CASE for constants:
DEFAULT_TIMEOUT,MAX_RETRIES
Type Safety
- Prefer explicit types over
any - Use union types and literal types for better type safety
- Implement generic types for reusable components
- Use type guards for runtime type checking
Import/Export Patterns
// Use ES6 imports
import { SunraClient } from './client'
import type { QueueStatus, SubscribeOptions } from './types'
// Prefer named exports
export { SunraClient }
export type { QueueStatus, SubscribeOptions }
// Use barrel exports in index.ts
export * from './client'
export * from './types'
2. Architecture Patterns
Client Architecture
export interface SunraClientConfig {
credentials?: string
proxyUrl?: string
apiEndpoint?: string
queueDomain?: string
timeout?: number
}
export class SunraClient {
private readonly config: Required<SunraClientConfig>
private readonly httpClient: HttpClient
public readonly queue: QueueClient
public readonly storage: StorageClient
constructor(config: SunraClientConfig = {}) {
this.config = {
credentials: config.credentials ?? process.env.SUNRA_KEY ?? '',
proxyUrl: config.proxyUrl ?? '',
apiEndpoint: config.apiEndpoint ?? process.env.SUNRA_API_ENDPOINT ?? '',
queueDomain: config.queueDomain ?? process.env.SUNRA_QUEUE_DOMAIN ?? '',
timeout: config.timeout ?? 300000,
}
this.httpClient = new HttpClient(this.config)
this.queue = new QueueClient(this.httpClient)
this.storage = new StorageClient(this.httpClient)
}
}
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.
- 2d ago First seen · 1,002 lines · 51 tokens per session scan A 458a9234d078
javascript-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 51 tokens to every session and 6,541 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other cursor rules, from other repositories
drizzle-patterns
Drizzle ORM patterns and database conventions.
python--typescript-guide-cursorrules-prompt-file
Cursor rules for Python development with TypeScript guide integration.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
nestjs
This guide provides opinionated, actionable best practices for building robust, scalable, and maintainable NestJS applications using TypeScript, emphasizing modern patterns and common pitfalls.
standard-nestjs-module-hierarchy
Establish a consistent NestJS module structure in the API application where each resource is encapsulated in its own module with proper hierarchical organization to enhance maintainability, scalabilit... .
nestjs-best-practices
../../.claude/rules/nestjs-best-practices.md.