add-export

add-export is a skill for Claude Code from cyanheads/stackexchange-mcp-server. It costs 50 tokens per session (729 once invoked), scanned A, a copy of add-export, Apache-2.0.

A workflow for adding a new public subpath to a TypeScript package. A subpath is an import such as `package/newutil` that exposes a specific part of the package to other developers.

In plain words
What is it for?
Use it when creating a new public utility or API entry point that should be imported through its own package subpath.
Why use it?
It keeps the source entry point, compiled files, package export map, and repository documentation aligned. This prevents consumers from importing a path that the published package does not actually expose.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the stackexchange-mcp-server plugin — 37 skills, 1 MCP server shipped together

Good fit Use it when creating a new public utility or API entry point that should be imported through its own package subpath.

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

Made for: Claude Code.

Or install stackexchange-mcp-server, the plugin that ships this one along with the rest of its 37 skills, 1 MCP server.

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/stackexchange-mcp-server/add-export/github.svg)](https://agentmods.dev/skills/cyanheads/stackexchange-mcp-server/add-export)
Your own site
<a href="https://agentmods.dev/skills/cyanheads/stackexchange-mcp-server/add-export"><img src="https://agentmods.dev/badge/skills/cyanheads/stackexchange-mcp-server/add-export/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 add-export

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyanheads/stackexchange-mcp-server/add-export"><img src="https://agentmods.dev/badge/skills/cyanheads/stackexchange-mcp-server/add-export.svg" alt="Reviewed on agentmods" width="80" 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 729 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 86% copy Near-identical to another mod 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.00729
Opus 5.5 $0.00020 $0.00292
Sonnet 5.5 $0.00010 $0.00146
Haiku 4.5 $0.00005 $0.00073

Measured 7d ago against content hash bc4baacfbde0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 7d 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

This is a copy

86% identical to add-export — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

framework-skills/add-export/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 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. Regenerate the public API manifest — bun run scripts/public-api-contract-update.ts rewrites PUBLIC_RUNTIME_EXPORTS in scripts/public-api-contract.ts from the live barrels; never edit it by hand

  5. Verify with bun run devcheck and bun run test:package — the package lane builds, packs, installs, and imports every subpath in the manifest, so a wrong dist/ path or a missing export fails there

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
  • Public API manifest regenerated with bun run scripts/public-api-contract-update.ts
  • bun run devcheck passes
  • bun run test:package passes

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

Subscribe to this mod's changes

add-export is a skill published in the GitHub repository cyanheads/stackexchange-mcp-server (2 stars, last pushed 8d ago), licensed Apache-2.0. It adds 50 tokens to every session and 729 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to add-export, differing in 0 lines, and is treated as a copy.

Related

add-export compared with skills from other repositories

add-export next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-exportcyanheads/stackexchange-mcp-serverSkill28d agoApache-2.0A50Claude Code
api-errorscyanheads/pubmed-mcp-serverSkill1726d agoApache-2.0A54Claude Code
api-errorscyanheads/open-meteo-mcp-serverSkill1412d agoApache-2.0A54Claude Code
api-errorscyanheads/secedgar-mcp-serverSkill1212d agoApache-2.0A54Claude Code
trpcPlazmodium/odin-workflowSkill06mo agoMITA35Claude Code, Codex
api-contextcyanheads/internet-archive-mcp-serverSkill4todayApache-2.0A84Claude Code
api-errorscyanheads/internet-archive-mcp-serverSkill4todayApache-2.0A54Claude Code