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/zenjoy/realtime-register-mcp/typescriptgit clone --depth 1 https://github.com/zenjoy/realtime-register-mcpWhat 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.00630 | $0.00630 |
| Opus 5 | $0.00315 | $0.00315 |
| Sonnet 5 | $0.00126 | $0.00126 |
| Haiku 4.5 | $0.00063 | $0.00063 |
Grade A, and why
typescript 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in building MCP servers in TypeScript using a test-driven design methodology.
TypeScript Guidelines
- Use TypeScript for all source files. Enable
strictmode intsconfig.jsonfor full type safety. - Prefer interfaces over types for defining object shapes.
- Avoid
any; instead, use unknown or appropriate custom types. - Use PascalCase for types/interfaces, camelCase for variables/functions.
- Use
readonlymodifiers where applicable to ensure immutability.
Project Structure and Code Style
- Organize by feature-based folders (e.g.,
src/modules/user,src/core,src/utils). - Use
functionkeyword for pure functions, but prefer arrow functions. Avoid unnecessary classes. - Structure files consistently: implementation first, then exports, then helpers, then types.
- Favor named exports for maintainability.
- Use lower-case dash-separated folder names.
Testing and TDD Practices
- Write all code in response to failing tests.
- Use Jest for all unit and integration testing.
- Use
.test.tssuffix for test files and colocate them with the code being tested. - Ensure 100% test coverage; enforce via Jest configuration.
- Use mocks and spies to isolate units during testing.
- Write tests for edge cases, invalid inputs, and error states.
- Maintain clear separation between test setup, execution, and assertions.
Dependency Management
- Use Yarn as the package manager.
- Use
yarn workspacesif part of a monorepo. - Lock dependency versions with
yarn.lock. - Use scripts in
package.jsonfor common tasks likeyarn test,yarn lint, andyarn build.
Linting and Formatting
- Use ESLint with the TypeScript plugin for consistent style enforcement.
- Use Prettier for code formatting.
- Configure linting to run on
pre-commitusing Husky or similar.
Error Handling and Logging
- Always use typed error objects.
- Favor early returns for error conditions.
- Log meaningful errors at the point of failure.
- Avoid using try-catch for expected conditions—use validation and guards.
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 · 77 lines · 630 tokens per session scan A c8a08609f48d
typescript is a cursor rule published in the GitHub repository zenjoy/realtime-register-mcp (1 stars, last pushed 8mo ago), licensed MIT. It adds 630 tokens to every session, about $0.0032 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.
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 .
frontend-patterns
React/TypeScript patterns for src/ code.
typescript-coding-rule
It allows a subset of JSDoc tags. Most tags must occupy their own line, with the tag at the beginning of the line.
typescript-mcp
MCP TypeScript SDK implements the full Model Context Protocol specification, allowing you to build MCP servers and clients using TypeScript.
typescript-patterns
TypeScript patterns for code organization, classes, types, and symbols as it relates to this project.
javascript-3-development-standards
JavaScript/ECMAScript development standards following modern best practices, Airbnb/Google style guides, and JavaScript community conventions.