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/majiayu000/spellbooknpx agentmods add skills/majiayu000/spellbook/typescript-projectWrote 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/majiayu000/spellbook/typescript-project)<a href="https://agentmods.dev/skills/majiayu000/spellbook/typescript-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/typescript-project.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.00042 | $0.03139 |
| Opus 5 | $0.00021 | $0.01570 |
| Sonnet 5 | $0.00008 | $0.00628 |
| Haiku 4.5 | $0.00004 | $0.00314 |
Grade A, and why
typescript-project 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 — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Project Architecture
Core Principles
- Type safety first — Strict mode, no
any, Zod for runtime validation - ESM native — ES Modules by default, Node 22+ / Bun
- Layered architecture — Separate lib/services/adapters
- 200-line limit — No file exceeds 200 lines (see elegant-architecture skill)
- Test reality — Vitest/Bun test, minimal mocks
- No backwards compatibility — Delete, don't deprecate. Change directly, no shims
- LiteLLM for LLM APIs — Use LiteLLM proxy for all LLM integrations, unless specific SDK required
No Backwards Compatibility
Delete unused code. Change directly. No compatibility layers.
Why
- Dead code is tech debt
- Compatibility shims add complexity
- Old patterns spread through copy-paste
- "Temporary" workarounds become permanent
Anti-Patterns to Avoid
// ❌ BAD: Renaming but keeping old export
export { newName };
export { newName as oldName }; // "for backwards compatibility"
// ❌ BAD: Unused parameter with underscore
function process(_legacyParam: string, data: Data) { ... }
// ❌ BAD: Deprecated comments instead of deletion
/** @deprecated Use newMethod instead */
export function oldMethod() { ... }
// ❌ BAD: Re-exporting removed functionality
export { removed } from './legacy'; // Keep for existing consumers
// ❌ BAD: Feature flags for old behavior
if (config.useLegacyMode) { ... }
Correct Approach
// ✅ GOOD: Just delete and update all usages
// Old: export { fetchData as getData }
// New: export { fetchData }
// Then: Find & replace all getData → fetchData
// ✅ GOOD: Remove unused parameters entirely
function process(data: Data) { ... }
// ✅ GOOD: Delete deprecated code, update callers
// Don't mark as deprecated, just remove it
// ✅ GOOD: Breaking changes are fine in active development
// Semantic versioning handles this for libraries
When Changing Interfaces
// ❌ BAD: Adding optional fields "for compatibility"
interface User {
id: string;
name: string;
firstName?: string; // New field, name kept for compatibility
lastName?: string;
}
// ✅ GOOD: Clean break, update all usages
interface User {
id: string;
firstName: string;
lastName: string;
}
// Then update ALL code that uses User.name
What ships with it
16 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- reference/architecture.md 8.4 KB
- reference/patterns.md 12 KB
- reference/tech-stack.md 9.4 KB
- templates/project/biome.json 566 B
- templates/project/package.json 735 B
- templates/project/src/adapters/in-memory.repository.ts 909 B runs code
- templates/project/src/adapters/llm.adapter.ts 2.6 KB runs code
- templates/project/src/index.ts 595 B runs code
- templates/project/src/lib/config.ts 1.7 KB runs code
- templates/project/src/lib/errors.ts 1.5 KB runs code
- templates/project/src/lib/index.ts 148 B runs code
- templates/project/src/lib/logger.ts 2.2 KB runs code
- templates/project/src/lib/types.ts 947 B runs code
- templates/project/src/services/example.service.ts 2.3 KB runs code
- templates/project/tests/example.service.test.ts 3.5 KB runs code
- templates/project/tsconfig.json 584 B
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 · 490 lines · 42 tokens per session scan A 1963b20a2c5f
typescript-project is a skill published in the GitHub repository majiayu000/spellbook (272 stars, last pushed 2d ago), licensed MIT. It adds 42 tokens to every session and 3,139 once invoked, about $0.0002 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-03.
Other skills, from other repositories
Cursor rules for Next
Cursor rules for Next.js App Router with TanStack Query v5, covering the HydrationBoundary pattern, Server Actions as mutations, and optimistic updates.
Cursor rules for Jest development with unit testing
Skill "Cursor rules for Jest development with unit testing" from AmariahAK/atlarix-skills, covering cursor rules for jest development with unit testing, when to use this skill, source, persona and auto-detect typescript usage.
Next
Next.js App Router combined with TanStack Query v5 — HydrationBoundary pattern, Server Actions as mutations, optimistic updates, and infinite scroll.
TypeScript Patterns
Use this skill when working in a strict TypeScript codebase and you want reliable patterns for modeling data, narrowing, generics, and configuration—without papering over errors with as casts.
Cursor rules for JavaScript development with Astro and Tailwind CSS integration
Skill "Cursor rules for JavaScript development with Astro and Tailwind CSS integration" from AmariahAK/atlarix-skills, covering when to use this skill and source.
Cursor rules for VSCode extension development with Electron and TypeScript integ
Skill "Cursor rules for VSCode extension development with Electron and TypeScript integ" from AmariahAK/atlarix-skills, covering when to use this skill and source.