Appearance
publish-pptb-tool
This skill drives a PPTB tool through the full publishing path — from a finalized package.json to a registry submission — running each of the seven documented steps in order and stopping to surface anything that needs the developer's attention (a missing required field, a failed build, a validation error) before moving on.
Publishing is a seven-step path — prepare the manifest, build, validate locally, finalize the package, publish to npm, test the published version, then submit to the registry — and every step before registry submission is something you can verify yourself.
When to use it
- "Publish my tool."
- "Get this tool ready for the PPTB registry."
- "Walk me through publishing to npm and submitting to the toolbox."
- "I built my tool — what's left before it's public?"
- As the final step after
add-error-handling,validate-pptb-tool, and any agent/inter-tool integration work is complete.
Inputs
- The tool's
package.jsonand current field values. - The build tooling in use (no bundler +
shx, Vite, or Webpack) — this determines how the icon reachesdist/. - Whether this is a first-time npm publish (needs
npm login) or a version bump on an existing package. - The type of change since the last release (bug fix, new feature, breaking change) to pick the right version bump.
- Tags/categories for the registry submission (up to 3, from the approved list).
What it does
- Prepares the manifest — checks/fills required
package.jsonfields:name(scoped,@org/tool-name),displayName,description,main(usuallyindex.html),icon(an SVG path relative todist, usingfill="currentColor"),contributors,license(an approved license),configurations(repository URL, optional website/docs link),cspExceptions, andfeatures(e.g.multiConnection,minAPI). Confirms the icon-copy mechanism matches the build tool:shxcopy scripts (no bundler),public/folder (Vite), orcopy-webpack-plugin(Webpack). - Builds — runs
npm run buildand verifiesdist/containsindex.html, the icon SVG at its declared path, all compiled JS/CSS, and any other required assets. - Validates locally — runs
npm run validateornpx pptb-validate, fixes any errors (warnings are optional-but-recommended). - Finalizes the package — runs
npm run finalize-packageto prepare the correct file structure and dependencies for npm. - Publishes to npm — runs
npm loginif needed, thennpm publish --access publicfor a scoped package (required for public scoped-package access) ornpm publishfor an unscoped one. Confirms withnpm view @your-org/your-tool-nameor the npmjs.com package page. - Tests the published version — opens Power Platform ToolBox's Debug section, installs the package by name via "Install from npm", and confirms it works from the published artifact, not just the local build.
- Submits to the registry — directs the developer to the Tool Submission Form at
powerplatformtoolbox.com/submit-tool(login required) with the npm package name and up to 3 tags from: Comparisons, Data, Development, Diagrams, Documentation, Environments, Migration, Solutions, Troubleshooting, Users & Security. - For version bumps on existing packages, picks the right Semantic Versioning command:
npm version patch(bug fixes),npm version minor(new backward-compatible features), ornpm version major(breaking changes). - Confirms README.md uses markdown only (no raw HTML — the registry doesn't render it for security reasons) and full URLs for external resources/images.
Example
bash
# Step 2: build
npm run build
# Step 3: validate
npm run validate
# ✓ All required fields present — exit code 0
# Step 4: finalize
npm run finalize-package
# Step 5: publish (scoped package)
npm publish --access public
npm view @my-org/record-pickerRegistry submission fields:
text
npm Package Name: @my-org/record-picker
Tags/Categories: Data, DevelopmentChecklist it enforces
- [ ]
package.jsonhas all required fields:name,version,displayName,description,main,icon,contributors,license. - [ ] The icon is present in
dist/at the path referenced bypackage.json, usingfill="currentColor". - [ ]
npm run buildcompletes anddist/contains everything needed to run the tool. - [ ]
npm run validate/pptb-validatepasses with no errors. - [ ]
npm run finalize-packagehas been run. - [ ] The package is published to npm (
npm viewconfirms it) and reinstalled/tested from npm via ToolBox's Debug > Install from npm flow. - [ ] The Tool Submission Form is completed with up to 3 relevant tags.
- [ ] README.md uses markdown only (no raw HTML) and full URLs for external resources.
Related
- Publishing Tools — the reference this skill is built on
- validate-pptb-tool — runs as this skill's Step 3
- add-error-handling — publishing best practices call for "proper error handling," worth applying before this skill runs