general-rule

general-rule is a cursor rule for Cursor from googlicius/obsidian-steward. It costs 15 tokens per session (245 once invoked), scanned A, original, MIT.

A set of general project rules for writing and changing code. It specifies patterns for control flow, function arguments, localization, constructors, event registration, and code quality.

In plain words
What is it for?
Use it whenever creating files, functions, or updates in the project, especially TypeScript code and user-facing text.
Why use it?
It keeps new code consistent with the project's conventions and prevents hard-coded text or incorrect event setup.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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.

agentmods
npx agentmods add rules/googlicius/obsidian-steward/general-rule
Clone the repo
git clone --depth 1 https://github.com/googlicius/obsidian-steward

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 general-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/googlicius/obsidian-steward/general-rule.svg)](https://agentmods.dev/rules/googlicius/obsidian-steward/general-rule)
Your own site
<a href="https://agentmods.dev/rules/googlicius/obsidian-steward/general-rule"><img src="https://agentmods.dev/badge/rules/googlicius/obsidian-steward/general-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00015 $0.00245
Opus 5 $0.00008 $0.00122
Sonnet 5 $0.00003 $0.00049
Haiku 4.5 $0.00002 $0.00024

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

Security

Grade A, and why

general-rule 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.

.cursor/rules/general-rule.mdc · 17 lines

What it actually says

  • Adopt the return early approach.
  • If a function has more than 4 arguments, make it a single argument as an object.
  • Use 'for' loops instead of 'forEach' for iterating arrays.
  • Use dot notation instead of destructuring for accessing object's fields.
  • If you generate hard-coded text or strings, you MUST define all languages for them in the src/i18n/locales folder, (Except those are system prompts, logging, or errors) and use them via the t method.
  • Avoid casting variables as any
  • When defining properties for a class, define them directly in the constructor's parameters if feasible, for example: constructor(private plugin: Plugin).
  • Always put a vault.on('create') in the onLayoutReady callback, otherwise it triggers when opening the app: src/services/SkillService/SkillService.ts:51-61
  • Always write readable, maintainable, and reusable code.
  • When finishing generation, no need to run build or test. Leave it for me to review.
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. 6d ago First seen · 17 lines · 15 tokens per session scan A 3e41ccd1528b

Subscribe to this mod's changes

general-rule is a cursor rule published in the GitHub repository googlicius/obsidian-steward (86 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 245 once invoked, about $0.0001 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.