Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

8 Agent Skills and my first MCP server published to npm

说明与用途

文章描述了使用 semantic‑release 进行版本控制、npm CLI 通过 OIDC 进行发布,以及 GitHub Actions 进行 CI 的自动化流程,用于将八个代理技能和 MCP 服务器发布到 npm。

问题

Repetitive manual re‑solving of the same problems and difficulty publishing npm packages with OIDC trusted publishing.

结果

Eight reusable Agent Skills and an MCP server are now publishable, installable, and versioned automatically. The publishing process is fully CI‑driven, uses OIDC for trusted publishing, and eliminates manual steps after the initial bootstrap.

工作流

  • Create a skills repository with a skills/ directory split into external/, local/, and general/ categories.
  • Write each skill’s SKILL.md with a decision guide, progressive disclosure, trigger‑eval, and plain ASCII content.
  • Publish the skills package to npm using npx skills add commands for each skill.
  • Set up two GitHub Actions workflows: pr-test-mcp-servers.yml to lint, typecheck, build, and test on PRs; build-publish-mcp-servers.yml to version with semantic‑release and publish via npm CLI with OIDC when the version changes.
  • Handle four gotchas: manual first publish, correct bin path, proper npmrc configuration, and ensuring provenance signing.
  • Use npm publish --provenance after semantic‑release updates the local version.
  • Verify the published version matches the local version before publishing.

证据

This is the part that cost me more than ten CI commits to get right.

来源

The split that solved it: semantic-release handles versioning; the npm CLI handles publishing through OIDC.

来源

  • 记录日期: 2026-09-12T02:01:34.398Z