typescript-project

typescript-project is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 42 tokens per session (3,291 once invoked), scanned A, original, MIT.

A guide to structuring modern TypeScript projects, including configuration, module layout, layers, validation, and testing choices. TypeScript is JavaScript with checks that catch many mistakes before the program runs.

In plain words
What is it for?
Use it when creating or reorganising a TypeScript project, choosing its architecture, setting up strict checks, or deciding how services and adapters should be separated.
Why use it?
It gives new projects a consistent structure and discourages unused code, unsafe types, and unnecessary compatibility layers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { UserService } from '../src/services/user.service';.

Good fit Use it when creating or reorganising a TypeScript project, choosing its architecture, setting up strict checks, or deciding how services and adapters should be separated.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook
agentmods
npx agentmods add skills/majiayu000/spellbook/typescript-project

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for typescript-project

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/typescript-project/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/typescript-project)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/typescript-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/typescript-project/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.

agentmods 80×15 button for typescript-project

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/typescript-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/typescript-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Excessive Agency · line 118
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium MCP Rug Pull · line 114
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.03291
Opus 5.5 $0.00017 $0.01316
Sonnet 5.5 $0.00008 $0.00658
Haiku 4.5 $0.00004 $0.00329

Measured 1mo ago against content hash 1437727c9f0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo ago.

The scan reads SKILL.md. This mod also ships 10 executable files (templates/project/src/adapters/in-memory.repository.ts, templates/project/src/adapters/llm.adapter.ts, templates/project/src/index.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/typescript-project/SKILL.md · 501 lines

How it starts

The opening of the file, as written. The whole thing — 501 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

Gotchas

  • Bun, Zod, directory layout and LiteLLM choices are activation observations, not proof of task success. Check valid inputs, invalid inputs, state changes and the actual error contract.
  • A template can pass service tests and still fail typecheck; the maintained template's noUnusedLocals caught an unused configuration helper in the October 2026 case. Run both.
  • latest dependency declarations do not pin a reproduced run. Keep the generated lockfile with its evidence and record actual installed versions. Don't claim another runtime passed.
  • A configured proxy URL is not a live model result. Without a provider, verify independent application behavior and explicitly leave the LLM check pending.

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) { ... }

Read the full file on GitHub · 501 lines

Changes

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.

  1. 1mo ago Changed · +11 lines 1437727c9f0a
  2. 2mo ago First seen · 490 lines · 42 tokens per session scan A 1963b20a2c5f

Subscribe to this mod's changes

typescript-project is a skill published in the GitHub repository majiayu000/spellbook (301 stars, last pushed 7d ago), licensed MIT. It adds 42 tokens to every session and 3,291 once invoked, about $0.0002 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-03.

Related

typescript-project compared with skills from other repositories

typescript-project next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
typescript-projectmajiayu000/spellbookSkill3017d agoMITA42Claude Code, Codex
CreateCLIdanielmiessler/LifeOSSkill20k12d agoMITA88Claude Code, Codex
setup-ts-deep-modulesvinvcn/mattpocock-skills-zh-CNSkill6.2k5d agoMITA49Claude Code, Codex
output-dev-code-stylegrowthxai/outputSkill4454d agoApache-2.0A50Claude Code
frontend-typescript-rulesshinpr/ai-coding-project-boilerplateSkill239yesterdayMITA29Claude Code
typescript-rulesshinpr/ai-coding-project-boilerplateSkill239yesterdayMITA31Claude Code
buncode-yeongyu/senpiSkill530todayMITA237Claude Code, Codex