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.
npx agentmods add instructions/rolldown/tsdown/agents-mdgit clone --depth 1 https://github.com/rolldown/tsdownWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02608 | $0.02608 |
| Opus 5 | $0.01304 | $0.01304 |
| Sonnet 5 | $0.00522 | $0.00522 |
| Haiku 4.5 | $0.00261 | $0.00261 |
Grade A, and why
tsdown AGENTS.md 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to coding agents when working with code in this repository.
Project Overview
tsdown is a blazing-fast bundler for TypeScript libraries powered by Rolldown and Oxc. It's designed as a seamless migration path from tsup with enhanced performance and features.
Key technologies:
- Rolldown: Core bundler (Rust-based Rollup alternative)
- pnpm: Package manager (v11)
- Node.js:
^22.18.0 || ^24.11.0 || >=26.0.0(seeenginesin package.json) - Vitest: Testing framework
- TypeScript: Strict mode with isolated declarations enabled
- ESM: Pure ESM package (
"type": "module")
Development Commands
Building
# Build tsdown using itself (runs from source via Node's `dev` condition)
pnpm build
# Alias of `pnpm build`
pnpm dev
Testing
# Run all tests in watch mode
pnpm test
# Run tests without watch
pnpm test run
# Run a specific test file
pnpm test <file-pattern>
# Example: pnpm test src/config/options.test.ts
# Run with UI
pnpm test --ui
# Generate coverage
pnpm test --coverage
Code Quality
# Lint (ESLint with cache)
pnpm lint
# Fix lint issues
pnpm lint:fix
# Type check
pnpm typecheck
# Format code (Prettier)
pnpm format
Documentation
# Run docs dev server
pnpm docs:dev
# Build docs
pnpm docs:build
# Preview built docs
pnpm docs:preview
Architecture
Core Build Flow
CLI (src/run.ts → src/cli.ts)
→ build() (src/build.ts)
→ resolveConfig() (src/config/index.ts)
→ buildWithConfigs()
→ buildSingle() for each config
→ Hook: build:prepare
→ cleanOutDir()
→ getBuildOptions() → constructs Rolldown config
→ Hook: build:before
→ rolldownBuild() / rolldownWatch()
→ postBuild() → copy files, bundle processing
→ Hook: build:done
→ executeOnSuccess()
Configuration System
Multi-stage resolution pipeline:
- Load config file (
src/config/file.ts)- Searches for
tsdown.config.{ts,mts,cts,js,mjs,cjs,json}orpackage.json(tsdown field) - Supports multiple loaders:
native(Node.js native TS),tsx,unrun,auto(intelligent selection) - Can load from Vite/Vitest configs via
fromViteoption
- Searches for
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.
- 2d ago First seen · 322 lines · 2,608 tokens per session scan A f434c64cfb93
tsdown AGENTS.md is an instructions file published in the GitHub repository rolldown/tsdown (4,238 stars, last pushed 4d ago), licensed MIT. It adds 2,608 tokens to every session, about $0.0130 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.
Other instructions, from other repositories
heroui CLAUDE.md
Claude Code instructions for heroui-inc/heroui, covering claude.md, repository overview, key technical stack, development commands and core development commands.
heroui AGENTS.md
AGENTS.md instructions for heroui-inc/heroui, covering agents.md, repository overview, tech stack, monorepo structure and commands.
react CLAUDE.md
Claude Code instructions for react/react, covering react, monorepo overview and current active work.
legacy-lands-library AGENTS.md
Instructions for LegacyLands/legacy-lands-library, covering ✅ 开发与协作规范(学习与编程行为指南), 1. 当你尝试编写一个新功能、添加新类或书写 javadoc 时, 2. 你必须制定清晰的 todo 任务清单,并在开发完成后遵循以下规则:, 3. 命名规范(类、字段、变量、方法) and 4. 数据处理优先使用 stream api(尤其是过滤、映射、聚合等操作).
prb-math AGENTS.md
Instructions for PaulRBerg/prb-math, covering prbmath, stack, structure, commands and development.
bun AGENTS.md
AGENTS.md instructions for oven-sh/bun, a project described as: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one.