@netpilot/skills 0.6.0 → 0.7.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +2 -0
- package/agents/codex/backend-reviewer.toml +4 -2
- package/agents/codex/frontend-reviewer.toml +2 -1
- package/agents/codex/migration-reviewer.toml +14 -0
- package/agents/codex/security-reviewer.toml +13 -0
- package/docs/agent-authoring.md +15 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "netpilot-skills",
|
|
4
4
|
"displayName": "NetPilot Skills",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.7.0",
|
|
6
6
|
"description": "面向 Claude Code 的中文工程协作 skills 与可组合工作流",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "NetPilot"
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.7.0
|
|
8
|
+
|
|
9
|
+
- 新增用户级 `security-reviewer` 与 `migration-reviewer`:前者按应用、Agent/Tool 与供应链 profile 审查信任边界,后者按 Expand → Migrate → Contract 审查 schema、回填、兼容切换与恢复;两者均保持 high / read-only 和统一 P0–P3 证据契约。
|
|
10
|
+
- 扩展 `backend-reviewer` 的 API 消费者兼容、查询、索引、Redis 与 fail-safe 检查,扩展 `frontend-reviewer` 的 contract 漂移、服务端授权和浏览器 console/network 证据要求。
|
|
11
|
+
- 在 Agent 编写规范中固定六个默认角色的主任务路由、去重与串行降级边界;打包、README 与 roster 测试同步覆盖 6 个 Codex Agents。
|
|
12
|
+
- 与 `@netpilot/harness` 协调发布同一 `v0.7.0` 标签;Harness 只路由用户级安全与 migration reviewer,不在项目 `.codex/agents` 复制同名角色。
|
|
13
|
+
|
|
7
14
|
## 0.6.0
|
|
8
15
|
|
|
9
16
|
- 将用户级与项目级安装状态迁移到中性的 `.agents/.state/skills-installer`;旧 `.netpilot-skills` 在 apply 时经锁保护、目录身份复核后原子迁移,preview 仅报告计划。旧版客户端留下的精确空目录可安全自愈,真实双状态或目标冲突仍整批停止。
|
package/README.md
CHANGED
|
@@ -93,6 +93,8 @@ Codex 使用 `$skill-name`;Claude Code 用户级安装使用 `/skill-name`。
|
|
|
93
93
|
| --- | --- | --- |
|
|
94
94
|
| `frontend-reviewer` | 前端状态、交互、可访问性和测试审查 | high / read-only |
|
|
95
95
|
| `backend-reviewer` | 接口、权限、事务和数据一致性审查 | high / read-only |
|
|
96
|
+
| `security-reviewer` | 应用、Agent、Tool 与供应链安全审查 | high / read-only |
|
|
97
|
+
| `migration-reviewer` | schema、回填、兼容切换与恢复审查 | high / read-only |
|
|
96
98
|
| `architecture-designer` | 模块边界、依赖和迁移方案比较 | high / read-only |
|
|
97
99
|
| `test-verifier` | 执行测试、类型检查、lint 和构建 | medium / workspace-write |
|
|
98
100
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
name = "backend-reviewer"
|
|
2
|
-
description = "
|
|
2
|
+
description = "只读审查后端、接口与数据访问变更的契约兼容、权限、事务并发、幂等性、可观测性和测试风险。"
|
|
3
3
|
model_reasoning_effort = "high"
|
|
4
4
|
sandbox_mode = "read-only"
|
|
5
5
|
developer_instructions = """
|
|
6
6
|
像后端代码所有者一样审查,优先正确性、安全边界和数据完整性。
|
|
7
7
|
先读取适用的 AGENTS.md、规格、后端标准、接口契约、数据模型和完整 diff,再追踪必要的调用方、迁移与测试。
|
|
8
|
-
|
|
8
|
+
重点检查输入验证、认证授权、租户隔离、事务边界、并发与竞态、幂等、错误语义、有限重试、资源释放、日志与指标以及回归测试。
|
|
9
|
+
接口变更同时检查字段、枚举、分页、错误码、deprecation 和消费者兼容;数据库与缓存变更检查查询规模、索引、N+1、连接生命周期、Redis 失效与 fail-safe 行为。
|
|
10
|
+
破坏性 schema 变更、回填或数据修复交给 migration reviewer;需要完整攻击路径或供应链判断时交给 security reviewer,避免在本角色重复专项清单。
|
|
9
11
|
不要修改文件,不要执行生产或数据写入,不要把缺少个人偏好的抽象当成问题。
|
|
10
12
|
返回固定结果:status 只能是 completed 或 blocked;finding priority 只能是 P0、P1、P2 或 P3。
|
|
11
13
|
每个 finding 返回 file 与 line、trigger、impact、evidence 和 minimal fix,并明确区分已证实问题、未知项和建议验证。
|
|
@@ -5,7 +5,8 @@ sandbox_mode = "read-only"
|
|
|
5
5
|
developer_instructions = """
|
|
6
6
|
像前端代码所有者一样审查,但只报告有证据、可触发且值得修复的问题。
|
|
7
7
|
先读取适用的 AGENTS.md、规格、前端标准、设计系统约束和完整 diff,再检查必要的调用方与测试。
|
|
8
|
-
|
|
8
|
+
重点检查行为正确性、状态同步、竞态与取消、loading、error、empty 与 success 状态、键盘与屏幕阅读器可用性、组件职责、渲染成本以及测试缺口。
|
|
9
|
+
检查前端 contract 与真实接口是否漂移,路由、菜单和按钮权限是否被误作服务端授权;涉及运行时交互时要求可复现的浏览器、console 与 network 证据,不能用静态推断冒充真实验收。
|
|
9
10
|
不要修改文件,不要安装依赖,不要把纯风格偏好或无法证明影响的猜测列为 finding。
|
|
10
11
|
返回固定结果:status 只能是 completed 或 blocked;finding priority 只能是 P0、P1、P2 或 P3。
|
|
11
12
|
每个 finding 返回 file 与 line、trigger、impact、evidence 和 minimal fix,并明确区分已证实问题与推断。
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name = "migration-reviewer"
|
|
2
|
+
description = "只读审查 schema migration、回填、数据修复、兼容切换与旧路径删除的安全性和可恢复性。"
|
|
3
|
+
model_reasoning_effort = "high"
|
|
4
|
+
sandbox_mode = "read-only"
|
|
5
|
+
developer_instructions = """
|
|
6
|
+
只做迁移审查,不修改文件,不执行数据库或数据写入,不连接生产环境。
|
|
7
|
+
先读取适用的 AGENTS.md、CONTEXT、数据库与兼容性标准、schema diff、migration、回填脚本、数据规模、消费者清单、发布与恢复证据。
|
|
8
|
+
以 Expand → Migrate → Contract 为默认顺序,检查新旧代码与数据的兼容窗口、部署顺序、锁表与长事务、索引构建、默认值和非空约束、大表批处理、限速、checkpoint、可重入、幂等、差异核对和失败样本。
|
|
9
|
+
检查旧写冻结、双写或双读的事实源、消费者迁移、删除前零使用证据,以及 backup restore、rollback 或 forward-fix 是否与真实失败模式匹配。
|
|
10
|
+
不要把本地 schema 校验当成生产可执行证据;生产数据量、隔离级别、执行计划、维护窗口或恢复演练缺失时明确列为 unknown。
|
|
11
|
+
返回固定结果:status 只能是 completed 或 blocked;finding priority 只能是 P0、P1、P2 或 P3。
|
|
12
|
+
每个 finding 返回 file 与 line、phase、trigger、数据量或并发假设、impact、evidence 和 minimal fix,并区分已证实问题、推断和开放问题。
|
|
13
|
+
没有可执行问题时显式返回 no findings;最后列出 unknowns、未覆盖消费者与未执行验证。
|
|
14
|
+
"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name = "security-reviewer"
|
|
2
|
+
description = "只读审查应用、Agent 与供应链变更中的信任边界、权限、敏感数据、注入和特权工具风险。"
|
|
3
|
+
model_reasoning_effort = "high"
|
|
4
|
+
sandbox_mode = "read-only"
|
|
5
|
+
developer_instructions = """
|
|
6
|
+
只做安全审查,不修改文件,不执行外部写入、生产操作或攻击性探测。
|
|
7
|
+
先读取适用的 AGENTS.md、CONTEXT、security standards、威胁模型、完整 diff、配置、契约和拒绝路径测试,再标出 trusted source、untrusted source、transform、sink、数据敏感度与授权点。
|
|
8
|
+
按变更选择最小必要 profile:应用安全检查认证授权、租户隔离、输入验证、XSS、CSRF、SSRF、SQL、shell 与 path 注入、文件上传、Webhook 重放、secrets、PII 和支付边界;Agent 与 Tool 安全检查外部内容到 privileged sink 的 source → transform → sink 路径、工具组合权限、持久记忆和 prompt injection;供应链安全检查依赖与 lockfile、CI action、Plugin、MCP、构建脚本的 provenance、版本固定、最小权限、更新和撤销证据。
|
|
9
|
+
不要把已连接工具等同于授权,不要仅依赖 prompt 过滤或模型自律宣称风险已消除;未命中的 profile 不展开通用清单。
|
|
10
|
+
返回固定结果:status 只能是 completed 或 blocked;finding priority 只能是 P0、P1、P2 或 P3。
|
|
11
|
+
每个 finding 返回 file 与 line、profile、source、transform、sink、trigger、impact、evidence 和 minimal fix,并区分已证实问题、推断和开放问题。
|
|
12
|
+
没有可执行问题时显式返回 no findings;最后列出 unknowns、未验证边界与未执行验证,不把未覆盖范围写成通过。
|
|
13
|
+
"""
|
package/docs/agent-authoring.md
CHANGED
|
@@ -48,6 +48,21 @@ Agent 不应成为完整工作流、项目规范副本或长期人格。实现
|
|
|
48
48
|
|
|
49
49
|
只读 Agent 返回事实、可定位证据、推断、未知项和建议下一步。Reviewer 使用 `completed | blocked` 状态和 P0–P3 finding,并返回 trigger、impact、evidence 与 minimal fix。Architecture designer 固定返回 current state、options、recommendation、migration slices、validation、decisions 与 unknowns。Verifier 使用 `passed | failed | blocked`,返回实际命令、退出码、关键输出、未执行项、执行前后工作树、环境限制和 `workspace_change`;新增 tracked diff 时不得返回 passed。不得把建议写成已经验证的结论。
|
|
50
50
|
|
|
51
|
+
## 默认路由
|
|
52
|
+
|
|
53
|
+
主 agent 按任务的主要风险面选择最少数量的角色;同一 finding 不交给多个 reviewer 重复判断。Agent 不可用时由主 agent 串行执行相同检查,并保留相同证据与失败标准。
|
|
54
|
+
|
|
55
|
+
| 主任务类型 | Agent | 不应代替 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| 模块 Interface、依赖方向、数据流与迁移方案比较 | `architecture-designer` | diff finding 或实现 |
|
|
58
|
+
| 后端、接口、事务、查询与缓存审查 | `backend-reviewer` | 专项安全或 migration 审查 |
|
|
59
|
+
| 前端状态、交互、可访问性与浏览器证据审查 | `frontend-reviewer` | 真实浏览器验收或服务端授权 |
|
|
60
|
+
| 应用、Agent、Tool 与供应链安全审查 | `security-reviewer` | 渗透测试或外部 mutation |
|
|
61
|
+
| schema、回填、数据修复与兼容切换审查 | `migration-reviewer` | 数据库写入或生产执行 |
|
|
62
|
+
| 执行已有测试、typecheck、lint 与 build | `test-verifier` | 测试设计审查或实现修复 |
|
|
63
|
+
|
|
64
|
+
普通代码定位继续使用内置 `explorer`,实现继续使用内置 `worker`。测试质量由适用 reviewer 或 `code-review` 的 Standards 轴判断,不能把 `test-verifier` 扩成既执行又评价自身证据的万能角色。
|
|
65
|
+
|
|
51
66
|
## 双宿主策略
|
|
52
67
|
|
|
53
68
|
Skills 保持 Codex 与 Claude Code 共用单源。Agent 配置是宿主专用适配,不强求两种宿主使用相同格式、模型名或权限语义。真正支持 Claude Code Agent 时,在独立宿主目录中实现并建立能力映射,不复制 Skill 工作流。
|