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/adonai-labs/agent-runway/api-design-typescriptgit clone --depth 1 https://github.com/adonai-labs/agent-runwayWrote 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/adonai-labs/agent-runway/api-design-typescript)<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/api-design-typescript"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/api-design-typescript.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 | $0.00000 | $0.02050 |
| Opus 5 | $0.00000 | $0.01025 |
| Sonnet 5 | $0.00000 | $0.00410 |
| Haiku 4.5 | $0.00000 | $0.00205 |
Grade A, and why
api-design-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 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 — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Design for TypeScript/Node.js
Extends core/rules/api-design.mdc with TypeScript and Node.js specific patterns.
Framework Selection
Express (Simple, flexible)
import express, { Request, Response, NextFunction } from 'express';
const app = express();
app.get('/api/users/:id', async (req: Request, res: Response, next: NextFunction) => {
try {
const user = await userService.getUser(parseInt(req.params.id));
res.json(user);
} catch (error) {
next(error);
}
});
NestJS (Enterprise, opinionated)
@Controller('users')
export class UsersController {
constructor(private readonly usersService: UsersService) {}
@Get(':id')
@ApiResponse({ status: 200, type: UserDto })
@ApiResponse({ status: 404, description: 'User not found' })
async getUser(@Param('id', ParseIntPipe) id: number): Promise<UserDto> {
return this.usersService.findOne(id);
}
}
Fastify (Fast, low overhead)
import Fastify from 'fastify';
const fastify = Fastify({ logger: true });
fastify.get<{ Params: { id: string } }>('/api/users/:id', async (request, reply) => {
const user = await userService.getUser(parseInt(request.params.id));
return user;
});
Type-Safe Request/Response
Zod Validation
import { z } from 'zod';
const CreateUserSchema = z.object({
email: z.string().email().max(255),
name: z.string().min(2).max(100),
age: z.number().int().min(18).optional(),
});
type CreateUserDto = z.infer<typeof CreateUserSchema>;
// Middleware
const validate = (schema: z.ZodSchema) => {
return (req: Request, res: Response, next: NextFunction) => {
try {
schema.parse(req.body);
next();
} catch (error) {
if (error instanceof z.ZodError) {
res.status(400).json({ errors: error.errors });
}
}
};
};
// Usage
app.post('/api/users', validate(CreateUserSchema), async (req, res) => {
const userData = req.body as CreateUserDto;
// ...
});
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 · 392 lines · 0 tokens per session scan A ed0faff11e96
api-design-typescript is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,050 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-09-03.
Other cursor rules, from other repositories
chrome-extension-dev-js-typescript-cursorrules-pro
Cursor rules for VSCode extension development with Electron and TypeScript integration.
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.
astro-typescript-cursorrules-prompt-file
Cursor rules for Astro development with TypeScript integration.
angular-typescript-cursorrules-prompt-file
Cursor rules for Angular development with TypeScript integration.
deno-integration-techniques-cursorrules-prompt-fil
Cursor rules for Deno development with integration techniques.
extension-ts
Patterns for the Sruja VS Code extension (TypeScript).