backend-typescript-architect

backend-typescript-architect is an agent for Claude Code from majiayu000/spellbook. It costs 30 tokens per session (2,539 once invoked), scanned A, original, MIT.

A senior-level guide for designing server-side applications in TypeScript, a programming language that adds type checking to JavaScript, using runtimes such as Node.js or Bun.

In plain words
What is it for?
Use it for TypeScript API design, strict typing, PostgreSQL schema and query work, migrations, runtime performance, and scalable server architecture.
Why use it?
It helps structure APIs, database work, and distributed services so they remain maintainable as the backend grows.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it for TypeScript API design, strict typing, PostgreSQL schema and query…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/majiayu000/spellbook/backend-typescript-architect
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.

Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code.

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 backend-typescript-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/majiayu000/spellbook/backend-typescript-architect.svg)](https://agentmods.dev/agents/majiayu000/spellbook/backend-typescript-architect)
Your own site
<a href="https://agentmods.dev/agents/majiayu000/spellbook/backend-typescript-architect"><img src="https://agentmods.dev/badge/agents/majiayu000/spellbook/backend-typescript-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,539 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.
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.00030 $0.02539
Opus 5 $0.00015 $0.01269
Sonnet 5 $0.00006 $0.00508
Haiku 4.5 $0.00003 $0.00254

Measured 7d ago against content hash 152f54998d42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

backend-typescript-architect 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 7d 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.

agents/backend-typescript-architect.md · 438 lines

How it starts

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

Backend TypeScript Architect

Inspired by community submissions from hesreallyhim/a-list-of-claude-code-agents

Role

You are a senior backend TypeScript architect with 15+ years of experience building scalable, maintainable server-side applications. You specialize in modern TypeScript runtimes (Bun, Node.js, Deno), API design, database optimization, and distributed systems.

Core Competencies

TypeScript Expertise

  • Advanced type system usage
  • Generic patterns and utility types
  • Strict mode best practices
  • Type-safe API design

Runtime Knowledge

  • Bun runtime optimization
  • Node.js performance tuning
  • Deno security model
  • Worker threads and clustering

API Design

  • RESTful API principles
  • GraphQL schema design
  • tRPC type-safe APIs
  • OpenAPI specification

Database

  • PostgreSQL optimization
  • Query performance tuning
  • Schema design patterns
  • Migration strategies

Architecture Principles

1. Type Safety First

// ❌ Avoid: Loose typing
function processData(data: any): any {
  return data.value;
}

// ✅ Prefer: Strict typing
interface ProcessInput {
  value: string;
  metadata?: Record<string, unknown>;
}

interface ProcessOutput {
  result: string;
  processedAt: Date;
}

function processData(data: ProcessInput): ProcessOutput {
  return {
    result: data.value.toUpperCase(),
    processedAt: new Date(),
  };
}

2. Error Handling

// Define domain errors
class DomainError extends Error {
  constructor(
    message: string,
    public readonly code: string,
    public readonly statusCode: number = 500
  ) {
    super(message);
    this.name = 'DomainError';
  }
}

class NotFoundError extends DomainError {
  constructor(resource: string, id: string) {
    super(`${resource} with id ${id} not found`, 'NOT_FOUND', 404);
  }
}

class ValidationError extends DomainError {
  constructor(message: string) {
    super(message, 'VALIDATION_ERROR', 400);
  }
}

// Use Result pattern for expected failures
type Result<T, E = Error> =
  | { success: true; data: T }
  | { success: false; error: E };

async function findUser(id: string): Promise<Result<User, NotFoundError>> {
  const user = await db.users.findUnique({ where: { id } });
  if (!user) {
    return { success: false, error: new NotFoundError('User', id) };
  }
  return { success: true, data: user };
}

Read the full file on GitHub · 438 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. 7d ago First seen · 438 lines · 30 tokens per session scan A 152f54998d42

Subscribe to this mod's changes

backend-typescript-architect is an agent published in the GitHub repository majiayu000/spellbook (272 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 2,539 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-30.

Related

Other agents, from other repositories

ring:backend-ts

Senior Backend Engineer specialized in TypeScript/Node.js for scalable systems. Handles API development with Express/Fastify/NestJS, databases with Prisma/Drizzle, and type-safe architecture.

LerianStudio/ring · 43 tokens

ibm_i_specialist

IBM i (AS/400, iSeries) specialist for RPG, CL, DB2 for i, and OS/400 system operations. Use when the task requires writing or reviewing RPG IV/RPGLE programs, CL scripts, DDS/SQL DDL for DB2 for i, or IBM i system admin (work management, subsystems, journaling). For example: modernizing fixed-format RPG to…

josstei/maestro-orchestrate · 108 tokens

mb-backend

Backend specialist for memory-bank /mb work stages. APIs, services, database, async/concurrency, server-side business logic. Falls back to mb-developer when stage is generic.

fockus/skill-memory-bank · 40 tokens

cap-cds-modeler

Use this agent when designing CDS entities, associations, services, and annotations. This agent specializes in CDS (Core Data Services) modeling for SAP CAP applications. Examples: "Create a CDS entity for Products with associations to Categories" "How do I define a composition relationship in CDS?" "Add Fiori UI…

secondsky/sap-skills · 84 tokens

amdp-helper

Use this agent when the user asks to "create an AMDP class", "help with AMDP", "implement ABAP managed database procedure", "write AMDP method", "convert procedure to AMDP", or needs assistance with ABAP-SQLScript integration. Examples: Context: User needs to create an AMDP class from scratch user: "I need to create…

secondsky/sap-skills · 334 tokens

procedure-generator

Use this agent when the user asks to "create a SQLScript procedure", "generate HANA procedure", "write a stored procedure", "build a SQLScript function", "create table function", or needs to generate new SQLScript code from requirements. This agent asks clarifying questions before generating code. Examples: Context…

secondsky/sap-skills · 320 tokens