skills/publishing-npm/SKILL.md
Prepare and publish an npm package that ships agent skills, following the skills-npm convention for skill bundling and distribution.
npx skillsauth add abuxton/skills publishing-npmInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Configure an npm package to bundle and publish agent skills following the skills-npm convention, so consumers can symlink them automatically with skills-npm.
You are an expert in npm package publishing, the agentskills.io specification, and the skills-npm distribution convention. You understand how to structure package.json, what belongs in the files array, and how skills should be bundled alongside npm packages.
package.json correctly for publishing skills to npmfiles fieldCheck the skills directory — Confirm a skills/ directory exists at the package root and contains at least one skill subdirectory, each with a SKILL.md file:
skills/
└── <skill-name>/
└── SKILL.md
If skills are missing, create them first using the writing-skills skill.
Create or update package.json — Ensure the following fields are present and correct:
{
"name": "<package-name>",
"version": "1.0.0",
"description": "<description>",
"license": "<SPDX-identifier>",
"repository": {
"type": "git",
"url": "git+https://github.com/<owner>/<repo>.git"
},
"homepage": "https://github.com/<owner>/<repo>#readme",
"bugs": {
"url": "https://github.com/<owner>/<repo>/issues"
},
"keywords": ["skills", "agent-skills", "agentskills"],
"files": [
"skills"
]
}
name: use a scoped name (@org/package) when publishing under an organisationfiles: must include "skills" so the skills directory is included in the published tarballkeywords: include agent-skills and agentskills to improve discoverabilityUpdate .gitignore — Add the following entries to prevent committing symlinks created by skills-npm in consuming projects, and to ignore installed dependencies:
node_modules/
skills/npm-*
Verify the publish tarball — Run a dry-run publish to confirm the skills/ directory is included:
npm pack --dry-run
Confirm the output lists skills/<skill-name>/SKILL.md for each skill.
Update the README — Add installation and usage instructions for consumers. At minimum, include
an ## npm section with:
Installation: npm install <package-name>
Skill symlink: npx skills-npm
A "prepare" script in package.json to automate symlinking on install, for example:
{
"scripts": {
"prepare": "npx skills-npm"
}
}
Publish the package — Authenticate with the npm registry and publish:
npm login
npm publish --access public
For scoped packages, --access public is required unless publishing to a private registry.
Verify the published package — After publishing, confirm the skills are accessible:
npm pack <package-name> --dry-run
npx skills-npm
files field in package.json acts as an allowlist. Without "skills" in it, the skills/ directory will not be included in the published tarball even if it exists locally.skills-npm convention are symlinked to skills/npm-<package-name>-<skill-name> in the consuming project. The skills/npm-* pattern in .gitignore prevents these symlinks from being committed.npm link or a relative path in package.json dependencies.npm version patch|minor|major to bump the version before publishing updates.writing-skills checklist before publishing.development
Fetch a matching XKCD comic and generate validated Markdown or HTML embed output for docs or terminal use.
testing
Author high-quality agent skills following the agentskills.io specification, with correct frontmatter, workflow structure, and reference assets.
tools
Analyse a repository to identify its focus, technology stack, and labels, then search for and apply appropriate shields.io badges to markdown files.
tools
Create, manage, and organize GitHub Gists using the gh CLI. Use this skill whenever a user wants to create a gist, share code snippets, manage existing gists, add files to a gist, list or search gists, edit gist content or descriptions, clone a gist, or delete a gist. Every gist created or modified must include a README.md documenting its purpose and contents.