npm-publish SKILL.md skillA

npm-publish from strzhao/autopilot is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add strzhao/autopilot/npm-publish@git:20260321.6cde7e8

Pins git:20260321.6cde7e8 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
strzhao/autopilot
Path
plugins/npm-toolkit/skills/npm-publish/SKILL.md
Versions recorded
2
Latest version
git:20260321.6cde7e8, committed Mar 21, 2026
First version recorded
Mar 21, 2026
Size
4,671 bytes
Repository stars
32
License
MIT

配置 npm 包通过 GitHub Actions 自动发布到 npmjs.com。使用 OIDC Trusted Publishing(无需 npm token)。 当用户提到"发布 npm"、"npm publish"、"配置 npm 自动发布"、"npm 包发布"、"设置 npm CI/CD"、 "把包发到 npm"、"npm trusted publishing"、"OIDC 发布"时使用此技能。 也适用于用户已有项目想添加 npm 自动发布流程的场景,或者 npm publish 失败需要排查的场景。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# npm 自动发布配置指南

将 npm 包通过 GitHub Actions + OIDC Trusted Publishing 自动发布,无需管理 npm token。

## 核心知识

### Node 版本要求

OIDC Trusted Publishing 需要 npm CLI >= 11.5.1。各 Node 版本对应的 npm:

| Node 版本 | npm 版本 | 是否支持 Trusted Publishing |
|-----------|---------|--------------------------|
| Node 20   | npm 10.x | 不支持 |
| Node 22   | npm 10.9.x | 不支持 |
| Node 24   | npm 11.x+ | 支持 |

**必须使用 Node 24**,这是最常见的失败原因。

### Private 仓库限制

`--provenance` 签名仅支持 public 仓库。Private 仓库使用 `--provenance` 会报错:

```
Error verifying sigstore provenance bundle: Unsupported GitHub Actions source repository visibility: "private"
```

Private 仓库需要去掉 `--provenance` flag。

## 配置流程

### 第一步:确认 package.json 配置

确保 package.json 包含以下关键字段:

```json
{
  "name": "@scope/package-name",
  "version": "1.0.0",
  "files": ["dist", "README.md"],
  "publishConfig": {
    "access": "public"
  }
}
```

- scoped 包(`@xxx/yyy`)需要 `publishConfig.access: "public"`,否则默认 restricted
- `files` 字段控制发布内容,避免发布 src、node_modules 等

### 第二步:创建 GitHub Actions Workflow

创建 `.github/workflows/publish.yml`:

**Public 仓库(推荐,带 provenance):**

```yaml
name: Publish to npm

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add strzhao/autopilot/npm-publish@sha256:e4f2904c37e8f6f6

The line at the top of this page pins the label git:20260321.6cde7e8, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_cft6vlxbgwgwijcu.svg)](https://markdownregistry.com/a/art_cft6vlxbgwgwijcu)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, all committed on Mar 21, 2026.

versioncommittedcommitsizeaudit
git:20260321.6cde7e8 latest2026-03-21 6cde7e8 4,671 BA view · diff
git:20260321.2daedd82026-03-21 2daedd8 5,447 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (4671 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

strzhao/autopilot · 32 stars · license MIT · pushed 2026-10-28 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_cft6vlxbgwgwijcu
GET https://markdownregistry.com/api/v1/resolve?ref=strzhao/autopilot/npm-publish
GET https://markdownregistry.com/api/v1/blob/e4f2904c37e8f6f6c8678684d5f71f6ea9c13d54228c0b0ccc6aede5074104bb

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from strzhao/autopilot

autopilot-codex SKILL.md skill
strzhao/autopilot · .agents/skills/autopilot-codex/SKILL.md · 在 Codex 中使用本仓库的 autopilot 全闭环 runtime 时使用。适用于用户提到 /autopilot、自动驾驶、红蓝对抗、设计审批、五层 QA、或希望在 Codex 中继续使用 autopilot 的场景。不要在…
git:20260925.0f59687 · audit A · 32 stars
autopilot-commit-codex SKILL.md skill
strzhao/autopilot · .agents/skills/autopilot-commit-codex/SKILL.md · 在 Codex 中执行 autopilot 风格的智能提交时使用。适用于用户提到 autopilot commit、git commit、智能提交、提交代码、生成中文提交信息等场景。
git:20260330.f115aca · audit A · 32 stars
autopilot-doctor-codex SKILL.md skill
strzhao/autopilot · .agents/skills/autopilot-doctor-codex/SKILL.md · 在 Codex 中执行 autopilot doctor 时使用。适用于用户提到 doctor、工程健康诊断、为什么 autopilot 效果不好、Codex readiness、工程成熟度评估等场景。
git:20260330.f115aca · audit A · 32 stars
AGENTS.md@.codex AGENTS.md file
strzhao/autopilot · .codex/AGENTS.md
git:20260404.d87865b · audit A · 32 stars
CLAUDE.md CLAUDE.md file
strzhao/autopilot · CLAUDE.md
git:20261028.07f9c71 · audit A · 32 stars
autopilot-codex SKILL.md skill
strzhao/autopilot · codex/plugins/autopilot-codex/skills/autopilot-codex/SKILL.md · 在 Codex 中使用 autopilot 的全闭环 runtime 时使用。适用于用户提到 /autopilot、自动驾驶、设计审批、红蓝对抗、五层 QA,或希望在 Codex 中继续沿用 autopilot 方法论的场景。
git:20260925.0f59687 · audit A · 32 stars
autopilot-commit-codex SKILL.md skill
strzhao/autopilot · codex/plugins/autopilot-codex/skills/autopilot-commit-codex/SKILL.md · 在 Codex 中执行 autopilot 风格的智能提交时使用。适用于用户提到 autopilot commit、git commit、智能提交、提交代码、生成中文提交信息等场景。
git:20260330.f115aca · audit A · 32 stars
autopilot-doctor-codex SKILL.md skill
strzhao/autopilot · codex/plugins/autopilot-codex/skills/autopilot-doctor-codex/SKILL.md · 在 Codex 中执行 autopilot doctor 时使用。适用于用户提到 doctor、工程健康诊断、为什么 autopilot 效果不好、Codex readiness、工程成熟度评估等场景。
git:20260404.d87865b · audit A · 32 stars
autopilot-brainstorm SKILL.md skill
strzhao/autopilot · plugins/autopilot/skills/autopilot-brainstorm/SKILL.md · autopilot design 阶段需求探索专用。在写设计文档前通过逐个澄清问题理解用户意图,提出 2-3 方案让用户选择,输出共识总结到 brainstorm.md 后交回主 skill。当 autopilot skill 在…
git:20260927.fed289e · audit A · 32 stars
autopilot-commit SKILL.md skill
strzhao/autopilot · plugins/autopilot/skills/autopilot-commit/SKILL.md · 当用户需要提交代码、运行 git commit、或说"提交"时使用。
git:20260523.651ba81 · audit A · 32 stars
autopilot-doctor SKILL.md skill
strzhao/autopilot · plugins/autopilot/skills/autopilot-doctor/SKILL.md · 诊断项目工程健康度,评估 autopilot 兼容性并提供改进建议。当用户说"诊断"、"doctor"、"工程健康"、"为什么 autopilot 效果不好"时使用。
git:20260927.fed289e · audit B · 32 stars
autopilot-project SKILL.md skill
strzhao/autopilot · plugins/autopilot/skills/autopilot-project/SKILL.md · 管理 autopilot 项目模式的任务 DAG。当用户运行 /autopilot status(有项目时)或 /autopilot next 时提供上下文参考。
git:20261028.07f9c71 · audit A · 32 stars

Every file in strzhao/autopilot

Other files named npm-publish

npm-publish SKILL.md skill
kanevry/session-orchestrator · .agents/skills/npm-publish/SKILL.md · Use when publishing this package to npm — a version release (npm publish), verifying the registry/pi.dev listing, or…
git:20260921.72b3e60 · audit A · 52 stars
npm-publish SKILL.md skill
kanevry/session-orchestrator · .codex-plugin/skills/npm-publish/SKILL.md · Use when publishing this package to npm — a version release (npm publish), verifying the registry/pi.dev listing, or…
git:20260919.d92c2ca · audit A · 52 stars
npm-publish SKILL.md skill
kanevry/session-orchestrator · .cursor/skills/npm-publish/SKILL.md · Use when publishing this package to npm — a version release (npm publish), verifying the registry/pi.dev listing, or…
git:20260919.d92c2ca · audit A · 52 stars
npm-publish SKILL.md skill
kanevry/session-orchestrator · skills/npm-publish/SKILL.md · Use when publishing this package to npm — a version release (npm publish), verifying the registry/pi.dev listing, or…
git:20261021.3c1bbd7 · audit A · 52 stars
npm-publish SKILL.md skill
wangjs-jacky/jacky-skills · plugins/knowledge-base/skills/npm-publish/SKILL.md · npm 发布兼容入口:发布包、配置 CI/Trusted Publishing、排查认证或版本冲突时,先读取 release-ops 的 npm 平台与 operation,按项目实际发布方式执行并自动维护经验。
git:20261015.c21ad69 · audit A · 15 stars

Browse by kind, by grade A, or by owner.