@gavinmo1/skills 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -14
  2. package/package.json +1 -2
package/README.md CHANGED
@@ -6,7 +6,15 @@ Agent skill 集合。每个 skill 是 `skills/` 下的一个目录,目录里
6
6
 
7
7
  需要 Node.js ≥ 18,无需全局安装任何东西。装完写到 `~/.agents/skills/`,agent 下次启动即可读到。
8
8
 
9
- ### 方式一:直接从 GitHub 跑(现在可用)
9
+ ### 方式一:npm(推荐)
10
+
11
+ ```bash
12
+ npx @gavinmo1/skills add plan-review-loop
13
+ ```
14
+
15
+ 包地址:[npmjs.com/package/@gavinmo1/skills](https://www.npmjs.com/package/@gavinmo1/skills)。走 registry,不受 npm 的 `allow-git` 限制影响。
16
+
17
+ ### 方式二:直接从 GitHub 跑
10
18
 
11
19
  ```bash
12
20
  npx github:GavinMo1/skills-repo add plan-review-loop
@@ -18,26 +26,15 @@ npx github:GavinMo1/skills-repo add plan-review-loop
18
26
  npx --yes --allow-git=all github:GavinMo1/skills-repo add plan-review-loop
19
27
  ```
20
28
 
21
- ### 方式二:克隆后本地跑(任何 npm 配置下都可用)
29
+ ### 方式三:克隆后本地跑(任何 npm 配置下都可用)
22
30
 
23
31
  ```bash
24
32
  git clone https://github.com/GavinMo1/skills-repo
25
33
  node skills-repo/bin/cli.mjs add plan-review-loop
26
34
  ```
27
35
 
28
- ### 方式三:npm(发布后)
29
-
30
- ```bash
31
- npx @gavinmo1/skills add plan-review-loop
32
- ```
33
-
34
- > 这个包**尚未发布到 npm**,现在还不能用这条。
35
-
36
36
  ### 常用命令
37
37
 
38
- 下文用 `npx @gavinmo1/skills` 代表下面的安装命令;发布前请等量替换成
39
- `npx --yes --allow-git=all github:GavinMo1/skills-repo`。
40
-
41
38
  ```bash
42
39
  npx @gavinmo1/skills list # 列出可用 skill
43
40
  npx @gavinmo1/skills add --all # 全部安装
@@ -86,7 +83,26 @@ node bin/cli.mjs list
86
83
  node bin/cli.mjs add plan-review-loop --dir /tmp/skills-test
87
84
  ```
88
85
 
86
+ ## 发布(维护者)
87
+
88
+ ```bash
89
+ npm version patch # 或 minor
90
+ git push --follow-tags
91
+ npm publish
92
+ ```
93
+
94
+ npm 现行策略要求发布必须受 2FA 保护。踩过的三个坑,记在这里:
95
+
96
+ 1. **包名必须全小写。** npm 用户名是 `gavinmo1`,scope 只能是 `@gavinmo1/`;写成 `@GavinMo1/` 会被 registry 拒绝。
97
+ 2. **非交互环境必须用带 bypass 2FA 权限的 Granular Access Token,且要显式传配置。** `NODE_AUTH_TOKEN` 环境变量 npm **不会自动采用**(它只在 `.npmrc` 里写了 `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` 时才生效),所以这样发仍然会 403:
98
+
99
+ ```bash
100
+ npm publish --registry=https://registry.npmjs.org "--//registry.npmjs.org/:_authToken=$NPM_TOKEN"
101
+ ```
102
+
103
+ 3. **首次发布后包会短暂 404。** registry 传播需要几分钟;`npm publish` 输出 `+ @scope/name@x.y.z` 就表示已被接受,不用重发。
104
+
89
105
  ## 许可
90
106
 
91
107
  MIT
92
-
108
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gavinmo1/skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Agent skills collection",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,4 +33,3 @@
33
33
  "url": "git+https://github.com/GavinMo1/skills-repo.git"
34
34
  }
35
35
  }
36
-