@wangjiang988/oh-my-skills
v0.1.1
Published
AI agent skills 集合 — 通过 npx oh-my-skills init 把 coding-workflow skills 铺到任意项目
Maintainers
Readme
@wangjiang988/oh-my-skills
把 AI agent skills(coding-workflow 系列)铺到任意项目的 CLI 工具。
这是什么
一个 npm 包 + 命令行工具,把 oh-my-skills 仓库里已经打磨好的 skill 通过一条命令安装到目标项目,让 AI agent 在那个项目里直接按 /skill:<name> 调用。
当前版本(v0.1.0)只打包 coding-workflow/ 分类下的 skill:
coding-pi-agent— pi-agent 的标准写法与模板coding-docs— 项目文档治理与知识库化
其它分类(wj/skills/、coding-architecture/、hillstone/)的 skill 还在打磨中,等成熟后再陆续接入。
安装
方式 1:作为 npm 包安装(推荐,发包后)
# 公共 npm
npm install -D @wangjiang988/oh-my-skills
# 或公司私有 registry(verdaccio)
npm install -D @wangjiang988/oh-my-skills --registry https://your-verdaccio.example.com安装后:
npx oh-my-skills init方式 2:本地 file 引用(开发期)
在目标项目里:
npm install -D file:../path/to/oh-my-skills
npx oh-my-skills init方式 3:本地 npm link(多项目联调)
# 在 oh-my-skills 仓库根目录
npm link
# 在目标项目里
npm link @wangjiang988/oh-my-skills
npx oh-my-skills init用法
默认安装
npx oh-my-skills init把全部可用 skill 装到 ./.claude/skills/(相对于当前目录)。
安装到指定目录
npx oh-my-skills init --target ./my-project/.claude/skills只安装指定 skill(白名单)
npx oh-my-skills init --skills coding-pi-agent,coding-docs按 frontmatter 的 name 字段过滤,逗号分隔。
安装到全局(个人 ~/.claude/skills/)
npx oh-my-skills init --global写到 ./.claude/skills/,所有项目都能用。
列出所有可用 skill
npx oh-my-skills list查看某个 skill 详情
npx oh-my-skills info coding-pi-agent安装后目录结构
your-project/
└── .claude/
└── skills/
├── INDEX.md # 自动生成的索引
├── coding-pi-agent/
│ ├── SKILL.md
│ └── ...
└── coding-docs/
├── SKILL.md
├── templates/
└── examples/在 agent 会话里这样调用:
/skill:coding-pi-agent
/skill:coding-docs行为约束
- 幂等:重复执行
init不会破坏目标项目。同名 skill 整目录覆盖,新名追加,INDEX.md重新生成。 - 整目录拷贝:保留
templates/、examples/、scripts/等附件,不只复制 SKILL.md。 - 白名单过滤:构建时
scripts/build-skills.mjs的INCLUDED_CATEGORIES写死为['coding-workflow'],避免误打包未打磨的 skill。
本地开发
# 1. 改 src/ 或 coding-workflow/ 下的 skill
# 2. 重新构建
npm run build
# 3. 跑 list 看效果
node dist/index.js list
# 4. 试装到一个临时项目
node dist/index.js init --target ./tmp-test-install
# 5. 清理
npm run clean发布到私有 registry(verdaccio)
# 1. 确认登录
npm login --registry https://your-verdaccio.example.com
# 2. 确认 scope(包名已是 @wangjiang988/oh-my-skills,无需额外配置)
# 3. 首次发布
npm publish --registry https://your-verdaccio.example.com
# 后续版本
npm version patch # 或 minor / major
npm publish --registry https://your-verdaccio.example.com发布前会自动跑 prepublishOnly(先 clean 再 build),所以不用手动构建。
接入新 skill / 新分类
- 把新 skill 放到对应分类目录下,写好
SKILL.md(带 frontmatter 的name/version/description)。 - 如果是新分类(如
hillstone/),打开scripts/build-skills.mjs,把分类名加到INCLUDED_CATEGORIES数组;同时打开src/commands/{init,list,info}.ts,把分类名加到本地的CATEGORIES常量里。 npm run build验证。npm version patch && npm publish。
目录约定
oh-my-skills/
├── src/ # TypeScript 源码
│ ├── index.ts # CLI 入口
│ ├── skills-index.ts # 自动生成(构建脚本产出)
│ └── commands/
│ ├── init.ts
│ ├── list.ts
│ └── info.ts
├── scripts/ # 构建 / 清理脚本
│ ├── build-skills.mjs
│ └── clean.mjs
├── coding-workflow/ # 源 skills(被镜像到 dist/skills/)
│ ├── coding-pi-agent/
│ └── coding-docs/
├── dist/ # 构建后(npm 包实际产物)
│ ├── index.js
│ └── skills/coding-workflow/...
├── package.json
├── tsconfig.json
├── README.md
└── TODO.mdLicense
UNLICENSED(内部包)。
