Publish Config
SkillDev toolspublishConfig rules for public npm packages in the Trezor Suite monorepo. Use when adding or editing publishConfig, exports, or preparing a package for npm publishing.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Publish Config skill
What this skill tells your AI
The instructions your AI receives, as published by trezor/trezor-suite in skills/publish-config/SKILL.md and read by ahel’s review.
Validated by requirePublishConfig in @trezor/requirements (packages/requirements/src/requirements/package-json/requirePublishConfig.ts).
Applies to any package with publishConfig.
Rules
- Top-level
main— required (e.g."./src/index.ts"). files— must include"lib/".publishConfig.mainandpublishConfig.types— both required.publishConfig.exports["."].defaultandpublishConfig.exports["."].types— must export the same files as in Rule 3.- Wildcard exports — (
./lib/*) must be a passthrough string ("./lib/*") — an object would double the.jsextension. - Explicit (non-wildcard) exports — not shape-checked (intentional overrides). Typically used to route a directory import to its
index.js, e.g."./lib/protocol-thp": { "types": "./lib/protocol-thp/index.d.ts", "default": "./lib/protocol-thp/index.js" }— without this, the wildcard would resolve toprotocol-thp.jsinstead ofprotocol-thp/index.js. - Key order —
"types"must come before"default"in every condition object (recursive). TypeScript evaluates conditions in declaration order. type— must declare top-level"type": "module". Do not duplicate it underpublishConfig.type—publishConfigwould only shadow the top level with the same value at publish time, so we keep a single source of truth.
Example
{
"name": "@trezor/example",
"main": "./src/index.ts", // Rule 1
"type": "module", // Rule 8
"files": ["lib/", "CHANGELOG.md"], // Rule 2
"publishConfig": {
"main": "./lib/index.js", // Rule 3
"types": "./lib/index.d.ts", // Rule 3
"exports": {
".": {
// Rule 4: exact shape required
"types": "./lib/index.d.ts", // Rule 7: "types" before "default"
"default": "./lib/index.js",
},
// Rule 5: ESM wildcard — passthrough string
"./lib/*": "./lib/*",
},
},
}
Signals
- GitHub stars
- 1k
- Forks
- 375
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
publish-config- Source
- github.com/trezor/trezor-suite