Borrowing it
Nothing to install: this file belongs to dlupiak/claude-session-dashboard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dlupiak/claude-session-dashboard/main/.claude/skills/typescript-rules/SKILL.mdgit 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00008 | $0.00426 |
| Opus 5.5 | $0.00003 | $0.00170 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (76 stars, last pushed 3d ago), licensed MIT. It adds 8 tokens to every session and 426 once invoked, about $0.0000 per session on Opus 5.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
typescript-ops
TypeScript type system, generics, utility types, strict mode, and ecosystem patterns. Use for: typescript, ts, type, generic, utility type, Partial, Pick, Omit, Record, Exclude, Extract, ReturnType, Parameters, keyof, typeof, infer, mapped type, conditional type, template literal type, discriminated union, type guard…
ts-debug
TypeScript/Node debugging expert. Use when the user needs to debug, profile, or trace TypeScript or Node.js code — e.g. "how do I debug this", "find the memory leak", "why is this slow", "add a breakpoint", "profile this function", "why won't the process exit".
typescript-strict
Always enable strict mode. Use this tsconfig.json base.
typescript-advanced
Advanced TypeScript patterns including branded/nominal types, discriminated unions with exhaustive matching, conditional types with infer, mapped types, template literal types, module augmentation, declaration merging, satisfies operator, const assertions, variance annotations, strict library authoring, and type-level…
typescript
TypeScript patterns covering strict types, generics constraints, utility types (Pick, Omit, Record, Extract), discriminated unions, async patterns, and common mistakes with BAD/GOOD comparisons.
bun
Generate Bun project setup.