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/sruja-ai/sruja/extension-tsgit clone --depth 1 https://github.com/sruja-ai/srujaWrote 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/sruja-ai/sruja/extension-ts)<a href="https://agentmods.dev/rules/sruja-ai/sruja/extension-ts"><img src="https://agentmods.dev/badge/rules/sruja-ai/sruja/extension-ts.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.00401 | $0.00401 |
| Opus 5 | $0.00200 | $0.00200 |
| Sonnet 5 | $0.00080 | $0.00080 |
| Haiku 4.5 | $0.00040 | $0.00040 |
Grade A, and why
extension-ts 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 6d 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.
What it actually says
VS Code Extension Patterns
Patterns for the Sruja VS Code extension (TypeScript).
Scopes
extension/src/**/*.ts
Rules
- Use VS Code API: All editor interactions go through the
vscodenamespace. Never use Node.jsfsfor workspace operations — usevscode.workspace.fs. - Dispose resources: All disposables (providers, commands, channels) must be registered via
context.subscriptions.push()or the extension'sDisposablestore. - Async/await: All async operations use
async/await, not.then()chains. - Error handling: Wrap VS Code API calls in try/catch. Show user-facing errors with
vscode.window.showErrorMessage(). Log details to the OutputChannel. - WASM integration: Load WASM via
src/wasm.ts. Never import WASM modules directly — use the wrapper. - Type safety: Use strict TypeScript. No
anytypes. Useunknown+ type guards for untrusted data. - Null handling: Use
undefinedconsistently. Prefer??over||for nullish coalescing. Use?.for optional chaining. - Constants: Use UPPER_SNAKE_CASE for module-level constants. Use descriptive names.
Patterns
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext): void {
const channel = vscode.window.createOutputChannel('Sruja');
context.subscriptions.push(channel);
context.subscriptions.push(
vscode.commands.registerCommand('sruja.validate', async () => {
try {
// ...
} catch (err) {
vscode.window.showErrorMessage(`Sruja: ${err}`);
channel.appendLine(`Error: ${err}`);
}
})
);
}
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.
- 6d ago First seen · 40 lines · 401 tokens per session scan A 7c2412b36dd0
extension-ts is a cursor rule published in the GitHub repository sruja-ai/sruja (23 stars, last pushed 5d ago), licensed Apache-2.0. It adds 401 tokens to every session, about $0.0020 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-08-30.
Other cursor rules, from other repositories
api-design-typescript
API Design for TypeScript — Express, NestJS, Fastify patterns, middleware, validation, and error handling. Extends core/rules/api-design.mdc with TypeScript-specific guidance.
typescript
TypeScript best practices — strict configuration, advanced type patterns, type safety, generics, branded types, type guards, performance, testing, and common anti-patterns. Applied when working with TypeScript files.
_code-rules-TypeScript-summary
Apply when creating or editing TypeScript (.ts) files or shared TypeScript modules. Enforces typed, modular, readable code with strict formatting, naming, imports, configuration, validation, error handling, async patterns, and separation of concerns. This is a concise summary of…
typescript-security
TypeScript security guidelines — input validation with Zod, JWT handling, SQL injection prevention, secrets hygiene, and dependency scanning. Applied when working with TypeScript files.
typescript-testing
TypeScript testing guidelines — Vitest/Jest setup, unit testing patterns, mocking strategy, integration testing with Testcontainers, and coverage standards. Applied when working with TypeScript test files.
vue-typescript-patterns
Cursor rule "vue-typescript-patterns" from soaring-xiongkulu/easyaiot, covering vue3 + typescript 开发规范, vue 组件规范, vue sfc 组件规范, typescript 规范 and 状态管理.