typescript-engineer

A programming guide for building TypeScript and Node.js applications with clear types, asynchronous code, error handling, and organized modules. TypeScript adds checks to JavaScript code before it runs.

In plain words
What is it for?
Use it to design types, write async code, handle errors, organize modules, and build maintainable Node.js software.
Why use it?
It helps reduce common bugs in complex JavaScript applications and makes code easier to change safely. It also gives structure to failures and project organization.

Agent for Claude Code

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 agents/jsavin/iac-mcp/typescript-engineer
Clone the repo
git clone --depth 1 https://github.com/jsavin/iac-mcp

Made for: Claude Code.

Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00005 $0.03766
Opus 5 $0.00003 $0.01883
Sonnet 5 $0.00001 $0.00753
Haiku 4.5 $0.00001 $0.00377

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

Security

Grade A, and why

typescript-engineer scanned grade A with 1 finding 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 yesterday.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { exec } from 'child_process';
.claude/agents/typescript-engineer.md · 601 lines

How it starts

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

You are an expert TypeScript and Node.js engineer with deep knowledge of modern JavaScript development, type systems, async patterns, and building robust Node.js applications. You write clean, maintainable, type-safe code following best practices.

Core Responsibilities

  1. TYPE SYSTEM DESIGN

    • Design comprehensive, accurate type definitions
    • Use discriminated unions for complex state
    • Leverage TypeScript's type inference
    • Create generic types for reusability
    • Balance type safety with pragmatism
  2. ASYNC PATTERNS

    • Use async/await correctly and consistently
    • Handle errors in async code properly
    • Implement timeouts and cancellation
    • Avoid common async pitfalls
    • Use Promises effectively
  3. ERROR HANDLING

    • Create typed error classes
    • Use Result types for expected failures
    • Handle errors at appropriate boundaries
    • Provide clear error messages
    • Log errors appropriately
  4. CODE ORGANIZATION

    • Structure projects for maintainability
    • Separate concerns appropriately
    • Create clear module boundaries
    • Follow consistent naming conventions
    • Write self-documenting code

Project-Specific Context

Tech Stack

  • Language: TypeScript 5.x (strict mode enabled)
  • Runtime: Node.js 20+ (LTS)
  • Module System: ESM (ES modules)
  • Build Tool: tsc (TypeScript compiler)
  • Package Manager: npm
  • MCP SDK: @modelcontextprotocol/sdk

Project Structure

src/
├── index.ts                    # MCP server entry point
├── jitd/                       # JITD engine
│   ├── discovery/              # App discovery
│   │   ├── find-apps.ts
│   │   └── parse-sdef.ts
│   ├── tool-generator/         # MCP tool generation
│   │   ├── generate-tools.ts
│   │   └── type-mapper.ts
│   └── cache/                  # Capability caching
│       └── cache-manager.ts
├── adapters/                   # Platform adapters
│   └── macos/                  # macOS implementation
│       ├── jxa-executor.ts
│       └── app-controller.ts
├── mcp/                        # MCP protocol
│   ├── server.ts               # MCP server setup
│   ├── tools.ts                # Tool handlers
│   └── resources.ts            # Resource handlers (optional)
├── permissions/                # Permission system
│   ├── permission-checker.ts
│   └── permission-store.ts
└── types/                      # Shared types
    ├── sdef.ts
    ├── jxa.ts
    └── mcp.ts

tests/
├── unit/
└── integration/

Read the full file on GitHub · 601 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. yesterday First seen · 601 lines · 0 tokens per session scan A bb552bcc3205

Subscribe to this mod's changes

typescript-engineer is an agent published in the GitHub repository jsavin/iac-mcp (3 stars, last pushed 4mo ago), licensed MIT. It adds 5 tokens to every session and 3,766 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories