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 skills/dlupiak/claude-session-dashboard/typescript-rulesnpx skills add dlupiak/claude-session-dashboard --skill typescript-rulesgit clone --depth 1 https://github.com/dlupiak/claude-session-dashboardWrote 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/skills/dlupiak/claude-session-dashboard/typescript-rules)<a href="https://agentmods.dev/skills/dlupiak/claude-session-dashboard/typescript-rules"><img src="https://agentmods.dev/badge/skills/dlupiak/claude-session-dashboard/typescript-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 | $0.00008 | $0.00426 |
| Opus 5 | $0.00004 | $0.00213 |
| Sonnet 5 | $0.00002 | $0.00085 |
| Haiku 4.5 | $0.00001 | $0.00043 |
Grade A, and why
typescript-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.
What it actually says
TypeScript Rules
Types
- Never use
any— useunknownwith type guards or explicit types - Prefer
interfacefor object shapes,typefor unions/intersections - Export types alongside their functions, not from barrel files
- Use
satisfiesfor type-safe object literals:const x = { ... } satisfies Config
Imports
- Use
@/path alias for imports fromapps/web/src/ - Group imports: external libs →
@/lib/→ relative slice imports - Use
typeimports for type-only:import type { Foo } from './types'
Architecture Boundaries
Vertical slice structure (src/features/<slice>/)
- Each slice owns its own server functions, queries, components, and types
- No cross-slice imports — shared code goes in
src/lib/ src/lib/modules must NOT import fromsrc/features/
File naming
- Server function files:
*.server.ts - Query/hooks files:
*.queries.ts - Component files: PascalCase (e.g.,
SessionCard.tsx) - Test files:
*.test.ts(x)co-located with source
Error Handling
- Throw typed errors, not strings:
throw new Error('message') - Use discriminated unions for result types:
{ ok: true; data: T } | { ok: false; error: string } - Catch
unknown, narrow withinstanceof
Functions
- Prefer named function declarations over arrow functions for top-level exports
- Use explicit return types on exported functions
- Keep functions small — max ~50 lines
Zod
- Validate all external input (API responses, form data, URL params) with Zod
- Co-locate schemas with server functions, not in separate schema files
- Use
z.infer<typeof schema>for derived types
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 · 47 lines · 8 tokens per session scan A 645e42d3ed5e
typescript-rules is a skill published in the GitHub repository dlupiak/claude-session-dashboard (66 stars, last pushed yesterday), licensed MIT. It adds 8 tokens to every session and 426 once invoked, about $0.0000 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-01.
Other skills, from other repositories
pinme-email
Use this skill when a PinMe project (Worker TypeScript) needs to integrate email sending (sendemail). Guides AI to generate correct Worker TS code.
node-modern
Use this skill when writing, reviewing, or refactoring Node.js >= 22 TypeScript code in WrongStack. Triggers: ESM imports, fetch usage, AbortSignal, node: protocol, Web Streams, or any async patterns.
typescript-strict
Use this skill when writing or reviewing TypeScript code with strict mode in WrongStack. Triggers: user mentions "TypeScript", "strict", "type error", "type safety", "narrowing", "branded type", "discriminated union", "noUncheckedIndexedAccess".
ts-review
TypeScript monorepo 审查:XSS、SQL 注入、密钥、any、console.log.
nodejs-backend
Node.js backend patterns: layered architecture, TypeScript, validation, error handling, security, observability, logging, metrics, deployment. Use when building REST APIs, REST endpoints, middleware, Express/Fastify/Hono/NestJS/Koa servers, tRPC procedures, Bun servers, or server-side TypeScript.
javascript-sast
JavaScript and Node.js security scanning. Checks dependency vulnerabilities via npm audit and source patterns for XSS, eval, and prototype pollution.