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/transloadit/node-sdk/coding-stylegit clone --depth 1 https://github.com/transloadit/node-sdkWhat 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.00987 | $0.00987 |
| Opus 5 | $0.00494 | $0.00494 |
| Sonnet 5 | $0.00197 | $0.00197 |
| Haiku 4.5 | $0.00099 | $0.00099 |
Grade A, and why
coding-style 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 yesterday.
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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Coding style:
- Favor
async run() {overrun = async () => {inside ES6 classes - Favor
if (!(err instanceof Error)) { throw new Error(Was thrown a non-error: ${err}) }insidecatchblocks to ensure theerroris always an instance ofError - Favor using real paths (
../lib/schemas.ts) over aliases (@/app/lib/schemas). - Favor
for (const comment of comments) {overcomments.forEach((comment) => { - Favor named exports over default exports, with the exception of Next.js pages
- Avoid namespace
*imports unless the API is intentionally consumed as a namespace. Prefer named imports so usage is explicit and bundlers can optimize. - Avoid broad file-level lint suppressions. Prefer the narrowest scoped suppression on the exact line, with a reason when the exception is not obvious.
- Preserve existing dependency import paths and module-system interop unless the change is required
and explained. Do not rewrite package imports to
node_modules/..., switch ESM/CJS shapes, or add duplicate export styles just to satisfy local tooling. - Do not wrap each function body and function call in
try/catchblocks. It pollutes the code. Assume we will always have an e.g.main().catch((err) => { console.error(err); process.exit(1) })to catch us. I repeat: Avoid over-use of try-catch such astry { // foo } catch (err) { console.error('error while foo'); throw err }, assume we catch errors on a higher level and do not need the extra explananation. - If you must use try/catch, for simple cases, favor
alphalib/tryCatch.ts(const [err, data] = await tryCatch(promise)) overlet data; try { data = await promise } catch (err) { } - Before creating new files and new code, see if we can leverage existing work, maybe slighty adapt that without breaking BC, to keep things DRY.
- Favor early exits, so quickly
continue,return false(orthrowif needed), over nesting everything in positive conditions, creating christmas trees. - Use Prettier with 100 char line width, single quotes for JS/TS, semi: false
- Use descriptive names: PascalCase for components/types, camelCase for variables/methods/schemas
- Alphabetize imports, group by source type (built-in/external/internal)
- Preserve existing sorted lists and config ordering unless intentionally changing the order.
- Favor US English over UK English, so
summarizeErroroversummarise Error - Favor
.replaceAll('a', 'b)over.replace(/a/g, 'b')or.replace(new RegExp('a', 'g'), 'b')when the only need for regeses was replacing all strings. That's usually both easier to read and more performant. - Use typographic characters: ellipsis (
…) instead of..., curly quotes ('") instead of straight quotes in user-facing text - Generated text files should end with a trailing newline. Do not trim serializer output when the serializer intentionally emits POSIX-style text.
- Comments should explain why code exists or why an exception is needed, not narrate what the next line already says.
- Use JSDoc block comments for exported constants, functions, classes, and types when documenting their purpose or contract. Use regular line comments for local quirks, reasoning, or exceptions.
- Do not put TODOs, internal implementation notes, or future-work placeholders in user-facing text or schema descriptions. Put those in code comments, issues, or docs for maintainers instead.
- Put API keys and secrets in
.envfiles, not hardcoded in components - Do not return raw errors, stack traces, third-party responses, payment objects, database errors, or credential data to clients. Show sanitized user-facing messages and log only redacted diagnostic details server-side.
- When wrapping or rethrowing an error, preserve the original value with
new Error(message, { cause: error })when possible instead of stringifying it away. - Remove temporary debug logging/instrumentation before merge. Keep new logs only when they are intentional, useful in production, and do not expose sensitive data.
- Check for existing hooks before creating new ones (e.g.,
useUppy()for Uppy functionality)
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.
- yesterday First seen · 59 lines · 987 tokens per session scan A bf62ae0c44c8
coding-style is a cursor rule published in the GitHub repository transloadit/node-sdk (73 stars, last pushed 2d ago), licensed MIT. It adds 987 tokens to every session, about $0.0049 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
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-family-vocabulary-in-framework
The framework domain (packages/1-framework) carries no family- or target-specific vocabulary — types, fields, hooks, or strategy values. Enforced by the no-family-vocabulary Biome plugin plus lint:framework-vocabulary.
no-barrel-files
Avoid barrel files and unnecessary re-exports.
interface-factory-pattern
Interface-based design with factory functions (keep classes private).
explicit-opt-in-over-diagnostics
Prefer requiring explicit opt-in over emitting diagnostics on intentional user paths.