speclite-npm-publisher

speclite-npm-publisher is a skill for Claude Code from flanliulf/SpecLite. It costs 142 tokens per session (1,679 once invoked), scanned A, original, MIT.

A release workflow for publishing Node.js packages to npm, the public package registry for JavaScript and Node.js code.

In plain words
What is it for?
Use it to prepare versions, run release checks, create and test the real npm package archive, publish it, and verify the result.
Why use it?
It checks the package, version, tests, files, credentials, Git state, and installed package before publishing to reduce release mistakes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Good fit Use it to prepare versions, run release checks, create and test the real npm package archive, publish it, and verify the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/flanliulf/speclite/speclite-npm-publisher
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add flanliulf/SpecLite --skill speclite-npm-publisher
Clone the repo
git clone --depth 1 https://github.com/flanliulf/SpecLite

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for speclite-npm-publisher

README.md
[![agentmods](https://agentmods.dev/badge/skills/flanliulf/speclite/speclite-npm-publisher/github.svg)](https://agentmods.dev/skills/flanliulf/speclite/speclite-npm-publisher)
Your own site
<a href="https://agentmods.dev/skills/flanliulf/speclite/speclite-npm-publisher"><img src="https://agentmods.dev/badge/skills/flanliulf/speclite/speclite-npm-publisher/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for speclite-npm-publisher

Your own site · 80×15
<a href="https://agentmods.dev/skills/flanliulf/speclite/speclite-npm-publisher"><img src="https://agentmods.dev/badge/skills/flanliulf/speclite/speclite-npm-publisher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.01679
Opus 5 $0.00071 $0.00839
Sonnet 5 $0.00028 $0.00336
Haiku 4.5 $0.00014 $0.00168

Measured 8d ago against content hash 8155ec5c76b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

speclite-npm-publisher scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/source/speclite/sdlc-skills/5-devops/speclite-npm-publisher/SKILL.md · 61 lines

What it actually says

[Overview(技能说明)] 面向开源 Node.js 项目的 npm 发布执行 Skill。它把 bugfix / feature 完成后的版本升级、发布前事实审计、中文 Conventional Commit、GitHub push、真实 tarball smoke、本机半自动 npm publish、Claude/Codex hook 防护、发布后延迟验证和故障恢复串成可复用流程,避免版本复用、脏工作树发包、镜像 registry 凭据混淆、.bin 入口失效和 read-side propagation delay 误判。

[Core Capabilities(核心能力)] - 发布意图确认:区分"如何发布"、"检查是否可发布"和"实际执行发布",只有用户明确授权并确认 package@version 后才运行 npm publish。 - SpecLite 迭代发布 SOP:为 bugfix / feature 后的常规交付串联 SemVer 选择、npm version --no-git-tag-version、release gate、提交、推送、publish 和延迟复核。 - Package 契约审计:从 package.json 和真实文件抽取 nameversionlicensebinexportsfilespublishConfigrepositoryhomepagebugs 和 scripts。 - 官方 registry 凭据检查:固定使用 https://registry.npmjs.org/ 验证 npm whoami,识别默认 registry 为镜像时的凭据分离风险。 - 版本占用判断:发布前检查目标版本是否已存在,已发布版本绝不复用,按 SemVer 选择新版本后重跑门禁。 - Git 提交推送门禁:吸收中文 Conventional Commit、精确 git add -- <files>、敏感文件扫描、origin/main 推送和 clean HEAD 发布规则。 - Release gate 编排:优先运行项目已有 release:check,否则基于现有 scripts 组合 build、test、lint、typecheck 和项目特定检查。 - Tarball smoke 验证:使用 npm pack 生成真实 tarball,在干净临时目录安装,并按包类型执行 CLI 或 library smoke。 - Hook guardrails:为 Claude/Codex hooks 定义可阻断的危险命令和状态检查,将 hooks 作为防护层而非发布编排层。 - 发布后复核:验证 npm viewdist-tags、干净 npx 或 clean install,处理 npm registry / search / CDN 传播延迟。 - 故障经验沉淀:覆盖 E401ENEEDAUTHEOTPE404 PUT scoped packageE403、tarball 漏文件、.bin symlink 和本地 npx 误解析。

[Workflow(执行流程)] 本 Skill 采用顺序工作流 + 领域规则门禁。执行细则、命令矩阵、错误处理和报告模板见 references/speclite-npm-publisher-workflow.md;入口只保留阶段路由。

Step 1:确认边界与授权
    判断用户要咨询、审计、准备还是实际发布。实际发布前必须展示目标 `package@version`、registry、publish command 和验证计划,并等待用户确认。

Step 2:建立发布契约
    读取 reference 的 Contract Audit 部分,从 `package.json`、构建产物和 git 状态抽取事实;如果不是开源 Node.js npm package,或 `private: true` 未获明确覆盖,停止。

Step 3:规划版本并执行发布前门禁
    对 bugfix / feature 按 SemVer 选择目标版本,在提交前执行 `npm version <version> --no-git-tag-version`,同步 version-bound 文件,并按 reference 的 Prepublish Gates 验证 official registry 登录、版本未占用、metadata、scripts、构建、测试和真实 tarball smoke。

Step 4:提交推送并建立 clean 发布上下文
    按 Commit and Push Gate 使用中文 Conventional Commit、精确暂存和 `origin/main` 推送。正式发布必须来自 clean `HEAD` 或 clean worktree,不从脏工作树发包。

Step 5:本机半自动发布与异常处理
    仅在用户确认后运行 publish。scoped public package 使用 `--access public`;unscoped package 不强行添加 scoped-only 语义。OTP、password、token 只在终端交互输入,agent 只解析 publish 输出。

Step 6:发布后验证与报告
    按 reference 的 Postpublish Verification 复核 npm metadata、dist-tag、clean `npx` 或 clean install。若 read-side 暂时 404,但 publish 迹象已成立,等待重试,不重复发布同一版本。

[Notes(注意事项)] - 只修改用户明确要求的项目文件;发布前发现 metadata、README、LICENSE、bin 或 release script 缺口时,先列出建议并等待授权。 - 所有包名、版本、bin 名、入口文件和 scripts 必须来自 package.json 与真实文件,不凭经验猜测。 - 不记录 password、token、OTP、recovery code;不把敏感凭据写入脚本、文档、日志、聊天记录或 shell history。 - 不在源码仓库根目录用 npx <package>@<version> 判断远端包;使用干净临时目录,避免本地 package 影响解析。 - 不从 dirty worktree 运行 npm publish;如果发布内容会进入 tarball,必须在 publish 前提交并推送。 - 不复用已发布版本号,不为绕过发布错误回退版本,也不为了通过门禁改变核心功能需求。 - Claude/Codex hooks 只负责 deterministic 防护和阻断,不替代 SemVer 决策、发布报告、人工 OTP 或 postpublish 判断。 - 本 Skill 负责发布执行;README 和发布文档专项审查可配合 npm-release-docs-checker。 - 生成的发布报告写入 .specskills/output/devops/speclite-npm-publisher/,不得散落到项目根目录。

[Generation Metadata(生成信息)] 本 Skill 由 speclite-skill-creator 自动生成。如需修改,必须同步更新 SKILL.md 与 SKILL.en.md,并同步 assets/source/speclite/sdlc-skills/5-devops/speclite-npm-publisher/ 与实际安装副本,或通过 skills-upgrade 管理版本。

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 61 lines · 142 tokens per session scan A 8155ec5c76b2

Subscribe to this mod's changes

speclite-npm-publisher is a skill published in the GitHub repository flanliulf/SpecLite (4 stars, last pushed 2mo ago), licensed MIT. It adds 142 tokens to every session and 1,679 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.