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/srajangpt1/agent-rule-sync/frameworksgit clone --depth 1 https://github.com/Srajangpt1/agent-rule-syncWhat 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.00932 | $0.00932 |
| Opus 5 | $0.00466 | $0.00466 |
| Sonnet 5 | $0.00186 | $0.00186 |
| Haiku 4.5 | $0.00093 | $0.00093 |
Grade A, and why
frameworks 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **Node.js Patterns**: Use Node.js built-in modules (child_process, fs, path) following Node.js conventions. Use spawn from child_process for executing external commands. Use fs.readFileSync/fs.writeFileSync for synchro What it actually says
-
TypeScript Configuration: Use strict TypeScript mode (strict: true). Target ES2020. Use CommonJS modules for Node.js compatibility. Enable declaration files for type definitions. Always define explicit return types for exported functions.
- export async function generateRules(config: GenerateRulesConfig = {}): Promise
- interface AnalysisResult { success: boolean; data?: AnalysisData; error?: string; }
-
Node.js Patterns: Use Node.js built-in modules (child_process, fs, path) following Node.js conventions. Use spawn from child_process for executing external commands. Use fs.readFileSync/fs.writeFileSync for synchronous file operations when appropriate. Use path.join() for cross-platform path construction.
- import { spawn } from 'child_process'; const process = spawn('cursor-agent', ['--version']);
- import * as fs from 'fs'; import * as path from 'path'; const filePath = path.join(baseDir, '.cursor', 'rules');
-
Commander.js CLI Framework: Use commander for CLI interface. Define commands and options with descriptive names and help text. Use .action() for command handlers. Structure CLI with main command and subcommands. Use chalk for colored output in CLI. Include shebang (#!/usr/bin/env node) at top of CLI entry point.
- #!/usr/bin/env node const program = new Command(); program .name('agent-rule-sync') .description('...') .option('-v, --verbose', 'Enable verbose logging', false) .action(async (options) => { });
- program .command('check') .description('Check if cursor-agent is installed') .action(async () => { });
-
Chalk for Terminal Output: Use chalk for colored terminal output to improve user experience. Use semantic color choices: green for success, red for errors, yellow for warnings, cyan for info, gray for secondary info. Use chalk.bold for emphasis.
- console.log(chalk.green('Success!'));
- console.error(chalk.red('Error: ...'));
- console.log(chalk.bold.cyan('\nAgent Rule Sync\n'));
-
Promise-based Async Patterns: Use async/await consistently, not Promise chains. Wrap spawn operations in Promise constructors for better control. Always handle errors in async functions with try-catch blocks.
- export async function checkCursorAgent(): Promise { return new Promise((resolve) => { const process = spawn('cursor-agent', ['--version']); // ... resolve/reject logic }); }
- try { const result = await generateRules(config); } catch (error) { // handle error }
-
Type Definitions: Define all types and interfaces in types.ts. Use descriptive interface names. Make properties optional (?) for values that may be undefined. Use union types for literal values. Export all public types.
- export interface GenerateRulesConfig { outputDir?: string; verbose?: boolean; dryRun?: boolean; cwd?: string; }
- export interface CursorAgentCheck { installed: boolean; version?: string; error?: string; }
-
ESLint Configuration: Use TypeScript ESLint with strict type checking. Require explicit function return types (warn level). Disallow any type. Require await for promises. Allow console statements for CLI tools. Enforce const for variables that aren't reassigned. Use prefer-const and no-var rules. Configure unused variable ignore pattern with '^_' prefix.
- "@typescript-eslint/explicit-function-return-type": "warn"
- "@typescript-eslint/no-explicit-any": "error"
- "@typescript-eslint/no-floating-promises": "error"
- "@typescript-eslint/await-thenable": "error"
- "no-console": "off"
- "prefer-const": "error"
- "no-var": "error"
-
Index File Re-exports: Use index.ts as the main entry point to re-export public APIs from other modules. This provides a clean public API surface. Export types using export * from './types'.
- import { checkCursorAgent, analyzeCodebase } from './analyzer'; import { getRulesDirectory, writeRules } from './rules-manager'; export * from './types';
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 · 80 lines · 932 tokens per session scan A 3530a47cc119
frameworks is a cursor rule published in the GitHub repository Srajangpt1/agent-rule-sync (12 stars, last pushed 5mo ago), licensed MIT. It adds 932 tokens to every session, about $0.0047 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.