AT

afx-team/agent-skill-npm-boilerplate

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

25 stars 质量 61 趋势 11MIT

一个用于创建和发布 Claude Code 技能作为 npm 包的模板

概览

AI编码工具(Claude Code、Cursor、Windsurf)支持自定义“技能”——可重复使用的指令,扩展代理能力。但分发它们意味着手动复制文件、无法控制版本,且更新过程非常痛苦。 技能会成为真正的软件产物,包含语义版本管理、依赖管理、私有注册和全局发现。同样的基础设施也分发了React和Express。 分支这个模板,编辑 SKILL.md,运行 npm 发布。你的技能现在可以全球安装。 Claude Code、光标、风帆冲浪以及任何遵循类似技能模式的工具。参见 MULTI-TOOL-SUPPORT.md。 手动技能分发需要下载文件,复制到 ~/.claude/skills/,并每次更新重复。没有版本控制,没有依赖管理,没有发现。 - - 语义版本控制,轻松升级/回滚 - - 发布一次,通过npm的CDN全球获取 - - 可在npmjs上搜索。

概述(AI 翻译)

像其他NPM软件包一样分发AI代理技能

AI编码工具(Claude Code、Cursor、Windsurf)支持自定义“技能”——可重复使用的指令,扩展代理能力。但分发它们意味着手动复制文件、无法控制版本,且更新过程非常痛苦。

这个模板允许你把技能发布到npm:

这很重要的原因: 技能通过语义版本管理、依赖管理、私有注册和全局发现,成为真正的软件产物。与分发 React 和 Express 的基础设施相同。


快速启动: 分支此模板,编辑SKILL.md,运行npm publish。你的技能现已可全球安装。

支持: Claude代码、光标、风帆冲浪及任何类似技能模式的工具。详见 MULTI-TOOL-SUPPORT.md。

💡 为什么技能需要NPM?

手动技能分配需要下载文件,复制到 ~/.claude/skills/,并每次更新重复。没有版本控制,没有依赖管理,没有发现。

NPM解决了这个问题:

核心优势:

  • 版本控制 - 语义版本控制,轻松升级/回滚
  • 全球分发 - 发布一次,通过 npm 的 CDN 全球访问

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Agent Skill NPM Boilerplate

Distribute AI agent skills like any other npm package

AI coding tools (Claude Code, Cursor, Windsurf) support custom “skills” - reusable instructions that extend agent capabilities. But distributing them means manual file copying, no versioning, and painful updates.

This template lets you publish skills to npm:

# Install
npm install -g @your-org/git-commit-helper

# Update
npm update -g @your-org/git-commit-helper

# It just works - installs to ~/.claude/skills/, ~/.cursor/skills/, etc.

Why this matters: Skills become proper software artifacts with semantic versioning, dependency management, private registries, and global discovery. Same infrastructure that distributes React and Express.


Quick start: Fork this template, edit SKILL.md, run npm publish. Your skill is now installable worldwide.

Supports: Claude Code, Cursor, Windsurf, and any tool following similar skill patterns. See MULTI-TOOL-SUPPORT.md.

💡 Why npm for Skills?

Manual skill distribution requires downloading files, copying to ~/.claude/skills/, and repeating for every update. No versioning, no dependency management, no discovery.

npm solves this:

# Install/update/uninstall with standard commands
npm install -g @your-org/skill-name
npm update -g @your-org/skill-name
npm uninstall -g @your-org/skill-name

# Semantic versioning for controlled updates
npm install @your-org/skill@^2.1.0

# Project-specific skills (version-locked, committed to git)
npm install --save-dev @your-org/skill-name

Core benefits:

  • Version control - Semantic versioning, upgrade/rollback easily
  • Global distribution - Publish once, available worldwide via npm’s CDN
  • Discoverability - Searchable on npmjs.com
  • Enterprise ready - Private registries for internal skills
  • Ecosystem integration - Works with CI/CD, monorepos, existing tooling

Skills become first-class software artifacts, using the same infrastructure as React, Express, and millions of other packages.

✨ Features

  • ✅ Official Specification: Fully compliant with Claude Code skills format
  • ✅ Multi-Tool Support: Install to Claude Code, Cursor, Windsurf, and more! (See Multi-Tool Support)
  • ✅ Smart Installation: Auto-detects global vs project-level installation
  • ✅ Progressive Disclosure: Supports main SKILL.md + reference files
  • ✅ Lifecycle Management: Install, update, uninstall scripts included
  • ✅ Best Practices: Follows all recommended patterns from official docs
  • ✅ Ready to Publish: Just customize and publish to npm

🚀 Quick Start

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add afx-team/agent-skill-npm-boilerplate
新手?先看 mcpskill.org 教程 →