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/drumnation/unsplash-smart-mcp-server/code-standards.rulesgit clone --depth 1 https://github.com/drumnation/unsplash-smart-mcp-serverWhat 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.01278 | $0.01278 |
| Opus 5 | $0.00639 | $0.00639 |
| Sonnet 5 | $0.00256 | $0.00256 |
| Haiku 4.5 | $0.00128 | $0.00128 |
Grade A, and why
code-standards.rules 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Core Principles:
- Readability and Maintainability: Prioritize code that is easy to understand and modify.
- Modularity: Break down large components into smaller, manageable modules.
- Testability: Ensure that code is easily testable.
- Performance: Optimize code for efficiency.
- Consistency: Adhere to established coding standards and patterns.
- Proactive Refactoring: Address code complexity and length early.
Cursor Ruleset (Node.js/TypeScript):
1. File Length and Refactoring:
- Rule: "Monitor all
.tsand.jsfiles. When a file exceeds 500 lines, initiate a refactoring process to break down the file into smaller, more focused modules or classes. Prioritize extracting logically related code blocks into separate files or functions." - Action:
- "Analyze the file to identify logical units of functionality."
- "Create new files or modules for these units, ensuring clear separation of concerns."
- "Update import/export statements to maintain functionality."
- "Ensure all extracted code is thoroughly tested."
- "Provide a summary of the refactoring steps taken and the rationale behind them."
2. Module Structure and Organization:
- Rule: "Organize code into logical modules based on functionality. Utilize the
src/directory for source code andtest/for tests. Create subdirectories withinsrc/to represent different features or components." - Action:
- "Ensure that related files are grouped together in subdirectories."
- "Use
index.tsfiles to aggregate exports from subdirectories, providing a clean API for other modules." - "Maintain a clear and consistent file naming convention."
3. Function and Class Design:
- Rule: "Functions and classes should have a single responsibility. Keep functions short and focused. Classes should encapsulate related data and behavior."
- Action:
- "Refactor long functions into smaller, more manageable functions."
- "Extract common logic into reusable functions or classes."
- "Adhere to the Single Responsibility Principle (SRP)."
- "Use descriptive names for functions and classes."
- "Use typescript interfaces to define the shape of objects."
4. Error Handling:
- Rule: "Implement robust error handling using
try...catchblocks and custom error classes. Log errors with sufficient context for debugging." - Action:
- "Wrap potentially error-prone code in
try...catchblocks." - "Create custom error classes for specific error scenarios."
- "Log errors with timestamps, file names, and line numbers."
- "Avoid throwing generic errors, provide useful error messages."
- "Wrap potentially error-prone code in
5. Asynchronous Operations:
- Rule: "Use
async/awaitfor asynchronous operations. Avoid callback hell. Implement proper error handling for asynchronous code." - Action:
- "Prefer
async/awaitover callbacks or promises." - "Use
try...catchblocks withinasyncfunctions to handle errors." - "Validate inputs and outputs of async functions."
- "Prefer
6. Testing:
- Rule: "Write comprehensive unit tests for all code. Use a testing framework like Jest or Mocha. Aim for 100% test coverage, especially for critical modules."
- Action:
- "Create test files in the
test/directory, mirroring thesrc/directory structure." - "Use mocking and stubbing to isolate units of code."
- "Write tests for edge cases and error scenarios."
- "Use code coverage tools to measure test effectiveness."
- "Create test files in the
7. Code Style and Linting:
- Rule: "Adhere to a consistent code style using ESLint and Prettier. Configure these tools to enforce coding standards and automatically format code."
- Action:
- "Install and configure ESLint and Prettier with appropriate rules."
- "Integrate linting and formatting into the development workflow (e.g., using Git hooks or CI/CD pipelines)."
- "Use a consistent indentation style, and consistent use of semicolons."
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.
- 3d ago First seen · 103 lines · 1,278 tokens per session scan A e89034f8e628
code-standards.rules is a cursor rule published in the GitHub repository drumnation/unsplash-smart-mcp-server (63 stars, last pushed 7mo ago), licensed MIT. It adds 1,278 tokens to every session, about $0.0064 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
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.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.