@yottameta/yotta-skills-plugin 0.7.2 → 0.19.0
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.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/yotta-skills/SKILL.md +86 -12
- package/skills/yotta-skills/bin/yotta-skills.js +681 -90
- package/skills/yotta-skills/references/faq.md +26 -3
- package/skills/yotta-skills/references/install-flow.md +95 -7
- package/skills/yotta-skills/references/skill-list.md +10 -10
- package/skills/yotta-skills/references/tutorial.md +40 -6
- package/skills/yotta-skills/references/walkthroughs.md +11 -3
- package/skills/yotta-skills/scripts/yotta-skills-mcp.py +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- **安装目标**:未指定目标怎么办 · 支持哪些智能体 · 装完为什么看不到
|
|
6
6
|
- **网络与源**:国内访问慢 · 镜像延迟 · 网络失败
|
|
7
|
-
- **更新**:`update --check` 退出码 · 自动更新边界 · 幂等
|
|
7
|
+
- **更新**:`update --check` 退出码 · 后台周检缓存 · 自动更新边界 · 幂等
|
|
8
8
|
- **版本**:`--pin` 与默认策略 · 清单漂移 · 单技能安装
|
|
9
9
|
- **安全**:装前扫描 · 目标目录校验 · 失败恢复
|
|
10
10
|
|
|
@@ -43,6 +43,13 @@ YOTTA_SKILLS_NPM_FLAGS="--registry=https://registry.npmmirror.com" npx -y @yotta
|
|
|
43
43
|
|
|
44
44
|
该命令只读,不修改文件。
|
|
45
45
|
|
|
46
|
+
## 4.1 `update --check --scheduled` 什么时候用?
|
|
47
|
+
|
|
48
|
+
它是后台周检入口:默认 7 天加 0 到 24 小时随机抖动,未到期不联网;到期只检查一次,
|
|
49
|
+
结果写入 `~/.yottaskills/update-check.json`。文本模式网络失败静默并退出 0,
|
|
50
|
+
`--json` 可读取 `error` / `cache` 诊断字段。会话开工只建议做本地 `--reindex`,
|
|
51
|
+
不默认联网更新检查。
|
|
52
|
+
|
|
46
53
|
## 5. `update --auto` 会更新所有技能吗?
|
|
47
54
|
|
|
48
55
|
只自动更新元阁家族内技能(`yotta-*` 且在清单中)。其他已装技能只提示,不自动改动。
|
|
@@ -69,11 +76,23 @@ npx -y @yottameta/yotta-skills install yotta-memory yotta-workflow --agent codex
|
|
|
69
76
|
|
|
70
77
|
## 10. 安装前安全扫描怎么用?
|
|
71
78
|
|
|
72
|
-
|
|
79
|
+
家族安装默认执行元信门禁:没有元信时先自动自举,再扫描待装包。`DO NOT INSTALL`
|
|
80
|
+
和扫描失败会阻断;`INSTALL WITH CAUTION` / `REVIEW REQUIRED` 会继续但显示风险。
|
|
81
|
+
可用 `--verify <path>` 指定引擎。`--skip-scan` 只是人工应急路径,会标记
|
|
82
|
+
`explicit-unverified`,`update --auto` 不使用它。
|
|
73
83
|
|
|
74
84
|
## 11. 安装失败后如何恢复?
|
|
75
85
|
|
|
76
|
-
|
|
86
|
+
查看汇总中的失败原因。setup / doctor 失败时元阁会自动恢复旧版本;旧版本快照仍保存在
|
|
87
|
+
`~/.yottaskills/snapshots/`。可以先用 `doctor` 自检,再用 `rollback` 恢复最近快照:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx -y @yottameta/yotta-skills doctor --dir /path/to/skills --slug <slug>
|
|
91
|
+
npx -y @yottameta/yotta-skills rollback --list --dir /path/to/skills
|
|
92
|
+
npx -y @yottameta/yotta-skills rollback --slug <slug> --dir /path/to/skills
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
如果只是安装源或网络问题,再单独安装失败技能:
|
|
77
96
|
|
|
78
97
|
```bash
|
|
79
98
|
npx -y @yottameta/yotta-skills install <slug> --dir /path/to/skills
|
|
@@ -82,3 +101,7 @@ npx -y @yottameta/yotta-skills install <slug> --dir /path/to/skills
|
|
|
82
101
|
## 12. 装完为什么智能体里看不到?
|
|
83
102
|
|
|
84
103
|
确认安装目录与智能体实际读取目录一致;安装后通常需要重启会话或重新加载技能列表。
|
|
104
|
+
|
|
105
|
+
## 13. `hook evaluate` 会真的拦截动作吗?
|
|
106
|
+
|
|
107
|
+
不一定。适配层先探测宿主能力:`native-block` 才能声明动作前阻断;`native-audit` 只能审计并触发一次纠偏,结果会标记 `explicit-unverified`;`wrapper-only` 仅在 wrapper 注册后保证;未知宿主全部按 `unsupported` 处理。当前 Codex 已实测能力见 `hook capabilities --host codex`。
|
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
1. 读清单(`skills.json`,默认随包;`YOTTA_SKILLS_MANIFEST` 可覆盖);
|
|
11
11
|
2. `npm pack <pkg>@<spec> --pack-destination <临时目录>`;
|
|
12
12
|
3. 系统 `tar -xzf` 解压到临时目录(产物应有 `SKILL.md`);
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
13
|
+
4. 读取包内 `skill-manifest.json`;没有 manifest 时使用 `skills.json` 的家族默认契约;
|
|
14
|
+
5. 校验 slug / package / version / 权限 / 生命周期脚本路径;
|
|
15
|
+
6. 元信装前扫描:已有元信则直接扫描;没有则自动安装元信自身,再扫描;
|
|
16
|
+
7. 通过后创建旧版本快照,把新版本复制到同盘暂存目录,再原子切换到目标目录;
|
|
17
|
+
8. 依次执行包内 setup、内置 doctor、包内自定义 doctor;任一步失败自动恢复旧版本;
|
|
18
|
+
9. 汇总报告:✔ 成功 / - 跳过(已是最新)/ ✘ 失败;
|
|
19
|
+
10. 全部成功后自动 re-index 本地技能注册表(`~/.yottaskills/registry.json`):重扫技能根目录并增量合并,
|
|
17
20
|
新装 / 更新的技能随即进入注册表(`--no-reindex` 可关闭;`--dry-run` 不触发)。
|
|
18
21
|
|
|
19
22
|
## 复制跳过规则
|
|
@@ -24,6 +27,27 @@
|
|
|
24
27
|
因此装进技能目录的是「技能本体」(SKILL.md / references / scripts 等),不含 npm
|
|
25
28
|
安装器自身、测试夹具与 Python 字节码缓存。
|
|
26
29
|
|
|
30
|
+
## manifest 与家族默认契约
|
|
31
|
+
|
|
32
|
+
每个技能包可以自带根目录 `skill-manifest.json`。有 manifest 时:
|
|
33
|
+
|
|
34
|
+
- 校验 `slug` / `package` / `version` 与包目录、`package.json`、`SKILL.md` 一致;
|
|
35
|
+
- 校验 `install.idempotent` 为 `true`;
|
|
36
|
+
- 校验 setup / doctor / rollback 路径为包内相对路径,不能包含绝对路径或 `..`。
|
|
37
|
+
|
|
38
|
+
没有 manifest 时使用家族默认契约:来源 `yottameta`、幂等安装、自动应用模式 `route`,
|
|
39
|
+
不声明 MCP、hook 或自定义生命周期脚本。
|
|
40
|
+
|
|
41
|
+
## 自定义生命周期脚本
|
|
42
|
+
|
|
43
|
+
包内 `skill-manifest.json` 可声明 `install.setup` / `install.doctor` /
|
|
44
|
+
`install.rollback`,值必须是包内相对路径,不能是绝对路径或包含 `..`。
|
|
45
|
+
|
|
46
|
+
元阁用当前 Node.js 直接执行脚本,不经过 shell。脚本接收 `--skill-dir` /
|
|
47
|
+
`--package-dir` / `--dest`,rollback 另接收 `--snapshot`,并始终追加 `--json`;
|
|
48
|
+
脚本必须输出一个 JSON 对象,至少包含 `ok`。setup 或 doctor 失败时,先恢复旧版本,
|
|
49
|
+
再在声明了 rollback 时调用它。生命周期结果、回滚结果和快照路径都会写入安装证据。
|
|
50
|
+
|
|
27
51
|
## re-index(装技能后自动重扫注册表)
|
|
28
52
|
|
|
29
53
|
- `install` / `update` 完成后,CLI 自动调用 `--reindex`(同一套 `lib/skills-scan.js` 扫描核心):
|
|
@@ -51,14 +75,76 @@
|
|
|
51
75
|
其它 → 直接执行;
|
|
52
76
|
- `YOTTA_SKILLS_NPM_FLAGS` 追加到 `npm pack` 参数。
|
|
53
77
|
|
|
54
|
-
##
|
|
78
|
+
## 元信装前门禁
|
|
55
79
|
|
|
56
80
|
- 引擎查找:`--verify` → `YOTTA_SKILLS_VERIFY` → `<dest>/yotta-verify/scripts/yotta_verify.py`;
|
|
57
81
|
- python 查找:`--python` → `YOTTA_SKILLS_PYTHON` → `python3` / `python` / `py`(win32);
|
|
58
82
|
- 执行:`python -B <engine> scan <解压目录> --json`(`-B` 禁止写 `__pycache__`,防止污染
|
|
59
83
|
引擎所在目录);
|
|
60
|
-
-
|
|
61
|
-
|
|
84
|
+
- 元信缺失时:先按 `skills.json` 安装 `yotta-verify`,并记录 `gate_mode=trusted-bootstrap`
|
|
85
|
+
与 `bootstrap_scan=self`,随后用元信扫描其余家族包;
|
|
86
|
+
- verdict 处置:`SAFE TO INSTALL` 继续;`INSTALL WITH CAUTION` / `REVIEW REQUIRED`
|
|
87
|
+
继续但显示风险并留证;`DO NOT INSTALL` 和扫描失败阻断,不替换目标;
|
|
88
|
+
- `--skip-scan` 只保留为人工应急路径,使用时输出 `explicit-unverified` 并写入证据;
|
|
89
|
+
- `update --auto` 始终执行装前门禁,不接受 `--skip-scan`。
|
|
90
|
+
|
|
91
|
+
## 更新检查缓存
|
|
92
|
+
|
|
93
|
+
- 手动 `update --check`:每次联网,只读,保持退出码 0 / 3 / 1。
|
|
94
|
+
- 后台周检 `update --check --scheduled`:默认 7 天加 0 到 24 小时随机抖动;未到期直接返回,
|
|
95
|
+
到期只检查一次;文本失败静默,`--json` 保留诊断。
|
|
96
|
+
- 缓存文件:`~/.yottaskills/update-check.json`;按目标技能目录隔离记录,
|
|
97
|
+
字段包含 `last_checked`、`next_check`、`last_result`、`last_error`。
|
|
98
|
+
- 本缓存只记录版本检查结果与网络错误,不记录技能内容或用户数据。
|
|
99
|
+
|
|
100
|
+
## 运行时 hook 适配
|
|
101
|
+
|
|
102
|
+
- `hook capabilities --host <name>`:查看六个统一事件的四档宿主能力;未知宿主默认 `unsupported`。
|
|
103
|
+
- `hook evaluate --host <name> --event <event> --manifest <file> --context <json>`:按 manifest 顺序评估声明,输出 `allow` / `block` / `warn` / `unverified`。
|
|
104
|
+
- `hook bind --manifest <file>` / `hook unbind <id>`:幂等注册或反注册声明,不直接改写宿主配置。
|
|
105
|
+
- 评估证据写入 `~/.yottaskills/hook-log.jsonl`,绑定记录写入 `~/.yottaskills/hook-bindings.json`。
|
|
106
|
+
- `native-audit` 不等于强制;缺少能力或证据时必须显示 `explicit-unverified`。
|
|
107
|
+
|
|
108
|
+
## 快照与回滚
|
|
109
|
+
|
|
110
|
+
- 旧版本快照:`~/.yottaskills/snapshots/<slug>/<timestamp>-<version>-<随机后缀>/`;
|
|
111
|
+
- 新快照同时写入 `<快照目录>.meta.json`,包含 SHA-256 摘要、版本、文件数和来源;
|
|
112
|
+
- 无元数据的旧快照仍可按 `SKILL.md` 做结构校验;
|
|
113
|
+
- 新版本先落在 `<dest>/.yottaskills-staging/<slug>-<随机后缀>/`;
|
|
114
|
+
- 旧目标先重命名为同盘备份,再把暂存目录切到目标;切换失败时恢复备份;
|
|
115
|
+
- 证据写入失败会触发回滚,不把安装标记为成功;
|
|
116
|
+
- Windows 上对 `EPERM` / `EACCES` / `EBUSY` 做短重试,避免杀毒或索引服务造成的瞬时锁。
|
|
117
|
+
|
|
118
|
+
回滚命令:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
yotta-skills rollback --list --dir <skills-dir>
|
|
122
|
+
yotta-skills rollback --slug <slug> --dir <skills-dir>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
恢复前校验快照摘要;恢复时先在目标目录同盘暂存,再替换当前目录。恢复成功后执行
|
|
126
|
+
内置 doctor 和自定义 doctor,并保留原快照供再次恢复。
|
|
127
|
+
|
|
128
|
+
## doctor
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
yotta-skills doctor --dir <skills-dir> --slug <slug>
|
|
132
|
+
yotta-skills doctor --dir <skills-dir> --json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
doctor 只读检查目录、`SKILL.md`、版本、manifest 身份、注册表记录和自定义 doctor,
|
|
136
|
+
不会修改目标目录或注册表。注册表版本不一致属于 warning,可用 `--reindex` 修复。
|
|
137
|
+
|
|
138
|
+
## 安装证据
|
|
139
|
+
|
|
140
|
+
每次安装决策写入:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
~/.yottaskills/install-log.jsonl
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
记录包含时间、事件、技能、包名、版本、`gate_mode`、verdict、decision
|
|
147
|
+
和快照路径;不记录技能内容或用户数据,只写本机。
|
|
62
148
|
|
|
63
149
|
## 退出码
|
|
64
150
|
|
|
@@ -68,6 +154,8 @@
|
|
|
68
154
|
| 1 | 安装 / 更新存在失败项 |
|
|
69
155
|
| 2 | 用法错误(未知参数 / 未知技能 / 未收录智能体) |
|
|
70
156
|
| 4 | 未指定目标且当前目录未检测到项目级技能目录 |
|
|
157
|
+
| 5 | 装前 gate 阻断或元信不可用 |
|
|
158
|
+
| 6 | manifest / 身份校验失败 |
|
|
71
159
|
|
|
72
160
|
## 目标目录解析
|
|
73
161
|
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
|---|---|---|---|---|
|
|
8
8
|
| `yotta-anti-shallow` | 元谨 | `@yottameta/yotta-anti-shallow` | 1.4.0 | 防 AI 敷衍规则引擎(深入分析/根因追溯时激活) |
|
|
9
9
|
| `yotta-code-quality` | 元质 | `@yottameta/yotta-code-quality` | 0.4.0 | 结对式代码质量评审(十二类腐化风险 + 0-100 健康分) |
|
|
10
|
-
| `yotta-workflow` | 元序 | `@yottameta/yotta-workflow` | 0.4.
|
|
11
|
-
| `yotta-memory` | 元忆 | `@yottameta/yotta-memory` | 0.
|
|
10
|
+
| `yotta-workflow` | 元序 | `@yottameta/yotta-workflow` | 0.4.1 | 跨会话/跨项目通用工作流协议(状态就近存) |
|
|
11
|
+
| `yotta-memory` | 元忆 | `@yottameta/yotta-memory` | 0.13.0 | 有权限边界的文件式智能体记忆(FACT/PREF/BOUND/COMMIT) |
|
|
12
12
|
| `yotta-learn` | 元习 | `@yottameta/yotta-learn` | 0.2.0 | 学习沉淀 CLI:错误/纠正/洞见沉淀为 .learnings/ 条目 |
|
|
13
|
-
| `yotta-security-audit` | 元安 | `@yottameta/yotta-security-audit` | 0.2.
|
|
13
|
+
| `yotta-security-audit` | 元安 | `@yottameta/yotta-security-audit` | 0.2.3 | 安全扫描引擎:13 类检测器 + 系统安全基线 |
|
|
14
14
|
| `yotta-vetter` | 元审 | `@yottameta/yotta-vetter` | 0.2.3 | 安全审查协议:四阶段 review + SAFE TO INSTALL 判定 |
|
|
15
|
-
| `yotta-recon` | 元析 | `@yottameta/yotta-recon` | 0.1.
|
|
16
|
-
| `yotta-guardian` | 元盾 | `@yottameta/yotta-guardian` | 0.1.
|
|
15
|
+
| `yotta-recon` | 元析 | `@yottameta/yotta-recon` | 0.1.6 | 跨智能体网络侦察:零依赖端口/服务/版本指纹探测 |
|
|
16
|
+
| `yotta-guardian` | 元盾 | `@yottameta/yotta-guardian` | 0.1.3 | 跨智能体危险调用拦截护栏:确定性规则 + 可插拔意图验证 |
|
|
17
17
|
| `yotta-humanize` | 元真 | `@yottameta/yotta-humanize` | 0.2.0 | 去 AI 味中文写作编辑:检测器引擎 |
|
|
18
18
|
| `yotta-logs` | 元史 | `@yottameta/yotta-logs` | 0.3.0 | 跨智能体历史会话 / 记忆日志检索 |
|
|
19
19
|
| `yotta-security-testing` | 元测 | `@yottameta/yotta-security-testing` | 0.3.0 | 有纪律的 AI 安全测试方法论 + Scope Guard 五道防线 |
|
|
20
20
|
| `yotta-agent-hardening` | 元安全 | `@yottameta/yotta-agent-hardening` | 0.2.4 | 防御向 AI 智能体自身安全加固(配置面静态扫描三域) |
|
|
21
|
-
| `yotta-skill-creator` | 元造 | `@yottameta/yotta-skill-creator` | 0.1.
|
|
22
|
-
| `yotta-publish-guard` | 元守 | `@yottameta/yotta-publish-guard` | 0.
|
|
23
|
-
| `yotta-logwatch` | 元察 | `@yottameta/yotta-logwatch` | 0.2.
|
|
21
|
+
| `yotta-skill-creator` | 元造 | `@yottameta/yotta-skill-creator` | 0.1.1 | 工坊「造」:端到端造技能脚手架 |
|
|
22
|
+
| `yotta-publish-guard` | 元守 | `@yottameta/yotta-publish-guard` | 0.4.1 | 工坊「守」:发布前守门(版本四件对齐 + 三通道查重) |
|
|
23
|
+
| `yotta-logwatch` | 元察 | `@yottameta/yotta-logwatch` | 0.2.8 | 安全日志分析检测引擎(攻击链识别/告警聚合) |
|
|
24
24
|
| `yotta-intel` | 元情 | `@yottameta/yotta-intel` | 0.2.0 | 威胁情报 IOC 提取与规范化引擎(STIX-lite) |
|
|
25
25
|
| `yotta-secret` | 元钥 | `@yottameta/yotta-secret` | 0.2.0 | 密钥 / 凭据泄露源头扫描引擎 |
|
|
26
26
|
| `yotta-chain` | 元链 | `@yottameta/yotta-chain` | 0.1.2 | 供应链依赖校验引擎 |
|
|
27
|
-
| `yotta-triage` | 元鉴 | `@yottameta/yotta-triage` | 0.1.
|
|
27
|
+
| `yotta-triage` | 元鉴 | `@yottameta/yotta-triage` | 0.1.2 | 恶意样本静态初筛引擎(哈希/熵/字符串/PE-ELF) |
|
|
28
28
|
| `yotta-prompt` | 元引 | `@yottameta/yotta-prompt` | 0.2.0 | 意图澄清 + 生态入口(常驻注入,map 串联元阁全家) |
|
|
29
|
-
| `yotta-verify` | 元信 | `@yottameta/yotta-verify` | 0.
|
|
29
|
+
| `yotta-verify` | 元信 | `@yottameta/yotta-verify` | 0.3.0 | 装前安全扫描器 + audited 徽章(prompt injection + 危险模式) |
|
|
30
30
|
|
|
31
31
|
## 家族分布
|
|
32
32
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- 学会 `--list` / `install` / `update` / `--dry-run` / `--pin` / `--force` 的用法;
|
|
10
10
|
- 理解版本策略(range 与 --pin)与幂等行为;
|
|
11
|
-
-
|
|
11
|
+
- 了解元信装前门禁、元信自举与 `--skip-scan` 的人工应急边界;
|
|
12
12
|
- 前置:Node.js 18+、npm、系统 tar(Windows 10+ 自带);网络可访问 npm 注册表
|
|
13
13
|
(国内可配置镜像或代理)。
|
|
14
14
|
|
|
@@ -76,22 +76,35 @@ dry-run 只打印将要执行的清单(含目标与版本策略),不联网
|
|
|
76
76
|
npx -y @yottameta/yotta-skills install --agent codex --pin
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
## 8.
|
|
79
|
+
## 8. 强制重装与元信门禁
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
npx -y @yottameta/yotta-skills install --agent codex --force # 已是最新也重装
|
|
83
|
-
npx -y @yottameta/yotta-skills install --agent codex --skip-scan #
|
|
83
|
+
npx -y @yottameta/yotta-skills install --agent codex --skip-scan # 人工应急:显式未验证
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
家族安装默认执行元信门禁:没有元信时,元阁先按可信源安装元信自身,再扫描待装技能。
|
|
87
|
+
`DO NOT INSTALL` 会阻断安装;`INSTALL WITH CAUTION` / `REVIEW REQUIRED` 会继续但显示风险。
|
|
88
|
+
旧版本会先快照到 `~/.yottaskills/snapshots/`,安装决策写入
|
|
89
|
+
`~/.yottaskills/install-log.jsonl`。`--skip-scan` 只用于人工应急,会输出
|
|
90
|
+
`explicit-unverified` 并留证,`update --auto` 不会使用它。
|
|
91
|
+
|
|
92
|
+
安装阶段还会按包内 manifest 执行 setup / doctor;setup 或 doctor 失败时自动恢复旧版本。
|
|
93
|
+
可以用 `doctor` 只读自检,用 `rollback` 校验并恢复最近快照:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx -y @yottameta/yotta-skills doctor --agent codex --slug yotta-memory
|
|
97
|
+
npx -y @yottameta/yotta-skills rollback --list --agent codex
|
|
98
|
+
npx -y @yottameta/yotta-skills rollback --slug yotta-memory --agent codex
|
|
99
|
+
```
|
|
88
100
|
|
|
89
101
|
## 9. 验证安装结果
|
|
90
102
|
|
|
91
103
|
- 看安装汇总:成功 N / 跳过 N / 失败 N;
|
|
92
104
|
- 抽查技能目录:`ls ~/.codex/skills/yotta-memory/SKILL.md`;
|
|
93
105
|
- 复核版本:每个技能 SKILL.md 的 frontmatter `version` 应与 `--list` 一致(这也是幂等
|
|
94
|
-
|
|
106
|
+
判断的依据);
|
|
107
|
+
- 需要安全复核时,查看 `~/.yottaskills/install-log.jsonl` 中的 verdict 与 `gate_mode`。
|
|
95
108
|
|
|
96
109
|
## 10. 常见问题
|
|
97
110
|
|
|
@@ -104,6 +117,11 @@ npx -y @yottameta/yotta-skills install --agent codex --skip-scan # 跳过装前
|
|
|
104
117
|
- **目标未指定**:当前目录没有项目级技能目录时报错(退出码 4),加 `--agent` 或
|
|
105
118
|
`--dir`。
|
|
106
119
|
- **已有旧版本**:默认按 range 覆盖升级到最新 patch;`--pin` 则锁定清单版本。
|
|
120
|
+
- **doctor 报注册表版本不一致**:运行 `yotta-skills --reindex` 重扫注册表;doctor 本身不会写文件。
|
|
121
|
+
- **需要撤销最近安装 / 更新**:先用 `rollback --list` 查看快照,再执行
|
|
122
|
+
`rollback --slug <slug>`;恢复前会自动校验快照。
|
|
123
|
+
- **后台更新检查没有输出**:`update --check --scheduled` 在未到期、已最新或网络失败时
|
|
124
|
+
文本模式保持静默;需要诊断时加 `--json`。
|
|
107
125
|
|
|
108
126
|
## 11. 盘点已装技能与 re-index(新装技能自动被发现)
|
|
109
127
|
|
|
@@ -118,6 +136,9 @@ npx -y @yottameta/yotta-skills --reindex
|
|
|
118
136
|
- `install` / `update` 完成后会自动重扫注册表(`~/.yottaskills/registry.json`),新装 / 更新的
|
|
119
137
|
技能随即出现在 `--inventory` / `--reindex` 里;`--no-reindex` 可关闭自动重扫。
|
|
120
138
|
- 建议每会话开工先跑一次 `--reindex`(快速增量,只合并变化),让后装的技能自动被看见。
|
|
139
|
+
- 更新检查不再作为会话开工默认动作:手动检查用 `update --check`;后台周检用
|
|
140
|
+
`update --check --scheduled`,未到期不联网,到期只检查一次并写
|
|
141
|
+
`~/.yottaskills/update-check.json`。
|
|
121
142
|
|
|
122
143
|
## 编排路由(--route)
|
|
123
144
|
|
|
@@ -130,3 +151,16 @@ npx -y @yottameta/yotta-skills --route "检查代码质量,别糊弄"
|
|
|
130
151
|
输出会告诉你命中哪个组合、按什么顺序调用、每个技能负责什么、哪些已装、哪些缺失,以及缺失技能的安装命令。元阁只给建议,不会自动安装;安装前请先做装前安全扫描,并由用户确认。
|
|
131
152
|
- `--json` 输出机器可读结果(含新增 / 更新 / 消失),适合脚本与钩子。
|
|
132
153
|
- 如果本机还装了非元阁家族技能,`--route` 会额外列出「其他已装技能候选」:只按 frontmatter description 与需求文本做本地机械匹配,标注来源、得分、命中词项与扫描状态(默认未扫描),不读取全文指令、不自动调用;使用/安装前请先做装前安全扫描。
|
|
154
|
+
|
|
155
|
+
## 运行时 hook 适配(hook)
|
|
156
|
+
|
|
157
|
+
技能 manifest 只声明六个统一事件的要求;元阁负责能力探测、确定性评估、证据留痕和降级标注:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npx -y @yottameta/yotta-skills hook capabilities --host codex --json
|
|
161
|
+
npx -y @yottameta/yotta-skills hook evaluate --host codex --event before_send --manifest ./skill-manifest.json --context '{"checks":{}}' --json
|
|
162
|
+
npx -y @yottameta/yotta-skills hook bind --host codex --manifest ./skill-manifest.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`native-block` 才会显示动作前阻断;`native-audit` 只能审计并触发一次纠偏,结果标
|
|
166
|
+
`explicit-unverified`;未知宿主全部按 `unsupported` 处理。本层不联网、不下载、不改宿主配置文件。
|
|
@@ -30,15 +30,23 @@ npx -y @yottameta/yotta-skills --agent codex
|
|
|
30
30
|
npx -y @yottameta/yotta-skills update --check --agent codex
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
2.
|
|
33
|
+
2. 如果由后台调度执行,改用周检入口:
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
```bash
|
|
36
|
+
npx -y @yottameta/yotta-skills update --check --scheduled --agent codex
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
未到期时不联网;到期只检查一次并把结果写入 `~/.yottaskills/update-check.json`。
|
|
40
|
+
|
|
41
|
+
3. 根据输出确认可更新清单。
|
|
42
|
+
|
|
43
|
+
4. 执行增量更新:
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
46
|
npx -y @yottameta/yotta-skills update --agent codex
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
5. 复核:已最新的技能应显示跳过,落后的技能显示更新;失败项单独重装。
|
|
42
50
|
|
|
43
51
|
## 走查 3:按路由安装单个技能
|
|
44
52
|
|