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.
git clone --depth 1 https://github.com/Kevin-Liu-01/Sigil-UIWrote 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/kevin-liu-01/sigil-ui/typescript-conventions)<a href="https://agentmods.dev/rules/kevin-liu-01/sigil-ui/typescript-conventions"><img src="https://agentmods.dev/badge/rules/kevin-liu-01/sigil-ui/typescript-conventions/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/rules/kevin-liu-01/sigil-ui/typescript-conventions"><img src="https://agentmods.dev/badge/rules/kevin-liu-01/sigil-ui/typescript-conventions.svg" alt="Reviewed on agentmods" width="80" 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.00556 | $0.00556 |
| Opus 5.5 | $0.00222 | $0.00222 |
| Sonnet 5.5 | $0.00111 | $0.00111 |
| Haiku 4.5 | $0.00056 | $0.00056 |
Grade A, and why
typescript-conventions 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 2mo 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Conventions
Imported from Kevin's wiki (
wiki/style/typescript.md). Cross-reference:sigil-design-system.mdc(TypeScript Rules section).
General Principles
- Prefer functional style. Classes only when the domain demands it (SDK clients).
constoverlet; nevervar.===over==.- Template literals over string concatenation.
- Named exports over default exports.
- If a function name contains "and", split it.
Types
typeoverinterfaceunless declaration merging is needed. Interfaces can accidentally merge across files;typealiases are closed.unknownoverany. Ifanyis unavoidable, add// eslint-disable-next-linewith justification.satisfiesto validate object shapes without widening.import typefor type-only imports (enforced bytypescript/consistent-type-imports).- Derive types from values with
as const, not the other way around. - Discriminated unions with exhaustive
switchfor domain variants. - Branded types (
string & { readonly __brand: "X" }) for nominal safety.
Error Handling
Result<T, E>from@/lib/utils/functionalfor domain logic with expected failures.Zodfor validating external input at API boundaries.catch (error: unknown), narrow witherror instanceof Error.- Early returns over deeply nested conditionals.
- No ternaries for control flow. Ternaries are for value selection only.
Console Warnings
Label console.warn and console.error calls with their origin:
console.warn("[FileName::functionName::L42] description");
Linting
Use Ultracite (bun x ultracite@latest init) for oxlint configuration. Zero-config presets with framework-specific rules. Custom ESLint rules layer on top for repo-specific architectural policy only (see react-conventions.mdc).
Type Checking
Use tsgo (TS 7, native Go implementation) for type checking. Do not use tsc. ~10x faster, identical type errors. Combined with oxlint, full-repo validation runs in ~250-500ms.
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.
- 2mo ago First seen · 56 lines · 556 tokens per session scan A 3475057d00d8
typescript-conventions is a cursor rule published in the GitHub repository Kevin-Liu-01/Sigil-UI (10 stars, last pushed 10d ago), licensed MIT. It adds 556 tokens to every session, about $0.0022 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-08-31.
Other cursor rules, from other repositories
javascript
JavaScript and TypeScript conventions for this ESM monorepo.
rust-sdk
Rust SDK workspace conventions and moon tasks.
mcp-tool-structure
The project implements an MCP (Model Context Protocol) tool following the framework's required structure.
vue-typescript-patterns
A set of coding rules for Vue 3 projects using TypeScript, a language that adds type checking to JavaScript. It covers component structure, file locations, TypeScript usage, and Pinia, a library for shared application state.
changesets
Changeset format and bump rules enforced by CI.
nextjs-typescript-app-cursorrules-prompt-file
Cursor rules for Next.js development with TypeScript integration.