typescript-backend-patterns

A set of working patterns for server-side TypeScript, the language used to build backend services with Node.js and frameworks such as NestJS, Express, Fastify, and Next.js.

In plain words
What is it for?
Use it when implementing, debugging, reviewing, planning, or testing TypeScript backend code and server routes.
Why use it?
It helps developers account for the actual framework and library versions in a project before changing backend behaviour or tests.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/catwillgh/mainframe/typescript-backend-patterns
Any agent
npx skills add CATWILLgh/MAINFRAME --skill typescript-backend-patterns
Clone the repo
git clone --depth 1 https://github.com/CATWILLgh/MAINFRAME

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.01074
Opus 5 $0.00023 $0.00537
Sonnet 5 $0.00009 $0.00215
Haiku 4.5 $0.00005 $0.00107

Measured 2d ago against content hash af84b6bdcdb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

typescript-backend-patterns 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (recon.js), 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.

adapters/claude-code/plugin/skills/typescript-backend-patterns/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TypeScript backend patterns

Use this skill for both new backend work and established systems. Discover the active package and versions first; never infer the stack from the repository name or from dependencies alone.

Operating rule

  1. Run recon.js against the relevant package root, or use recon.md manually.
  2. Trace the changed behavior through entrypoint, business logic, data boundary, and callers.
  3. Read only the references matching the task.
  4. For installed libraries and version-sensitive behavior, verify the installed major and consult current primary documentation through Context7 or the official project site.
  5. Apply the testing baseline below. Read testing.md when the task requires choosing test scope, changing existing tests, or separating the local and CI paths.

Multiple frameworks, ORMs, auth libraries, or test runners are observations, not automatic blockers. Determine which one owns the active path from imports, configuration, and runtime wiring. Ask the caller only when evidence cannot resolve a choice that changes product behavior or infrastructure.

Complete the assigned behavior. Do not use TODOs, placeholders, disabled checks, suppressions, or deferred in-scope work as a substitute for implementing it.

Two compatible layers

  • Established system: preserve its supported framework, module format, ORM, auth, validation, contracts, and conventions. Make the smallest coherent change. Do not opportunistically migrate or introduce a competing library.
  • New or isolated component: prefer a supported Node.js LTS line, strict TypeScript, explicit boundaries, maintained libraries, focused tests, and PostgreSQL when relational semantics are needed. Choose a framework or library from actual requirements; this skill does not mandate one universal ORM, auth library, or transport.

Testing baseline

  • Use the project's native commands and the smallest faithful test for the changed behavior.
  • Inspect the exact package script before running it. A name such as lint, format, or test does not prove that the command is non-mutating, infrastructure-free, or safe for the active environment; use a check-only variant when verification must not alter files.
  • When practical, observe the focused test fail for the intended reason before the fix, then pass, followed by the nearest relevant fast suite.
  • Use real PostgreSQL when database semantics are the changed risk; do not add external infrastructure to tests that can prove the same behavior in process.
  • Assert observable outcomes and protected side effects. Never weaken assertions, hide failures, leave skipped tests, or claim an unobserved result.

Read the full file on GitHub · 70 lines

Files

What ships with it

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

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. 2d ago First seen · 70 lines · 47 tokens per session scan A af84b6bdcdb2

Subscribe to this mod's changes

typescript-backend-patterns is a skill published in the GitHub repository CATWILLgh/MAINFRAME (2 stars, last pushed 11d ago), licensed MIT. It adds 47 tokens to every session and 1,074 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-08-31.

Related

Other skills, from other repositories

discord-webhook

Send trading alerts, signals, and analysis summaries to Discord via webhook. Integrates with realtime-alert-pipeline, trading-brain, and trade-journal-analytics.

mahmoud20138/Tradecraft · 37 tokens

agentforge-protocol

Use when doing non-trivial coding with Hermes, OpenClaw, Claude Code, Codex CLI, or similar autonomous coding agents. Orchestrates Karpathy-style minimal-change discipline, grill-plan intake, TDD, systematic debugging, subagent-driven implementation, spikes, and pre-commit review into one end-to-end workflow.

Yat-mo/agentforge-protocol · 71 tokens

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.

questflowai/investorskills · 44 tokens