ts-core

ts-core is a skill for Claude Code, Codex from vercel-labs/native. It costs 0 tokens per session (34,638 once invoked), scanned A, original, Apache-2.0.

Instructions for writing the main logic of a Native SDK app in a restricted TypeScript subset. The app state is a Model, possible events are Msg values, and a pure update function changes the state; the result is compiled ahead of time to native code.

In plain words
What is it for?
Use it to create or extend a Native SDK app’s state, event handling, pure logic, and core modules before connecting that logic to the Native markup interface.
Why use it?
It defines the rules that let app logic compile without including a JavaScript engine and makes the same code testable with ordinary TypeScript tools and Node.js.

Skill for Claude CodeCodex ✓ vendor

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

Good fit Use it to create or extend a Native SDK app’s state, event handling, pure logic, and core modules before connecting that logic to the Native markup interface.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vercel-labs/native/ts-core
About the project

Native SDK is a toolkit for building desktop applications with native rendering instead of a browser, WebView, or JavaScript runtime bundled into the application. Developers author interfaces in `.native` markup and write application logic in TypeScript or Zig, which the toolkit compiles and renders in real operating-system windows. The catalogue entries provide skills and instructions for working with Native SDK.

vercel-labs/native · 7,804 stars · on GitHub · native-sdk.dev

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 vercel-labs/native --skill ts-core
Clone the repo
git clone --depth 1 https://github.com/vercel-labs/native

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 ts-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel-labs/native/ts-core/github.svg)](https://agentmods.dev/skills/vercel-labs/native/ts-core)
Your own site
<a href="https://agentmods.dev/skills/vercel-labs/native/ts-core"><img src="https://agentmods.dev/badge/skills/vercel-labs/native/ts-core/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 ts-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/vercel-labs/native/ts-core"><img src="https://agentmods.dev/badge/skills/vercel-labs/native/ts-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 34,638 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. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00000 $0.34638
Opus 5.5 $0.00000 $0.13855
Sonnet 5.5 $0.00000 $0.06928
Haiku 4.5 $0.00000 $0.03464

Measured 5d ago against content hash 53e54fc54e24, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ts-core 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 5d 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.

skill-data/ts-core/SKILL.md · 704 lines

How it starts

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

Author app cores in the TypeScript subset

TypeScript is the primary app-authoring language. An app core is a Native SDK app's deterministic logic: Model (the app state), Msg (a discriminated union of everything that can happen), update(model, msg) (the one pure transition function), and the pure helpers they call. You write it as a TypeScript module rooted at src/core.ts - splitting into more modules under src/ when it grows (see "Splitting a core into modules") - and the build checks the whole import graph with the @native-sdk/core frontend and compiles it to native code with the external core compiler. No JS engine ships in the binary — the program either passes the subset checker and compiles to native, or you get a teaching error naming the rule, the fix, and the reason. The same file is executable TypeScript: it typechecks with stock tsc and runs unmodified under node, so you can poke behavior with plain node scripts before the native build.

A whole TS app starts as three files of truth and zero Zig: src/core.ts (this guide; plus core-class modules it imports under src/), src/app.native (the markup view over the core's model), and app.json (windows, identity, permissions). Existing app.zon manifests remain supported. Optional ordinary-TypeScript service modules live under src/services/ and are never imported by the core; load native skills get ts-services for that boundary. native init scaffolds the three-file base; the build detects src/core.ts in the tree (never a flag or config — a tree with both src/core.ts and src/main.zig is a teaching error) and generates the wiring outside the app. The loop:

native dev --core   # the fastest loop: run the core under node's virtual host —
                    # dispatch Msgs as JSON lines ({"kind":"add"}, {"$bytes":"…"}
                    # for bytes payloads, {"advance":1000} to run virtual timers),
                    # watch the model + effect transcript. Logic only, no renderer.
native dev          # build and run the real app (markup hot reload)
native check        # subset-check core.ts + validate markup + app.json/app.zon
native build        # ReleaseFast binary; native test runs the app's tests

The complete reference app in this idiom is examples/soundboard in the SDK repo: the soundboard music library as three files and zero Zig — const catalog tables, REAL audio through the Cmd.audioPlay stream, scrub-to-seek on a markup slider, a motion-gated Sub.timer playback clock, the full text-edit engine on a search field, controlled scroll, registered cover assets, the width-adaptive grid through the frame channel, clipboard, and context menus, with an end-to-end suite driving the shipping markup.

Read the full file on GitHub · 704 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. 5d ago Changed 53e54fc54e24
  2. 8d ago Changed 59e3a70d6ec2
  3. 11d ago Changed · +47 lines dfe016277e0c
  4. 12d ago Changed · +3 lines 47dd07a102f8
  5. 15d ago Changed · +23 lines 8a262202a60f
  6. 16d ago Changed · +27 lines 26dc33662d3a
  7. 20d ago Changed · +4 lines e5194d8347dc
  8. 1mo ago Changed 9ad346049fae
  9. 1mo ago First seen · 600 lines · 0 tokens per session scan A c78ab0799308

Subscribe to this mod's changes

ts-core is a skill published in the GitHub repository vercel-labs/native (7,804 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 34,638 tokens. 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 skills, from other repositories

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

league-akari-shard-development

Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.

LeagueAkari/LeagueAkari · 58 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

typescript-magician

Designs complex generic types, refactors any types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing any types, strict typing, type errors, infer, extends…

mcollina/skills · 108 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens