Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/yu-iskw/llmops-demo-tsnpx agentmods add rules/yu-iskw/llmops-demo-ts/tsoa-rulesWrote 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.
[](https://agentmods.dev/rules/yu-iskw/llmops-demo-ts/tsoa-rules)<a href="https://agentmods.dev/rules/yu-iskw/llmops-demo-ts/tsoa-rules"><img src="https://agentmods.dev/badge/rules/yu-iskw/llmops-demo-ts/tsoa-rules.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02345 | $0.02345 |
| Opus 5 | $0.01172 | $0.01172 |
| Sonnet 5 | $0.00469 | $0.00469 |
| Haiku 4.5 | $0.00234 | $0.00234 |
Grade A, and why
tsoa-rules 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 3d 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 — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TSOA Development Best Practices
This document outlines comprehensive guidelines and best practices for developing Node.js server-side applications with tsoa, focusing on TypeScript for type safety and OpenAPI specification generation.
1. Introduction to tsoa
- tsoa is a framework that integrates an OpenAPI compiler to build type-safe Node.js applications using TypeScript.
- It generates OpenAPI (Swagger) specifications and routes from your TypeScript controllers and models, ensuring type-safe by default and seamless runtime validation.
- Philosophy:
- Rely on TypeScript type annotations for API metadata.
- Use decorators for metadata not expressible via type annotations.
- Utilize JSDoc for pure text metadata (e.g., endpoint descriptions).
- Minimize boilerplate code.
- Models should primarily be interfaces (pure data structures), but classes are also supported.
2. Project Setup and Configuration
tsoa.json Configuration
- Configure
entryFileto point to your application's entry point (e.g.,src/app.tsorsrc/index.ts). - Use
controllerPathGlobsto specify where tsoa should look for controllers (e.g.,"src/**/*Controller.ts"). - Set
noImplicitAdditionalPropertiesto"throw-on-extras"for strict validation, rejecting undeclared properties in incoming requests. Other options are"ignore"or"silently-remove-extras". - Define
spec.outputDirectoryandroutes.routesDirfor generated OpenAPI specifications and route files. - Set
spec.specVersionto3for OpenAPI v3 specifications.
// tsoa.json
{
"entryFile": "src/app.ts",
"noImplicitAdditionalProperties": "throw-on-extras",
"controllerPathGlobs": ["src/**/*Controller.ts"],
"spec": {
"outputDirectory": "build",
"specVersion": 3
},
"routes": {
"routesDir": "build"
}
}
tsconfig.json Recommendations
- Ensure
experimentalDecoratorsistrue. - Use strict type-checking options like
strict,noImplicitAny,strictNullChecks,noUnusedLocals, andnoUnusedParameters.
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.
- 3d ago First seen · 291 lines · 2,345 tokens per session scan A d295e0a93459
tsoa-rules is a cursor rule published in the GitHub repository yu-iskw/llmops-demo-ts (6 stars, last pushed 6d ago), licensed Apache-2.0. It adds 2,345 tokens to every session, about $0.0117 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-09-04.
Other cursor rules, from other repositories
nestjs-best-practices
../../.claude/rules/nestjs-best-practices.md.
typescript-javascript-rules
description: Defines specific coding style and structure for TypeScript and JavaScript files, including function usage, type preferences, and file organization. globs: /.{ts,tsx,js,jsx}.
pn-go-backend
Go backend style, env, and error handling. Use for API and server code (Gin, Fiber, Echo).
pn-php-backend
PHP backend style, env, and error handling. Use for API and server code (Laravel, Slim).
pn-python-backend
Python backend style, env/secrets, and error handling. Use for API and server code (FastAPI, Flask).
pn-ruby-backend
Ruby backend style, env, and error handling. Use for API and server code (Rails, Sinatra).