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/peerigon/configs/coding-styleguide-js-tsgit clone --depth 1 https://github.com/peerigon/configsWhat 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.00000 | $0.02154 |
| Opus 5 | $0.00000 | $0.01077 |
| Sonnet 5 | $0.00000 | $0.00431 |
| Haiku 4.5 | $0.00000 | $0.00215 |
Grade A, and why
coding-styleguide-js-ts 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 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.
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 — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JavaScript & TypeScript
- Use TypeScript. If .js files are requested, use JSDoc type annotations
- Prefer functional over imperative
- Prefer immutability
- Priority rule (MUST): order every file by importance. Start with the primary logic and keep less important helpers/details at the end. Do not put small helpers, secondary types, or uninteresting constants above the main export just to satisfy "define before call".
Formatting
- Use Prettier's default formatting
Imports & exports
- Use ESM unless you're editing a CommonJS file
- Follow the consuming repository's established import-specifier convention (extensions vs extensionless;
.jsvs.tsin TypeScript source files) - Determine convention from nearby files and configuration before introducing new imports
- Keep import style consistent within a module/package; avoid mixed styles unless already established
- If conventions are unclear or conflicting, ask the user before changing or introducing import-specifier style
- Avoid default imports and default exports
- Avoid barrel files (index files that only re-export) unless its a package entry file
File structure
- Do not add a file header comment by default
- For complex or high-impact files only, add a short context comment near the top (3-6 lines) that explains purpose, where to start reading, and non-obvious caveats
- Then imports
- Then the file's primary export(s) / main classes and functions (order by importance relative to the file purpose)
- Then supporting types, less important constants/variables, and private helpers at the bottom
- Calling a helper from a function body does not require the helper to appear above that function; only load-time / TDZ constraints do
- Exception: when module execution requires a binding to be initialized before it is used at load time, define it earlier
Naming Conventions
camelCasefor variables, functions, methodsPascalCasefor classes, enums and React componentsSCREAMING_SNAKE_CASEfor build-time constantskebab-casefor file names, CSS classes and DOM ids- Stick to existing naming conventions if present (e.g.
camelCaseandPascalCasefor file names) - Use specific names instead of unspecific abbreviations like
obj,arranderr - Only use abbreviations when they are widely used like
Api - Abbreviations should be treated as separate words (e.g.
Apiinstead ofAPI) - Use short names when the variable or function is private and only accessible in the current file
- Use longer and more specific names when the variable or function is exported and visible across the whole project
- Use auxiliary verbs (e.g., isLoading, hasError) for boolean variables and type guards
- Name variables and parameters after their type, unless there is a good reason not to (e.g. multiple instances of the same type in scope, or a more meaningful domain name)
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 · 215 lines · 2,154 tokens per session scan A 459b0a2c8644
coding-styleguide-js-ts is a cursor rule published in the GitHub repository peerigon/configs (4 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,154 tokens. 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.
Other cursor rules, from other repositories
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-barrel-files
Avoid barrel files and unnecessary re-exports.
vue-typescript-patterns
Cursor rule "vue-typescript-patterns" from soaring-xiongkulu/easyaiot, covering vue3 + typescript 开发规范, vue 组件规范, vue sfc 组件规范, typescript 规范 and 状态管理.
project-overview
这是一个基于 uniapp + Vue3 + TypeScript + Vite5 + UnoCSS 的跨平台开发框架。.
compose-resource-lifecycles-with-layermerge
Cursor rule "compose-resource-lifecycles-with-layermerge" from PaulJPhilp/EffectPatterns, covering compose resource lifecycles with layer.merge and example.
frontend-patterns
React/TypeScript patterns for src/ code.