Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

sanity-tsdown-config

Skill by sanity-io

Configures Sanity library builds with @sanity/tsdown-config, covering publishing defaults, React Compiler, CSS extraction, TSDoc checks and stock tsdown composition. It is for developers creating or editing tsdown.config.ts in a Sanity package.

  • Score 58
  • 28 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install sanity-tsdown-config

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sanity-io/pkg-utils /tmp/pkg-utils && mkdir -p ~/.claude/skills && cp -r /tmp/pkg-utils/skills/sanity-tsdown-config ~/.claude/skills/sanity-tsdown-config

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install sanity-tsdown-config in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an assistant through Sanity's opinionated wrapper around tsdown, the @sanity/tsdown-config package. It explains the wrapper's defaults, such as the neutral platform, ESM output, source maps, generated package exports, publint and circular dependency checks. It also shows how to use the common PackageOptions, opt-in features like React Compiler, styled-components, CSS and vanilla-extract, bundle analysis and TSDoc checks, and how to reach stock tsdown options through mergeConfig. The skill points to a separate tsdown skill for generic tsdown concepts. It is aimed at developers who maintain Sanity libraries and need to decide between PackageOptions and stock tsdown options.

Written from the project's SKILL.md and checked against it.

What it can do

  • Explain wrapper defaultsDescribes the platform, format, source map, exports, validation and dependency defaults the wrapper sets.
  • Set up tsdown.config.tsShows how to create a tsdown.config.ts that calls defineConfig with a distribution tsconfig.
  • Configure PackageOptionsCovers the common package options the wrapper exposes, such as entry, format, deps and tsdoc.
  • React Compiler setupExplains enabling reactCompiler with the Oxc default or the Babel reference implementation.
  • styled-components supportDescribes enabling styledComponents for display names, stable IDs and minified tagged CSS.
  • CSS and vanilla-extractCovers extracting vanilla-extract and plain CSS output, minification and sideEffects settings.
  • Bundle analysisShows how to enable an opt-in bundle analyzer that emits dist/analyze-data.md.
  • TSDoc checksExplains turning on API Extractor checks for TSDoc syntax and release tags after the build.
  • Compose stock tsdown optionsShows using mergeConfig to add stock tsdown options the wrapper does not expose.
  • Choose between Sanity toolsAdvises when to use @sanity/pkg-utils and pkg build instead of the wrapper directly.

What you need

  • Node.js ^22.18.0, ^24.11.0 or >=26.0.0
  • pnpm
  • Optional: oxc-transform-react for React Compiler
  • Optional: @tsdown/css for CSS support

Try asking

  • Set up a tsdown.config.ts for my Sanity package using the wrapper defaults
  • Enable React Compiler in my tsdown config and tell me what to install
  • Add a mergeConfig override to my tsdown config for the hash option

Good to know

  • The React Server variant is experimental and creates two module instances across conditions.
  • The wrapper rewrites package.json exports on every build, including when CI=true.
  • Output is compressed but not fully minified by default.
  • Not intended for standalone executables, and TSDoc checks do not replace TypeScript type-checking.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/sanity-tsdown-config/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to sanity-tsdown-config

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

sanity-tsdown-config: common questions

Should I use a raw tsdown config for a Sanity package?

The skill advises against replacing the wrapper with a raw tsdown config unless the package explicitly does not want Sanity's library conventions.

Why does the wrapper use the neutral platform by default?

The neutral platform is deliberate for isomorphic packages. The skill warns that 'node' can emit CommonJS interop that crashes browser bundles.

When should I use pkg-utils instead of this wrapper?

Use @sanity/pkg-utils and pkg build when a conventional package already describes its entries in package.json exports. Use the wrapper for arbitrary tsdown options, multiple configs or reactServer.

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 58 of 100. Grades: maintenance A, licence A, quality C. 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.

sanity-tsdown-config Install

Add to stack

Loading.