sanity-tsdown-config
Skill by sanity-io
Configures Sanity libraries with the @sanity/tsdown-config wrapper around tsdown. It is for developers creating or editing tsdown.config.ts in a Sanity package.
Install sanity-tsdown-config
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.claude/skills && cp -r /tmp/sanity/.agents/skills/sanity-tsdown-config ~/.claude/skills/sanity-tsdown-configRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sanity/.agents/skills/sanity-tsdown-config ~/.gemini/antigravity-cli/skills/sanity-tsdown-configAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install sanity-tsdown-config in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides the setup of @sanity/tsdown-config, Sanity's opinionated wrapper around tsdown. It explains the wrapper's publishing defaults, such as the neutral platform, ESM output, source maps, publint checks, and generated package exports. It also covers opt-in features like the React Compiler, styled-components, CSS and vanilla-extract extraction, bundle analysis, and TSDoc checks.
The skill tells the assistant when to use PackageOptions and when to reach stock tsdown options through mergeConfig. It also lists options to avoid by default and explains when to choose @sanity/pkg-utils instead. It is for developers building Sanity libraries who need to create or edit tsdown.config.ts.
Written from the project's SKILL.md and checked against it.
What it can do
- Create tsdown.config.tsSets up defineConfig with PackageOptions for a Sanity package using a distribution tsconfig.
- Publishing defaultsExplains defaults such as the neutral platform, ESM format, source maps, and publint validation.
- Package exportsCovers generated exports and the devExports option for pnpm projects.
- React CompilerEnables the Oxc React Compiler by default, or the Babel implementation for specific features.
- styled-componentsAdds display names, stable component IDs, and minified tagged CSS using Oxc's native transform.
- CSS and vanilla-extractExtracts vanilla-extract and plain CSS into bundled stylesheets with conditional exports.
- Bundle analysisEnables an opt-in dist/analyze-data.md report for bundle inspection.
- TSDoc checksRuns API Extractor after the build to check TSDoc syntax and release tags.
- Stock tsdown optionsUses mergeConfig to pass tsdown options the wrapper does not expose directly.
- Choose a Sanity toolHelps decide between this wrapper and @sanity/pkg-utils based on the build's needs.
What you need
- Node.js ^22.18.0, ^24.11.0, or >=26.0.0
- pnpm
- tsdown
- oxc-transform-react for the default React Compiler implementation
- @tsdown/css for the css option
Try asking
- Set up tsdown.config.ts for my Sanity package with TSDoc checks enabled
- Enable the React Compiler in my Sanity library's tsdown config
- Merge the stock tsdown option hash: false into my Sanity build config
Good to know
- The exports feature rewrites package.json on every build, including when CI=true.
- The reactServer option is experimental and creates two module instances across conditions.
- The TSDoc check validates emitted entry declarations and does not replace TypeScript type-checking.
- The neutral platform is the default; 'node' can emit CommonJS interop that crashes browser bundles.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/sanity-tsdown-config/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB
Alternatives to sanity-tsdown-config
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sanity-tsdown-config: common questions
Should I use raw tsdown or this wrapper for a Sanity package?
The source says to keep the wrapper unless the package explicitly does not want Sanity's library conventions. Generic tsdown concepts are covered by the separate tsdown skill.
When should I use @sanity/pkg-utils instead?
Use @sanity/pkg-utils and pkg build when a conventional Sanity package already describes its entries in package.json#exports. Use this wrapper when the build needs arbitrary tsdown options or multiple configs.
Why are source maps enabled by default?
The wrapper sets sourcemap to true, while stock tsdown defaults to false.
How do I install sanity-tsdown-config?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sanity-tsdown-config free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sanity-tsdown-config safe to use?
It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sanity-tsdown-config?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
