converting-ts-to-dart

converting-ts-to-dart is a skill for Claude Code, Codex from Poorgramer-Zack/dart-expert-skills. It costs 113 tokens per session (3,288 once invoked), scanned A, original, MIT.

A guide for translating TypeScript code into idiomatic Dart 3 code. TypeScript and Dart are programming languages, and Dart 3 is commonly used for Flutter apps.

In plain words
What is it for?
It helps convert interfaces, enums, generics, union types, async/await code, and frontend or Node.js modules to Dart.
Why use it?
It reduces the guesswork involved in moving types, classes, asynchronous code, and modules between the two languages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps convert interfaces, enums, generics, union types, async/await code, and frontend or Node.js modules to Dart.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/poorgramer-zack/dart-expert-skills/ts-to-dart
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.

Any agent
npx skills add Poorgramer-Zack/dart-expert-skills --skill ts-to-dart
Clone the repo
git clone --depth 1 https://github.com/Poorgramer-Zack/dart-expert-skills

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 converting-ts-to-dart

README.md
[![agentmods](https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/ts-to-dart/github.svg)](https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/ts-to-dart)
Your own site
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/ts-to-dart"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/ts-to-dart/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 converting-ts-to-dart

Your own site · 80×15
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/ts-to-dart"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/ts-to-dart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,288 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.00113 $0.03288
Opus 5 $0.00056 $0.01644
Sonnet 5 $0.00023 $0.00658
Haiku 4.5 $0.00011 $0.00329

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

Security

Grade A, and why

converting-ts-to-dart 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 12d 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.

skills/ts-to-dart/SKILL.md · 414 lines

How it starts

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

TypeScript to Dart 3 Conversion Guide

Goal

Provide clear, idiomatic mappings from TypeScript syntax and patterns to modern Dart 3 equivalents. Every conversion should produce code that feels native to Dart — not a line-by-line transliteration.

Instructions

1. Type System Mapping

1.1 Primitive Types

TypeScript and Dart share similar primitives but with different names.

// TypeScript
let name: string = "Zack";
let age: number = 25;
let active: boolean = true;
let items: string[] = ["a", "b"];
let pair: [string, number] = ["age", 25];
// Dart 3
final name = 'Zack';
final age = 25;
final active = true;
final items = ['a', 'b'];
final pair = ('age', 25); // Record instead of Tuple

Key mappings:

TypeScript Dart
string String
number int / double / num
boolean bool
any dynamic (avoid when possible)
unknown Object?
void void
null / undefined null (Dart has no undefined)
never Never
T[] / Array<T> List<T>
[A, B] (Tuple) (A, B) (Record)
Record<K, V> / { [key: string]: V } Map<K, V>
Set<T> Set<T>
Promise<T> Future<T>
Observable<T> Stream<T>
1.2 Union Types

Dart has no direct union type. Convert using sealed classes for complex cases, or Object + pattern matching for simple ones.

// TypeScript
type Result = Success | Failure;
type StringOrNum = string | number;
// Dart 3 — sealed class for ADTs
sealed class Result {}
class Success extends Result { final String data; Success(this.data); }
class Failure extends Result { final String error; Failure(this.error); }

// Simple union — use pattern matching
void process(Object value) {
  switch (value) {
    case String s: print('String: $s');
    case int n:    print('Int: $n');
  }
}
1.3 Literal Types and Enums
// TypeScript
type Direction = "up" | "down" | "left" | "right";
enum Status { Active = "ACTIVE", Inactive = "INACTIVE" }
// Dart 3 — enhanced enum
enum Direction { up, down, left, right }
enum Status {
  active('ACTIVE'),
  inactive('INACTIVE');
  final String value;
  const Status(this.value);
}

Read the full file on GitHub · 414 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. 12d ago First seen · 414 lines · 113 tokens per session scan A a090e037b978

Subscribe to this mod's changes

converting-ts-to-dart is a skill published in the GitHub repository Poorgramer-Zack/dart-expert-skills (7 stars, last pushed 1mo ago), licensed MIT. It adds 113 tokens to every session and 3,288 once invoked, about $0.0006 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.