add-export

add-export is a skill for Claude Code, Codex from cyanheads/mcp-ts-core. It costs 50 tokens per session (791 once invoked), scanned A, original, Apache-2.0.

A guide for adding a public subpath import to the @cyanheads/mcp-ts-core TypeScript package. A subpath import lets users load a specific part of a package through a separate name.

In plain words
What is it for?
Use it when creating a new public API entry point that consumers should import from a dedicated package subpath.
Why use it?
It keeps source files, compiled output, package export settings, documentation, and build configuration synchronized.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it when creating a new public API entry point that consumers should import from a dedicated package subpath.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cyanheads/mcp-ts-core/add-export
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 cyanheads/mcp-ts-core --skill add-export
Clone the repo
git clone --depth 1 https://github.com/cyanheads/mcp-ts-core

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 add-export

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyanheads/mcp-ts-core/add-export.svg)](https://agentmods.dev/skills/cyanheads/mcp-ts-core/add-export)
Your own site
<a href="https://agentmods.dev/skills/cyanheads/mcp-ts-core/add-export"><img src="https://agentmods.dev/badge/skills/cyanheads/mcp-ts-core/add-export.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 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
  • 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.00050 $0.00791
Opus 5 $0.00025 $0.00396
Sonnet 5 $0.00010 $0.00158
Haiku 4.5 $0.00005 $0.00079

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

Security

Grade A, and why

add-export 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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/add-export/SKILL.md · 63 lines

How it starts

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

Context

Subpath exports are defined in package.json under the exports field. Each subpath maps to a source entry point that gets compiled to dist/. The exports catalog in CLAUDE.md/AGENTS.md must stay in sync with package.json.

The build uses tsconfig.build.json (not tsconfig.json) with rootDir: ./src and include: ["src/**/*"]. This means every source file at src/foo/bar.ts compiles to dist/foo/bar.js — the dist/ path in each export entry must match wherever tsc produces the compiled output for the named source file. Choose your source file location to produce the dist/ path you want in the export entry.

Steps

  1. Create the entry point source file under src/ (e.g., src/utils/new-util.ts)

  2. Add the subpath to package.json exports, mirroring the source path:

    // source: src/utils/new-util.ts → dist: dist/utils/new-util.js
    "./newutil": {
      "types": "./dist/utils/new-util.d.ts",
      "import": "./dist/utils/new-util.js"
    }
    
  3. Update the exports catalog in both CLAUDE.md and AGENTS.md — add a row to the table. These files must stay byte-identical; the simplest approach is cp CLAUDE.md AGENTS.md after editing

  4. Build with bun run build to generate dist/ output

  5. Verify the export resolves through the package's exports map:

    # Confirm the compiled file exists at the expected dist path
    ls dist/utils/new-util.js
    
    # Confirm the subpath export resolves correctly (tests the exports map, not just the dist file)
    bun -e "import('@cyanheads/mcp-ts-core/newutil').then(m => console.log(Object.keys(m)))"
    
  6. Run bun run devcheck to verify

Naming conventions

Convention Rule
Subpath all-lowercase, no underscores (e.g., utils, storage/types, testing/fuzz)
Source file kebab-case (e.g., error-handler.ts)
Export name camelCase for values, PascalCase for types

Checklist

  • Source entry point file created with JSDoc header
  • Subpath added to package.json exports with types and import conditions
  • Exports catalog updated in both CLAUDE.md and AGENTS.md (must be byte-identical)
  • If the new export has optional peer dependencies: entries added to both peerDependencies and peerDependenciesMeta in package.json
  • bun run build succeeds
  • Compiled file exists at expected dist/ path and subpath import resolves correctly
  • Integration test at tests/integration/package-consumer.int.test.ts updated: new subpath added to the import spec list and toHaveLength count incremented
  • bun run devcheck passes

Read the full file on GitHub · 63 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. 8d ago First seen · 63 lines · 50 tokens per session scan A 8e515f380b9f

Subscribe to this mod's changes

add-export is a skill published in the GitHub repository cyanheads/mcp-ts-core (150 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 791 once invoked, about $0.0003 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 skills, from other repositories

typescript-lsp

Search TypeScript SYMBOLS (functions, types, classes) - NOT text. Use Glob to find files, Grep for text search, LSP for symbol search. Provides type-aware results that understand imports, exports, and relationships.

youdotcom-oss/dx-toolkit · 51 tokens

gw1-build-assistant

Use when the user asks about Guild Wars 1 (the original 2005 game, not GW2) — designing or reviewing skill bars, decoding or producing template codes (strings like "OgCjkurIrSuXaXPXBYihygvlYcA"), hero team composition, skill lookups or comparisons, or pasting a paw-ned2 team blob ("pwnd0001..."). Use the gw1-mcp tools…

Graphmaxer/gw1-mcp · 127 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/pubmed-mcp-server · 54 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/secedgar-mcp-server · 54 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/shift-mcp-server · 54 tokens

basic-inline-skill

A minimal instruction-only skill with inline content and the function builder alternative.

agentfront/frontmcp · 19 tokens