coding-standards-demo.crux

coding-standards-demo.crux is a cursor rule for Cursor from zotoio/CRUX-Compress. It costs 6 tokens per session (937 once invoked), scanned A, original, MIT.

A set of team rules for writing readable, maintainable JavaScript, TypeScript, and Python code.

In plain words
What is it for?
Reviewing or writing code, choosing names and directory layouts, documenting public code, handling errors, limiting function complexity, and adding meaningful tests.
Why use it?
It gives the agent consistent guidance for naming, file structure, documentation, error handling, and tests, reducing style disagreements and avoidable maintenance work.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Reviewing or writing code, choosing names and directory layouts, documenting public code, handling errors, limiting function complexity, and adding meaningful tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/zotoio/crux-compress/coding-standards-demo.crux
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.

Clone the repo
git clone --depth 1 https://github.com/zotoio/CRUX-Compress

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 coding-standards-demo.crux

README.md
[![agentmods](https://agentmods.dev/badge/rules/zotoio/crux-compress/coding-standards-demo.crux/github.svg)](https://agentmods.dev/rules/zotoio/crux-compress/coding-standards-demo.crux)
Your own site
<a href="https://agentmods.dev/rules/zotoio/crux-compress/coding-standards-demo.crux"><img src="https://agentmods.dev/badge/rules/zotoio/crux-compress/coding-standards-demo.crux/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coding-standards-demo.crux

Your own site · 80×15
<a href="https://agentmods.dev/rules/zotoio/crux-compress/coding-standards-demo.crux"><img src="https://agentmods.dev/badge/rules/zotoio/crux-compress/coding-standards-demo.crux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00006 $0.00937
Opus 5 $0.00003 $0.00468
Sonnet 5 $0.00001 $0.00187
Haiku 4.5 $0.00001 $0.00094

Measured 9d ago against content hash 247ef70831ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

coding-standards-demo.crux 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 9d 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/example/coding-standards-demo.crux.mdc · 116 lines

What it actually says

[!IMPORTANT] Generated file - do not edit!

Team Coding Standards and Best Practices

⟦CRUX:coding-standards-demo.md
Ρ{team coding standards+best practices}
Κ{
  fn=function; cls=class; var=variable;
  JS=JavaScript; TS=TypeScript; Py=Python
}

R.philosophy{
  readable≻clever; code→humans first;
  ∀code→read many×>write 1×
}

R.boyscout{
  leave code≥found; touch file→cleanup minor;
  ¬scope-creep; big refactor→separate ticket
}

R.naming{
  vars+fns=descriptive+self-doc; ¬single-letter[except short loops];
  JS/TS{var+fn=camelCase; cls=PascalCase; const=SCREAMING_SNAKE};
  Py{var+fn=snake_case; cls=PascalCase};
  bool→prefix[is|has|can|should];
  files{JS/TS=kebab-case; Py=snake_case};
  dir=lowercase+hyphens; 1file→1responsibility
}

R.structure{
  fn.len≤20..30ln; 1fn→1thing;
  nesting≤3levels→use early return|extract fn;
  comments→"why"¬"what"
}

R.docs{
  ∀public[API|cls|fn]→doc comments;
  include=[desc,params+types,return,examples?,exceptions?]
}

R.errors{
  ¬swallow!→log|handle|rethrow;
  custom err types→precise handling+debug;
  err.msg∋[op failed,expected,actual,IDs,ctx]
}

R.test{
  ∀new code→tests; cov≥80%⊕meaningful;
  name="should [behavior] when [condition]";
  pattern=AAA[Arrange→Act→Assert];
  mock=[external APIs,DB,filesystem,time]; ¬mock=[unit tested,utils,data structs]
}

R.git{
  commit=conventional{type(scope):desc};
  types=[feat,fix,docs,style,refactor,test,chore];
  branch=[feature/,fix/,refactor/,docs/]+desc; +ticket#?;
  PR{title clear,desc what+why,ref issues,small+complete,tests,CI pass}
}

R.security{
  ¬commit[API keys,secrets,passwords,creds,private keys,PII]!;
  use env vars+secret mgmt;
  ∀input→validate[type,format,range]+sanitize;
  DB→parameterized queries; output→encode[XSS];
  auth→check before op; use established libs; rate limit; secure sessions
}

R.perf{
  DB{¬N+1→eager load; +indexes; paginate; profile slow};
  cache{expensive ops+external API; TTL→volatility; invalidation; warming};
  frontend{lazy load; optimize images; min bundle; code split}
}

R.deps{
  before add→check[maintained?,bundle size?,vulns?,existing alt?];
  doc major deps in README;
  prod→pin exact ver; libs→ver ranges;
  update regularly; monitor vulns
}

R.review{
  author{self-review first; PR small+focused; ctx in desc; feedback→constructive};
  reviewer{respectful; explain reasoning; required≠suggestions; approve when good enough}
}

R.logging{
  log=[startup,shutdown,auth events,biz-critical ops,errors+ctx,perf metrics];
  ¬log=[sensitive data,high-freq spam,redundant];
  levels{ERROR=failed+attention; WARN=unexpected+recoverable;
    INFO=normal biz; DEBUG=detailed; TRACE=very detailed}
}

Ω{
  standards=living doc→update as team grows;
  goal=better code together¬bureaucracy;
  ?doubt→ask colleague
}
⟧
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. 9d ago First seen · 116 lines · 6 tokens per session scan A 247ef70831ca

Subscribe to this mod's changes

coding-standards-demo.crux is a cursor rule published in the GitHub repository zotoio/CRUX-Compress (8 stars, last pushed 2d ago), licensed MIT. It adds 6 tokens to every session and 937 once invoked, about $0.0000 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-31.