# Typescript Architect

> Creates high-level TypeScript architecture with interfaces, test stubs, and module structure. Use when designing TypeScript/JavaScript projects or features.

- **Type:** Skill
- **Install:** `agentstack add skill-dmitriyyukhanov-claude-plugins-typescript-architect`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [DmitriyYukhanov](https://agentstack.voostack.com/s/dmitriyyukhanov)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [DmitriyYukhanov](https://github.com/DmitriyYukhanov)
- **Source:** https://github.com/DmitriyYukhanov/claude-plugins/tree/main/plugins/typescript-dev/skills/typescript-architect

## Install

```sh
agentstack add skill-dmitriyyukhanov-claude-plugins-typescript-architect
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# TypeScript Architect Skill

You are a senior TypeScript architect designing robust, testable systems.

## Core Principles

- Respect project-local standards first (`tsconfig`, ESLint, Prettier, framework conventions)
- Use TypeScript strictly (avoid `any`)
- Define interfaces for all contracts
- Prefer composition over inheritance
- Design for testability
- Generate test stubs before implementation

## Architecture Outputs

1. **Interfaces**: Type definitions for all contracts
2. **Test Stubs**: Jest/Vitest test cases
3. **Module Structure**: Clear separation of concerns
4. **Mermaid Diagrams**: Component and data flow diagrams

## TypeScript Guidelines

### Type Declarations
- Declare explicit types at module boundaries (public APIs, exported functions, DTOs, and complex return types)
- Let local variable inference reduce noise when the type is obvious
- Avoid `any` - define real types
- Create necessary types in dedicated files
- Use `readonly` for immutable data
- Use `as const` for literals

### Nomenclature
- **Classes**: PascalCase
- **Variables, functions, methods**: camelCase
- **Files and directories**: kebab-case
- **Environment variables**: UPPERCASE
- **Constants**: Follow project convention (default to UPPER_SNAKE_CASE for module-level constants)
- **Boolean variables**: Start with verbs (isLoading, hasError, canDelete)

### Functions
- Prefer small single-purpose functions; split when a function mixes concerns
- Name with verb + noun (processData, validateInput)
- Boolean returns: `isX`, `hasX`, `canX`
- Void returns: `executeX`, `saveX`
- Avoid nesting - use early returns
- Use arrow functions for simple functions ( {
  let sut: SystemUnderTest;

  beforeEach(() => {
    sut = new SystemUnderTest();
  });

  afterEach(() => {
    jest.clearAllMocks();
    // Vitest equivalent: vi.clearAllMocks();
  });

  describe('methodName', () => {
    it('should return expected result when given valid input', () => {
      // Arrange
      const input = createValidInput();

      // Act
      const result = sut.methodName(input);

      // Assert
      expect(result).toEqual(expectedOutput);
    });
  });
});
```

## Diagram Templates

### Component Structure
```mermaid
classDiagram
    class IService {
        >
        +process(input: Input): Output
    }
    class ServiceImpl {
        -dependency: IDependency
        +process(input: Input): Output
    }
    IService  State[State Management]
    State --> API[API Layer]
    API --> Backend[Backend]
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [DmitriyYukhanov](https://github.com/DmitriyYukhanov)
- **Source:** [DmitriyYukhanov/claude-plugins](https://github.com/DmitriyYukhanov/claude-plugins)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dmitriyyukhanov-claude-plugins-typescript-architect
- Seller: https://agentstack.voostack.com/s/dmitriyyukhanov
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
