Compare commits

...
Author SHA1 Message Date
johnQ 6b338895d7 docs(maintenance): 明确批量提交前先建分支,不直接进 main 2026-11-01 05:20:47 +08:00
johnQ 7b221cc767 docs(skill): 覆盖率阶段 2 完成 —— 全量 evals 与四段式文档清零
skill-gate / gate (push) Waiting to run
- 24 个技能补齐 evals(正常/边界/失败恢复)与 docs/skills/*.md
- 覆盖 dev 类、发布 runbook、karpathy 守则、PR/清单等
- coverage: 24 -> 0(40 个 promoted+model-invoked 全覆盖)
2026-11-01 05:19:28 +08:00
qiudl 8bc3300928 Merge pull request 'docs(skill): 覆盖率阶段 1 —— core + req 补齐 evals 与四段式文档' (#17) from chore/skill-coverage-phase1-samples into main
skill-gate / gate (push) Waiting to run
docs(skill): 覆盖率阶段 1 —— core + req 补齐 evals 与四段式文档
2026-10-31 21:14:59 +00:00
johnQ 6f5151fcb5 docs(skill): 覆盖率阶段 1 完成 —— core + req 全部补齐 evals 与四段式文档
skill-gate / gate (pull_request) Waiting to run
- 新增 14 个技能的 evals/evals.json(每技能 3 条:正常/边界/失败恢复)
- 新增 14 篇 docs/skills/*.md(What/When/Common questions/It's working if)
- 覆盖 core:pm-ask、pm-risk(ai-proj 已于样板提交)
- 覆盖 req:req-audit/compare/design/dev/lookback/prd/prototype/research/retro/review/test-gate/workflow
- coverage: 38 -> 24(剩余 dev 类等进入阶段 2/3)
2026-11-01 05:14:51 +08:00
johnQ e6ebfd6b9f docs(skill): 覆盖率阶段 1 样板 —— req / ai-proj 的 evals 与四段式文档
- skills-req/req-plugin/skills/evals/evals.json(3 条:正常/边界/失败恢复)
- docs/skills/req.md(What/When/Common questions/It's working if)
- skills-core/ai-proj-plugin/skills/evals/evals.json
- docs/skills/ai-proj.md
- coverage: 40 -> 38
2026-11-01 05:07:53 +08:00
qiudl 26b8fd04b9 Merge pull request 'feat(skill): 本地 git 门禁 + 项目级安装 + 覆盖率与第三方扫描' (#16) from chore/skill-governance-v2 into main
skill-gate / gate (push) Waiting to run
feat(skill): 本地 git 门禁 + 项目级安装 + 覆盖率与第三方扫描
2026-10-31 21:04:27 +00:00
johnQ 04e20babc1 feat(skill): 本地 git 门禁 + 项目级安装 + 覆盖率与第三方扫描
skill-gate / gate (pull_request) Waiting to run
- hooks/git/{pre-commit,pre-push} + scripts/install-git-hooks.sh(Gitea Actions 无 runner,本地兜底)
- install-skills.sh: --scope project --project-dir(装到项目 .agents/skills)
- scripts/scan-installed.sh: 扫第三方已装技能(33 个,0 高危)
- generate-catalog: has_evals/has_docs + coverage;validate --coverage + 路由一致性检查
- SCOPE 覆盖率路线图(3-4 周补齐 40 个技能的 evals 与四段式文档)
- MAINTENANCE/README/CHANGELOG 同步
2026-11-01 05:04:14 +08:00
qiudl 748ea68aa0 Merge pull request 'docs: 新增技能维护节奏 MAINTENANCE.md' (#15) from docs/maintenance-cadence into main
docs: 新增技能维护节奏 MAINTENANCE.md
2026-10-31 14:26:05 +00:00
johnQ 26352c4c69 docs: 新增技能维护节奏 MAINTENANCE.md 并在 README 挂入口 2026-10-31 22:26:00 +08:00
qiudl 6321a8528a Merge pull request 'chore(skill): 安全扫描警告清零 + 加入 skill-gate CI' (#14) from chore/scan-cleanup-and-ci into main
skill-gate / gate (push) Waiting to run
chore(skill): 安全扫描警告清零 + 加入 skill-gate CI
2026-10-31 14:24:12 +00:00
johnQ b390c29af3 chore(skill): 安全扫描警告清零 + 加入 skill-gate CI
skill-gate / gate (pull_request) Waiting to run
- scan-skill.sh: loopback 不算风险、命中走允许清单
- 11 个文件的 /Users/<机器名> 绝对路径去环境化(脚本 $HOME、文档 ~)
- 允许清单登记运维环境地址与示例占位符(非凭据),附理由
- scan: 57 warns -> 0 warns / 0 high
- 新增 .gitea/workflows/skill-gate.yml(validate --strict + scan + catalog --check + 测试)
2026-10-31 22:24:05 +08:00
qiudl f41b14ad0a Merge pull request 'chore(skill): 清理全部 23 条历史校验警告' (#13) from chore/skill-warning-cleanup into main
chore(skill): 清理全部 23 条历史校验警告
2026-10-31 14:21:11 +00:00
106 changed files with 2697 additions and 300 deletions
+30
View File
@@ -0,0 +1,30 @@
name: skill-gate
on:
pull_request:
paths:
- "skills-**"
- "scripts/**"
- "install-skills.sh"
- "catalog.json"
push:
branches: [main]
paths:
- "skills-**"
- "scripts/**"
- "install-skills.sh"
- "catalog.json"
jobs:
gate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 规范校验(strict:警告也算失败)
run: python3 scripts/validate-skills.py --strict
- name: 安全扫描(禁止高危项)
run: ./scripts/scan-skill.sh
- name: catalog 是否最新
run: python3 scripts/generate-catalog.py --check
- name: 安装器测试
run: bash tests/install-skills.test.sh
+23
View File
@@ -30,3 +30,26 @@
- 7 处非标准 frontmatter 字段(`arguments`、`user_invocable`)移入 `metadata`。
- 修复 `req-dev` 的 4 条相对链接;校验器改为跳过行内代码,消除 `![](...)` 误报。
- `validate-skills.py`:23 个警告 → **0 个警告**。
### 清理(2026-10-31 第二批)
- `scripts/scan-skill.sh`:回环地址(localhost/127.0.0.1)不再算风险;命中后走允许清单。
- 11 个文件里的 `/Users/<机器名>` 绝对路径去环境化(脚本改 `$HOME`,文档改 `~`)。
- 允许清单登记 6 类运维环境地址与示例占位符(非凭据),附理由。
- 安全扫描:57 个警告 → **0 个警告、0 个高危**。
- 新增 `.gitea/workflows/skill-gate.yml`:PR/main 跑 `validate --strict` + `scan` + `catalog --check` + 安装器测试。
- 新增 `MAINTENANCE.md`:技能维护节奏(每日漂移、每周 evals 抽样、每月目录审阅、每季度治理复核)。
### 治理增强(2026-11-01)
- 新增 git 门禁:`hooks/git/pre-commit`(validate --strict / scan / catalog --check)+ `pre-push`(安装器测试),`scripts/install-git-hooks.sh` 一键安装(Gitea Actions 无 runner,本地兜底)。
- `install-skills.sh` 支持 `--scope project --project-dir <根>`:装到项目 `.agents/skills`,独立状态文件。
- 新增 `scripts/scan-installed.sh`:扫描已装但非本仓库管理的第三方技能(当前 33 个,0 高危)。
- `generate-catalog.py` 增加 `has_evals` / `has_docs` 与 `coverage` 汇总;`validate-skills.py` 增加 `--coverage` 报告与路由表一致性检查。
- `SCOPE.md` 增加覆盖率路线图(3–4 周补齐 40 个技能的 evals 与文档);`MAINTENANCE.md` 同步。
### 覆盖率阶段 2(2026-11-01)
- 补齐剩余 24 个技能(dev 类为主)的 `evals/evals.json`(各 3 条)与 `docs/skills/<name>.md`(四段式)。
- `--coverage`:40 个 promoted+model-invoked 技能的 evals 与文档缺口 **24 → 0**。
+51
View File
@@ -0,0 +1,51 @@
# 技能维护节奏
> 配套 `SCOPE.md`(收不收)、`skill-creator`(怎么建)、`docs/skill-routing.md`(用哪个)。
> 本文件管「多久做一次什么」。
## 每次改动(任何分支)
> **批量提交前先建分支**:`git checkout -b <branch>`,再提交、推分支、开 PR。不要直接 commit 到 main(2026-11-01 阶段 2 漏建分支直接进 main,少了 PR 记录)。
1. 过 `SCOPE.md` 收录门槛(真实失败 + 组合不出来),新技能默认先 `beta`。
2. 跑四道门禁:`validate-skills.py --strict`、`scan-skill.sh`、`generate-catalog.py --check`、`tests/install-skills.test.sh`。
- 本机已用 `./scripts/install-git-hooks.sh` 装好 pre-commit / pre-push,commit/push 时自动执行;Gitea Actions 暂无 runner,不能依赖 CI。
- 跳过单次:`SKILL_GATE_SKIP=1 git commit ...`,提交信息里写原因。
3. 技能有增删改 → **同步回改** `docs/skill-routing.md` 与 `catalog.json`。
4. 更新 `plugin.json` 版本号与 `CHANGELOG.md`。
## 每日(随 7:30 项目日报)
- 两台机器跑 `install-skills.sh --audit`:**drift > 0 就要报**,并注明是「未安装 / 版本落后 / 本地改动」。
- 门禁失败或扫描出高危:立即处理,不等到日报。
- 例外:`beta` 与 `deprecated` 不计入 drift。
## 每周一 10:00 — evals 抽样回归
- 范围:上周改过的技能 + 3 个高风险技能(`dev-coding`、`dev-review`、`req-design`)。
- 每技能取 1 条关键用例,做「有技能 / 无技能」对比,按 rubric 打分。
- 结果记录到 `reports/evals/YYYY-Www.md`,进周报。
- 连续两次无增量的技能 → 按 `SCOPE.md` 评估降级。
- 不做全量(61 技能 × 3 用例成本过高);全量只在治理大改时做。
## 每月 1 日 10:00 — 漂移与目录审阅
- 两台机器 `--audit` 漂移必须为 0(beta/deprecated 除外)。
- 审 `catalog.json`:`description` 长度 <80 或 >600 的标黄;含「各种 / 等等 / 相关」这类泛化词的标出。
- 第三方技能(arkcli 等)有变动时,评估是否影响团队技能;跑一次 `./scripts/scan-installed.sh`。
- 跑 `python3 scripts/validate-skills.py --coverage`:报告缺 evals / 缺四段式文档的技能,按 `SCOPE.md` 的覆盖率路线图推进。
## 每季度首月 1 日 10:30 — 治理复核
- 人工过一遍 `docs/skill-routing.md`:删掉不再用的引用、补上新技能。
- 清理 `deprecated`:满 3 个月且无回滚需求 → 删除插件目录。
- 复核分桶与调用模式:还有没有命令型技能占着 `model-invoked`。
- 复核覆盖率:`--coverage` 的两项缺口是否按路线图收敛。
- 更新本文件与 `CHANGELOG.md`。
## 责任分工
- 项目经理 Bot:执行节奏、出周/月报、盯漂移与门禁。
- 改技能的 agent:负责门禁四件套与路由回改。
- 人工拍板项:废弃技能、路由变更、`promoted` 晋升。
+4
View File
@@ -208,5 +208,9 @@ A: SSE 模式直连远程服务器,零依赖开箱即用(推荐)。stdio
- Claude(兼容):`./install-skills.sh --agent claude`
- 看漂移:`./install-skills.sh --audit`
- **校验 / 安全 / 清单**:`python3 scripts/validate-skills.py`、`./scripts/scan-skill.sh`、`python3 scripts/generate-catalog.py`
- **本地门禁(Gitea Actions 无 runner,用 git hook 兜底)**:`./scripts/install-git-hooks.sh` 后,每次 commit 自动跑 `validate --strict` + `scan` + `catalog --check`,push 前跑安装器测试。跳过单次:`SKILL_GATE_SKIP=1`。
- **项目级安装**:`./install-skills.sh --agent codex --scope project --project-dir <项目根>` → 装到 `<项目根>/.agents/skills`。
- **第三方技能风险扫描**:`./scripts/scan-installed.sh`(扫已装但非本仓库管理的技能)。
- **建技能**:走 `skill-creator` 技能(收录门槛、分桶、调用模式、evals、四段式文档、路由回改),不要手写。
- **路由表**:`docs/skill-routing.md`(什么任务用哪个技能,人读;由原 `ai-proj-helper-entry` 技能降级而来)。
- **维护节奏**:`MAINTENANCE.md`(每次改动 / 每日 / 每周 / 每月 / 每季度各做什么)。
+14
View File
@@ -43,3 +43,17 @@
3. `./scripts/scan-skill.sh` 无高危项。
4. `python3 scripts/generate-catalog.py` 更新 `catalog.json`。
5. 版本号 + CHANGELOG 更新,走 PR。
## 覆盖率路线图(evals 与四段式文档)
目标集合:`promoted` 且 `model-invoked` 的技能(当前 40 个)。用户级命令技能(`user-invoked`)只要求四段式文档,不强制 evals。
| 阶段 | 范围 | 验收 |
| --- | --- | --- |
| 第 1 周 | `core/` + `req/` 类(约 15 个) | `--coverage` 里这些类目缺口为 0 |
| 第 2 周 | `dev/` 类(约 20 个) | 同上 |
| 第 3–4 周 | 其余(`integration/`、`biz/` 里仍 model-invoked 的) | 全量缺口为 0 |
每个技能的最低要求:`evals/evals.json` 3 条(正常 / 边界 / 失败恢复)+ `docs/skills/<name>.md` 四段式(What it does / When to reach for it / Common questions / It's working if)。
先用 `python3 scripts/validate-skills.py --coverage` 看当前缺口,再按阶段补。
+191 -62
View File
@@ -1,6 +1,13 @@
{
"repo": "ai-proj-helper",
"generated_at": "2026-10-31T14:21:07Z",
"coverage": {
"required": 40,
"with_evals": 40,
"with_docs": 40,
"missing_evals": [],
"missing_docs": []
},
"generated_at": "2026-10-31T21:19:23Z",
"total": 61,
"counts": {
"promoted/user-invoked": 18,
@@ -19,7 +26,9 @@
"description": "商务合同撰写。支持多种合同类型:软件订阅合同、软件定制开发合同、物流合同、销售服务合同、贸易合同等。当用户提到合同、协议、签约、合作协议相关任务时自动激活。",
"description_len": 78,
"path": "skills-biz/biz-contract-plugin/skills/SKILL.md",
"digest": "3c17cae1380d82a4"
"digest": "3c17cae1380d82a4",
"has_evals": false,
"has_docs": false
},
{
"name": "biz-ops",
@@ -30,7 +39,9 @@
"description": "商务运营技能。支持商业计划书(BP)撰写和商务合同起草。当用户提到商业计划书、BP、融资计划、商业模式、合同、协议、签约等相关任务时自动激活。",
"description_len": 71,
"path": "skills-biz/biz-ops-plugin/skills/SKILL.md",
"digest": "aa5433074ba277d6"
"digest": "aa5433074ba277d6",
"has_evals": false,
"has_docs": false
},
{
"name": "biz-plan",
@@ -41,7 +52,9 @@
"description": "商业计划书撰写。支持融资BP、战略规划、商业模式设计等。当用户提到商业计划书、BP、融资计划、商业模式、战略规划相关任务时自动激活。",
"description_len": 66,
"path": "skills-biz/biz-plan-plugin/skills/SKILL.md",
"digest": "b6f43a914b2f7b45"
"digest": "b6f43a914b2f7b45",
"has_evals": false,
"has_docs": false
},
{
"name": "finance",
@@ -52,7 +65,9 @@
"description": "财务对账技能。支持银行对账、应收对账、应付对账、内部往来对账等。通过自然语言实现账单导入、差异分析、对账报告生成。当用户提到对账、银行流水、应收应付、账单核对、财务核销相关任务时自动激活。",
"description_len": 94,
"path": "skills-biz/finance-plugin/skills/SKILL.md",
"digest": "0a9209bc4bf4db3a"
"digest": "0a9209bc4bf4db3a",
"has_evals": false,
"has_docs": false
},
{
"name": "ai-proj-helper-entry",
@@ -63,7 +78,9 @@
"description": "ai-proj-helper 技能库路由:告诉你有哪些技能、什么任务用哪个、以及「REQ released + PDV 通过才算交付」的强制口径。人在开始需求/开发/评审/发布任务前主动调用。",
"description_len": 96,
"path": "skills-core/ai-proj-helper-entry-plugin/skills/SKILL.md",
"digest": "41d39b76d4c71dbf"
"digest": "41d39b76d4c71dbf",
"has_evals": true,
"has_docs": false
},
{
"name": "ai-proj",
@@ -74,7 +91,9 @@
"description": "ai-proj 任务与需求管理。用于创建/查询/更新需求、任务、文档。当用户提到 ai-proj、任务管理、需求管理、REQ-XXX 相关操作时自动激活。",
"description_len": 77,
"path": "skills-core/ai-proj-plugin/skills/SKILL.md",
"digest": "77ce4d2eb10e1d29"
"digest": "77ce4d2eb10e1d29",
"has_evals": true,
"has_docs": true
},
{
"name": "pm-ask",
@@ -85,7 +104,9 @@
"description": "基于 ai-proj MCP + git log 真实数据的项目问答。禁止编造。当用户说\"/ask\"、\"问一下\"、\"统计一下\"、\"最近多少\"、\"谁做了多少\"、\"本月进度\"等项目相关问题时自动激活。",
"description_len": 98,
"path": "skills-core/pm-ask-plugin/skills/SKILL.md",
"digest": "e5b69a0b56985472"
"digest": "e5b69a0b56985472",
"has_evals": true,
"has_docs": true
},
{
"name": "pm-risk",
@@ -96,7 +117,9 @@
"description": "三维度项目风险扫描(需求层/代码层/流程层)。当用户说\"/risk\"、\"风险扫描\"、\"有什么风险\"、\"哪些需求停滞了\"、\"分支健康\"时自动激活。",
"description_len": 72,
"path": "skills-core/pm-risk-plugin/skills/SKILL.md",
"digest": "928cfec76018329f"
"digest": "928cfec76018329f",
"has_evals": true,
"has_docs": true
},
{
"name": "publish",
@@ -107,7 +130,9 @@
"description": "发布 ai-proj-helper 技能市场更新并通知飞书群。用户说 /publish 时激活。",
"description_len": 48,
"path": "skills-core/publish-plugin/skills/SKILL.md",
"digest": "48bfbb4149baddcc"
"digest": "48bfbb4149baddcc",
"has_evals": false,
"has_docs": false
},
{
"name": "skill-creator",
@@ -118,7 +143,9 @@
"description": "团队技能的标准流程:收录门槛、分桶生命周期、调用模式、SKILL.md 规范、evals 全量、四段式文档、路由回改。当要新建技能、大改现有技能、或评审一个技能是否合格时使用。",
"description_len": 88,
"path": "skills-core/skill-creator-plugin/skills/SKILL.md",
"digest": "18f18c43c3fa56a6"
"digest": "18f18c43c3fa56a6",
"has_evals": true,
"has_docs": false
},
{
"name": "agent-browser",
@@ -129,7 +156,9 @@
"description": "浏览器自动化技能。用于网页交互、E2E冒烟测试、需求验收验证、前端开发验证、截图对比。基于 Vercel agent-browser CLI。",
"description_len": 71,
"path": "skills-dev/agent-browser-plugin/skills/SKILL.md",
"digest": "f382bffe3d1c84b2"
"digest": "f382bffe3d1c84b2",
"has_evals": true,
"has_docs": true
},
{
"name": "agent-swarm",
@@ -140,7 +169,9 @@
"description": "Multi-agent orchestration using OpenAI Swarm patterns. Coordinate specialized agents for complex development workflows with handoffs and context sharing.",
"description_len": 153,
"path": "skills-dev/agent-swarm-plugin/skills/SKILL.md",
"digest": "a0d8a329ab9468f5"
"digest": "4164f82025a421bb",
"has_evals": true,
"has_docs": true
},
{
"name": "ai-chat",
@@ -151,7 +182,9 @@
"description": "AI Chat 测试与管理。发送消息测试 AI Chat 工具调用链路,管理工具开关和 Provider 配置,支持 local/staging 环境切换。",
"description_len": 78,
"path": "skills-dev/ai-chat-plugin/skills/SKILL.md",
"digest": "81193de50b43d95c"
"digest": "81193de50b43d95c",
"has_evals": true,
"has_docs": true
},
{
"name": "ai-proj-cicd-release",
@@ -162,7 +195,9 @@
"description": "Execute and audit the AI-Proj service CI/CD flow across Gitea gates, immutable image builds, staging verification, approved production release, rollback, and evidence capture. Use for AI-Proj CI status, release PRs, staging or production deployments, failed-release diagnosis, deployed commit/schema verification, and delivery-chain repair. Do not use for unrelated repositories or macOS application packaging.",
"description_len": 410,
"path": "skills-dev/ai-proj-cicd-release-plugin/skills/SKILL.md",
"digest": "49ef1b6865c2f1b3"
"digest": "49ef1b6865c2f1b3",
"has_evals": false,
"has_docs": false
},
{
"name": "ai-proj-macos-release",
@@ -173,7 +208,9 @@
"description": "Build, sign, notarize, publish, and verify the AI-Proj macOS Apple Silicon package through the repository's release chain. Use when asked to release, republish, update, or repair the downloadable macOS application, including Gatekeeper failures and download-manifest updates. Do not use for service deployments or unrelated applications.",
"description_len": 337,
"path": "skills-dev/ai-proj-macos-release-plugin/skills/SKILL.md",
"digest": "6f2496b941706137"
"digest": "6f2496b941706137",
"has_evals": false,
"has_docs": false
},
{
"name": "db-migration",
@@ -184,7 +221,9 @@
"description": "数据库变更方案插件。Migration 脚本生成、数据迁移策略、回滚方案。挂载在 design 阶段,涉及数据库变更时由 req-design 推荐激活。",
"description_len": 77,
"path": "skills-dev/db-migration-plugin/skills/SKILL.md",
"digest": "f8d6ebbddbbf7a71"
"digest": "f8d6ebbddbbf7a71",
"has_evals": true,
"has_docs": true
},
{
"name": "defect-analysis",
@@ -195,7 +234,9 @@
"description": "系统性设计缺陷分析。对需求方案/代码架构进行多维度检查,发现隐藏的技术风险和设计漏洞。当用户提到缺陷检查、方案审查、设计审计时自动激活。",
"description_len": 68,
"path": "skills-dev/defect-analysis-plugin/skills/SKILL.md",
"digest": "23dfafda92d0c622"
"digest": "23dfafda92d0c622",
"has_evals": true,
"has_docs": true
},
{
"name": "deploy-rollback",
@@ -206,7 +247,9 @@
"description": "回滚方案插件。部署后发现问题时的回滚策略和执行步骤。挂载在 deploy 阶段,部署出问题时激活。",
"description_len": 49,
"path": "skills-dev/deploy-rollback-plugin/skills/SKILL.md",
"digest": "75ebf66a3f74195a"
"digest": "75ebf66a3f74195a",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-android",
@@ -217,7 +260,9 @@
"description": "Android 开发插件。Kotlin + Jetpack Compose + Hilt 依赖注入。当涉及 Android 开发任务时按需加载。",
"description_len": 72,
"path": "skills-dev/dev-android-plugin/skills/SKILL.md",
"digest": "fb058d1059b56cdd"
"digest": "fb058d1059b56cdd",
"has_evals": false,
"has_docs": false
},
{
"name": "dev-arch",
@@ -228,7 +273,9 @@
"description": "软件架构设计技能。用于系统设计、技术选型、架构评审、设计文档编写。当用户提到架构设计、系统设计、技术方案、API 设计相关任务时自动激活。",
"description_len": 69,
"path": "skills-dev/dev-arch-plugin/skills/SKILL.md",
"digest": "c9a419c83a307a11"
"digest": "c9a419c83a307a11",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-cicd",
@@ -239,7 +286,9 @@
"description": "CI/CD 流水线设计、优化与排查。适配 Gitea Actions + Go/Swift/Next.js/Docker 栈。当用户提到 CI、CD、流水线、pipeline、workflow、构建失败、runner 相关任务时自动激活。",
"description_len": 119,
"path": "skills-dev/dev-cicd-plugin/skills/SKILL.md",
"digest": "a763f0f140516411"
"digest": "a763f0f140516411",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-coding",
@@ -250,7 +299,9 @@
"description": "软件编码开发技能。用于代码编写、功能实现、重构优化。集成 ai-proj CLI 进行任务管理和进度跟踪。核心支持 Go 后端 + Vue/React 前端开发。",
"description_len": 81,
"path": "skills-dev/dev-coding-plugin/skills/SKILL.md",
"digest": "1b754e668965132f"
"digest": "cc43720aa12bb8f6",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-commit",
@@ -261,7 +312,9 @@
"description": "智能 git commit — 分支保护 + 自动建功能分支 + Conventional Commits 生成。当用户说\"提交代码\"、\"commit\"、\"/commit\"、\"保存修改\"时自动激活。",
"description_len": 99,
"path": "skills-dev/dev-commit-plugin/skills/SKILL.md",
"digest": "1560658c4a30df45"
"digest": "1560658c4a30df45",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-deploy",
@@ -272,7 +325,9 @@
"description": "应用部署技能。支持 iOS TestFlight、Docker 容器等多平台部署。当用户提到部署、发布、TestFlight、上架、build、archive 相关任务时自动激活。",
"description_len": 90,
"path": "skills-dev/dev-deploy-plugin/skills/SKILL.md",
"digest": "fd15a9e9135bcc49"
"digest": "fd15a9e9135bcc49",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-integration",
@@ -283,7 +338,9 @@
"description": "前后端联调技能。API 契约验证、接口对接、联调报告生成。对应 req 流程 integration 阶段。纯后端需求自动跳过。",
"description_len": 64,
"path": "skills-dev/dev-integration-plugin/skills/SKILL.md",
"digest": "eff6be8eb57b7fef"
"digest": "eff6be8eb57b7fef",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-ios",
@@ -294,7 +351,9 @@
"description": "iOS 开发插件。Swift/SwiftUI + MVVM 架构,TestFlight 部署。当涉及 iOS 开发任务时按需加载。",
"description_len": 65,
"path": "skills-dev/dev-ios-plugin/skills/SKILL.md",
"digest": "44499e31f1abd5e2"
"digest": "44499e31f1abd5e2",
"has_evals": false,
"has_docs": false
},
{
"name": "dev-mcp",
@@ -305,7 +364,9 @@
"description": "MCP Bridge 开发插件。TypeScript MCP 服务开发,Token 管理,HTTP 客户端模式。当涉及 mcp-task-bridge 开发时按需加载。",
"description_len": 84,
"path": "skills-dev/dev-mcp-plugin/skills/SKILL.md",
"digest": "83d5912212fcfa4a"
"digest": "83d5912212fcfa4a",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-pda",
@@ -316,7 +377,9 @@
"description": "PDA 应用开发插件。Android 原生 + 扫码枪集成 + 离线优先。当涉及 PDA/手持终端开发时按需加载。",
"description_len": 57,
"path": "skills-dev/dev-pda-plugin/skills/SKILL.md",
"digest": "2524f2ecd4f2a834"
"digest": "2524f2ecd4f2a834",
"has_evals": false,
"has_docs": false
},
{
"name": "dev-review",
@@ -327,7 +390,9 @@
"description": "代码评审技能。六视角对抗性扫描法(含 Karpathy Scope 审计),用于 PR 代码审查、安全评审、质量检查。当执行 /req cr 或独立 PR review 时自动激活。",
"description_len": 91,
"path": "skills-dev/dev-review-plugin/skills/SKILL.md",
"digest": "a8a1ec79b85e3227"
"digest": "a8a1ec79b85e3227",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-scaffold",
@@ -338,7 +403,9 @@
"description": "模块脚手架插件。新建模块时自动生成分层代码骨架。挂载在 dev 阶段,新建模块时激活。",
"description_len": 43,
"path": "skills-dev/dev-scaffold-plugin/skills/SKILL.md",
"digest": "4044787b1e468302"
"digest": "4044787b1e468302",
"has_evals": true,
"has_docs": true
},
{
"name": "dev-test",
@@ -349,7 +416,9 @@
"description": "软件测试技能。用于单元测试、集成测试、E2E测试、测试用例设计。支持 Go、Vue、React、iOS、Android 等多平台测试。",
"description_len": 67,
"path": "skills-dev/dev-test-plugin/skills/dev-test/SKILL.md",
"digest": "a03536a478eabe6c"
"digest": "a03536a478eabe6c",
"has_evals": true,
"has_docs": true
},
{
"name": "executing-plans",
@@ -360,7 +429,9 @@
"description": "Use when you have a written implementation plan to execute in a separate session with review checkpoints",
"description_len": 104,
"path": "skills-dev/executing-plans-plugin/skills/SKILL.md",
"digest": "8991a50091af83a4"
"digest": "8991a50091af83a4",
"has_evals": true,
"has_docs": true
},
{
"name": "finishing-a-development-branch",
@@ -371,7 +442,9 @@
"description": "Use when implementation is complete and all tests pass - verifies and creates PR",
"description_len": 80,
"path": "skills-dev/finishing-branch-plugin/skills/SKILL.md",
"digest": "1102047ccc060e60"
"digest": "1102047ccc060e60",
"has_evals": true,
"has_docs": true
},
{
"name": "frontend-design",
@@ -382,7 +455,9 @@
"description": "Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.",
"description_len": 234,
"path": "skills-dev/frontend-design-plugin/skills/SKILL.md",
"digest": "84e9c104be7967cc"
"digest": "84e9c104be7967cc",
"has_evals": true,
"has_docs": true
},
{
"name": "karpathy-guidelines",
@@ -393,7 +468,9 @@
"description": "Karpathy 四原则编码行为守则。减少 LLM 常见编码错误:过度实现、静默假设、顺手重构、无验证标准。在任意编码场景激活。",
"description_len": 64,
"path": "skills-dev/karpathy-guidelines-plugin/skills/SKILL.md",
"digest": "a68f347031110d6a"
"digest": "a68f347031110d6a",
"has_evals": true,
"has_docs": true
},
{
"name": "pull-request",
@@ -404,7 +481,9 @@
"description": "Use when starting new development tasks, creating pull requests, reviewing code, or managing PR feedback cycles on Gitea. Triggers on /pr commands or when user mentions PR, pull request, code review, or branch creation.",
"description_len": 219,
"path": "skills-dev/pull-request-plugin/skills/SKILL.md",
"digest": "40dac0d290782bb5"
"digest": "40dac0d290782bb5",
"has_evals": true,
"has_docs": true
},
{
"name": "review-checklist",
@@ -415,7 +494,9 @@
"description": "项目级代码评审检查清单。按项目积累特定检查项,挂载在 dev-review 下自动加载。每次 CR 时触发。",
"description_len": 54,
"path": "skills-dev/review-checklist-plugin/skills/SKILL.md",
"digest": "5bae13b6a8d92650"
"digest": "5bae13b6a8d92650",
"has_evals": true,
"has_docs": true
},
{
"name": "slark-cicd",
@@ -426,7 +507,9 @@
"description": "Slark 仓库 staging、生产和 Desktop 安装包的端到端 CI/CD 可执行 runbook。覆盖本地预推快检、PR 与内网 ci/internal-gate 门禁、合并 origin/main、生产前强制 staging 验收、审批式生产发布,以及在 m5max 构建签名、公证并上传 macOS/Windows Desktop 包到 OSS。当用户要在 slark(qiudl/qiu-slark)里发布/上线、部署到生产或 staging、发布 Desktop 安装包、盯 CI/合并 PR、复现或验证运行时行为、或排查发布链/推送路由问题时使用。",
"description_len": 285,
"path": "skills-dev/slark-cicd-plugin/skills/SKILL.md",
"digest": "2919c19d8a38dd23"
"digest": "1ff9b89a5fbc6e2d",
"has_evals": true,
"has_docs": true
},
{
"name": "slark-dsh-cicd",
@@ -437,7 +520,9 @@
"description": "DSH 插件包与 Slark 宿主补丁的发布 runbook。覆盖 npm run pack 双 tgz 双资产、无上游写权限时的 fork 发布、干净单提交与树一致性 gate、改指向后必须重新打包、draft→publish 节奏、GitHub HTTPS/SSH 与 fetch 卡死处置、发布后 SHA 核对、app.asar 完整性约束、ai-proj 发布状态对齐。当用户要发布或升级 DSH 插件(dsh-worktable 等)、发布/更新 Slark 宿主补丁、push 或下载 GitHub 失败、插件「检查更新」看不到新版本、需要 fork 发布、或排查 asar 完整性/签名问题时使用。",
"description_len": 306,
"path": "skills-dev/slark-dsh-cicd-plugin/skills/SKILL.md",
"digest": "44a1322e15d42845"
"digest": "9819e2d515ab44e0",
"has_evals": true,
"has_docs": true
},
{
"name": "data-excel",
@@ -448,7 +533,9 @@
"description": "Excel 数据处理与 BI 集成。通过自然语言操作 Excel 文件的读取、编辑、转换,并支持导入到 BI 系统(Metabase)进行可视化分析。当用户提到 Excel、表格处理、数据导入、BI 分析相关任务时自动激活。",
"description_len": 112,
"path": "skills-integration/data-excel-plugin/skills/SKILL.md",
"digest": "8dc4be8f88cfd866"
"digest": "8dc4be8f88cfd866",
"has_evals": false,
"has_docs": false
},
{
"name": "doubao-voice",
@@ -459,7 +546,9 @@
"description": "豆包语音API调用。支持语音合成(TTS)和唱歌。当用户提到语音合成、文字转语音、唱歌、豆包语音相关任务时自动激活。",
"description_len": 58,
"path": "skills-integration/doubao-voice-plugin/skills/SKILL.md",
"digest": "7dc73d3b97e61fd2"
"digest": "7dc73d3b97e61fd2",
"has_evals": false,
"has_docs": false
},
{
"name": "feishu-bitable",
@@ -470,7 +559,9 @@
"description": "飞书多维表格操作。用于记录增删改查、批量操作、筛选排序、数据同步。当需要操作飞书多维表格时使用。",
"description_len": 48,
"path": "skills-integration/feishu-bitable-plugin/skills/SKILL.md",
"digest": "3bf37533007365a3"
"digest": "3bf37533007365a3",
"has_evals": false,
"has_docs": false
},
{
"name": "feishu-docx",
@@ -481,7 +572,9 @@
"description": "飞书云文档操作。用于创建、编辑云文档,插入内容块,会议纪要生成。当需要操作飞书云文档时使用。",
"description_len": 46,
"path": "skills-integration/feishu-docx-plugin/skills/SKILL.md",
"digest": "49d097bfa2c283ab"
"digest": "49d097bfa2c283ab",
"has_evals": false,
"has_docs": false
},
{
"name": "feishu",
@@ -492,7 +585,9 @@
"description": "飞书文档与多维表格操作入口。当用户提到飞书、云文档、多维表格、Bitable 相关任务时自动激活。",
"description_len": 49,
"path": "skills-integration/feishu-plugin/skills/SKILL.md",
"digest": "973c6ac22104ee38"
"digest": "973c6ac22104ee38",
"has_evals": false,
"has_docs": false
},
{
"name": "siyuan",
@@ -503,7 +598,9 @@
"description": "思源笔记 API 集成。通过自然语言创建、编辑、搜索笔记,管理笔记本和文档树。当用户提到思源笔记、SiYuan、笔记管理、知识库相关任务时自动激活。",
"description_len": 74,
"path": "skills-integration/siyuan-plugin/skills/SKILL.md",
"digest": "2736c2b708791763"
"digest": "2736c2b708791763",
"has_evals": false,
"has_docs": false
},
{
"name": "siyuan-to-feishu",
@@ -514,7 +611,9 @@
"description": "将思源笔记导出为 PDF 并发送到飞书群。当用户提到\"发送笔记\"、\"导出PDF发飞书\"、\"/siyuan send\"、\"分享到飞书\"相关任务时自动激活。",
"description_len": 76,
"path": "skills-integration/siyuan-to-feishu-plugin/skills/SKILL.md",
"digest": "998dace910c1eb7a"
"digest": "998dace910c1eb7a",
"has_evals": false,
"has_docs": false
},
{
"name": "wecom",
@@ -525,7 +624,9 @@
"description": "企业微信集成。通过自然语言发送消息、管理群机器人、操作审批流程、管理通讯录。当用户提到企业微信、微信工作、群机器人、企业号、wecom相关任务时自动激活。",
"description_len": 77,
"path": "skills-integration/wecom-plugin/skills/SKILL.md",
"digest": "7084d88ccb87ba9b"
"digest": "7084d88ccb87ba9b",
"has_evals": false,
"has_docs": false
},
{
"name": "req-audit",
@@ -536,7 +637,9 @@
"description": "部署后审计。运行时日志检查 + 静态缺陷分析 + 设计偏移检测。可独立调用或由 /req done 自动触发。",
"description_len": 55,
"path": "skills-req/req-audit-plugin/skills/SKILL.md",
"digest": "ff2e6197bbb059c6"
"digest": "ff2e6197bbb059c6",
"has_evals": true,
"has_docs": true
},
{
"name": "req-compare",
@@ -547,7 +650,9 @@
"description": "对比式需求分析插件。系统平移、竞品借鉴、版本升级时使用参考对象对比法编写 PRD。挂载在 analysis 阶段,需要对比分析时由 req-prd 推荐激活。",
"description_len": 79,
"path": "skills-req/req-compare-plugin/skills/SKILL.md",
"digest": "3428e3f37ef9e9e8"
"digest": "3428e3f37ef9e9e8",
"has_evals": true,
"has_docs": true
},
{
"name": "req-design",
@@ -558,7 +663,9 @@
"description": "需求开发设计技能。用于 PRD 到开发设计的转换:API 契约定义、数据模型变更方案、变更文件清单、开发任务拆分、技术风险评估。当用户执行 /req doc 或需要编写开发设计文档时自动激活。",
"description_len": 96,
"path": "skills-req/req-design-plugin/skills/SKILL.md",
"digest": "74848800cab6e269"
"digest": "74848800cab6e269",
"has_evals": true,
"has_docs": true
},
{
"name": "req-dev",
@@ -569,7 +676,9 @@
"description": "需求开发计划编写技能。用于 PRD 到代码转换、代码库分析、开发任务拆分、技术方案设计。当用户执行 /req doc 或需要编写开发计划时自动激活。",
"description_len": 74,
"path": "skills-req/req-dev-plugin/skills/SKILL.md",
"digest": "494a5be5e7a11c0b"
"digest": "494a5be5e7a11c0b",
"has_evals": true,
"has_docs": true
},
{
"name": "req-lookback",
@@ -580,7 +689,9 @@
"description": "回归测试。部署后自动验证变更涉及的功能是否正常。可独立调用或由 /req done 自动触发。",
"description_len": 47,
"path": "skills-req/req-lookback-plugin/skills/SKILL.md",
"digest": "cc6bff614a8f7bf4"
"digest": "cc6bff614a8f7bf4",
"has_evals": true,
"has_docs": true
},
{
"name": "req",
@@ -591,7 +702,9 @@
"description": "需求工作流管理。用于 /req 命令使用、需求全生命周期管理(创建→PRD→评审→开发→测试→部署→归档)。当用户提到需求管理、/req 命令、REQ-XXX 相关任务时自动激活。",
"description_len": 90,
"path": "skills-req/req-plugin/skills/SKILL.md",
"digest": "193cf871b73faff1"
"digest": "193cf871b73faff1",
"has_evals": true,
"has_docs": true
},
{
"name": "req-prd",
@@ -602,7 +715,9 @@
"description": "产品设计与需求管理。用于 PRD、需求分析、用户故事、功能设计和原型规划,并将正式需求文档双写到本地仓库与 ai-proj Task Document。",
"description_len": 76,
"path": "skills-req/req-prd-plugin/skills/SKILL.md",
"digest": "7c4ad2baab6b2118"
"digest": "7c4ad2baab6b2118",
"has_evals": true,
"has_docs": true
},
{
"name": "req-prototype",
@@ -613,7 +728,9 @@
"description": "原型生成与关联。生成可交互 HTML、上传到 ai-proj OSS 并关联 Requirement/PRD iframe,也支持 Stitch AI 视觉探索。",
"description_len": 81,
"path": "skills-req/req-prototype-plugin/skills/SKILL.md",
"digest": "7e362f4f895fb50a"
"digest": "7e362f4f895fb50a",
"has_evals": true,
"has_docs": true
},
{
"name": "req-research",
@@ -624,7 +741,9 @@
"description": "需求调研插件。代码审计、数据库分析、现有功能调研、技术可行性评估。挂载在 analysis 阶段,需要深度调研时由 req-prd 推荐激活。",
"description_len": 71,
"path": "skills-req/req-research-plugin/skills/SKILL.md",
"digest": "a94924f53bd4c80e"
"digest": "a94924f53bd4c80e",
"has_evals": true,
"has_docs": true
},
{
"name": "req-retro",
@@ -635,7 +754,9 @@
"description": "复盘总结。自动采集数据、计算质量评分、跨需求模式识别、技能自动进化。可独立调用或由 /req done 自动触发。",
"description_len": 57,
"path": "skills-req/req-retro-plugin/skills/SKILL.md",
"digest": "636b7099d85e9549"
"digest": "636b7099d85e9549",
"has_evals": true,
"has_docs": true
},
{
"name": "req-review",
@@ -646,7 +767,9 @@
"description": "PRD 评审方法论。用于需求评审、PRD 文档审查、评审意见编写。当执行 /req review 或需要评审 PRD 文档时使用。",
"description_len": 65,
"path": "skills-req/req-review-plugin/skills/SKILL.md",
"digest": "cd1a5181d72f35f4"
"digest": "cd1a5181d72f35f4",
"has_evals": true,
"has_docs": true
},
{
"name": "req-test-gate",
@@ -657,7 +780,9 @@
"description": "测试与质量门禁制度。覆盖需求级测试(Gates 1-5)、部署级验证(Deploy Gates)、持续回归(Regression)、Harness Engineering 工程约束方法论(Ratchet、约定建立、门禁层级)。当用户提到质量门禁、架构约束、约定检查、ratchet、harness 相关任务时自动激活。",
"description_len": 159,
"path": "skills-req/req-test-gate-plugin/skills/SKILL.md",
"digest": "ceebcc2516ad40d3"
"digest": "ceebcc2516ad40d3",
"has_evals": true,
"has_docs": true
},
{
"name": "req-workflow",
@@ -668,7 +793,9 @@
"description": "需求完整工作流。用于从创建到归档的完整流程、Hook 自动同步、测试环境流程。当需要了解需求完整生命周期或同步策略时使用。",
"description_len": 61,
"path": "skills-req/req-workflow-plugin/skills/SKILL.md",
"digest": "87499da3817d162d"
"digest": "87499da3817d162d",
"has_evals": true,
"has_docs": true
},
{
"name": "verification-before-completion",
@@ -679,7 +806,9 @@
"description": "汇报「完成/修好/通过」或关闭任务、提交 PR、宣布 REQ 完成之前,必须先运行验证命令并附证据;没有证据不得声称完成。当准备说完成、关闭任务、或汇报交付前使用。",
"description_len": 82,
"path": "skills-req/verification-before-completion-plugin/skills/SKILL.md",
"digest": "7c23649f4a0a8798"
"digest": "7c23649f4a0a8798",
"has_evals": true,
"has_docs": false
}
]
}
+1 -1
View File
@@ -241,7 +241,7 @@ on:
- devflow-claude: `plugins/req/commands/release.md`
- REQ-20260416-0017(母需求)
- 当前 build.yaml: `/Users/donglinlai/coding/qiudl/new-ai-proj/.gitea/workflows/build.yaml`
- 当前 build.yaml: `~/coding/qiudl/new-ai-proj/.gitea/workflows/build.yaml`
- Gitea Release API: https://docs.gitea.com/api/next/#tag/repository/operation/repoCreateRelease
---
+21
View File
@@ -0,0 +1,21 @@
# agent-browser
## What it does
浏览器自动化(snapshot-ref)。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# agent-swarm
## What it does
多 agent 编排(Swarm 模式)。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# ai-chat
## What it does
AI Chat 工具调用测试与配置。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+24
View File
@@ -0,0 +1,24 @@
# ai-proj — 任务与需求管理
## What it does
通过 ai-proj(`https://ai.pipexerp.com`)的 MCP / CLI 管理需求、任务、文档与进度:查询、创建、更新状态、关联需求与任务、挂证据文档。是所有项目状态数据的唯一权威来源。
## When to reach for it
- 要查「某个 REQ / 任务的真实状态、优先级、截止、关联任务」
- 要更新任务状态、挂文档、改优先级、改派
- 汇报进度或做对齐检查前,需要拉真实数据
## Common questions
- **数据以哪为准?** ai-proj,不靠聊天记录或记忆。主机必须是 `https://ai.pipexerp.com`(写成 `api.pipexerp.com` 会失败)。
- **可以自己改需求优先级吗?** 不行,需求优先级是业务决策;任务优先级可以对齐需求。
- **任务 completed 就是完成了吗?** 不是,REQ 未 `released` 只能算步骤完成。
- **接口报错怎么排查?** 先 GET 查证实体是否存在、凭证主机是否正确,不要猜 ID。
## It's working if
- 问「REQ-XXXX 现在什么状态」时,它给出带字段名与时间戳的真实数据,而不是复述对话
- 更新任务状态前先查一次实体,写入后回读确认
- 遇到 404/401 时给的是排查步骤与真实查询结果,不是编造的 ID
+21
View File
@@ -0,0 +1,21 @@
# db-migration
## What it does
数据库变更与回滚。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# defect-analysis
## What it does
设计缺陷多维度分析。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# deploy-rollback
## What it does
部署回滚决策与步骤。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-arch
## What it does
架构设计与技术选型。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-cicd
## What it does
CI/CD 流水线设计、优化与排障。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-coding
## What it does
编码实现与任务跟踪。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-commit
## What it does
智能提交(分支保护 + Conventional)。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-deploy
## What it does
应用部署(TestFlight / Docker)。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-integration
## What it does
前后端联调。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-mcp
## What it does
MCP Bridge 开发。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-review
## What it does
六视角对抗性代码评审。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-scaffold
## What it does
模块脚手架。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# dev-test
## What it does
测试设计与执行。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# executing-plans
## What it does
执行书面计划并设检查点。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
@@ -0,0 +1,21 @@
# finishing-a-development-branch
## What it does
开发分支收尾与建 PR。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# frontend-design
## What it does
高质量前端界面设计。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# karpathy-guidelines
## What it does
Karpathy 四原则编码守则。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+22
View File
@@ -0,0 +1,22 @@
# pm-ask
## What it does
基于 ai-proj MCP 与 git log 真实数据的项目问答:统计任务/需求数量、进度、谁做了什么,回答前必须查真实数据。
## When to reach for it
用户说 /ask、问一下、统计一下、最近多少、谁做了多少、本月进度时。
## Common questions
- **数据从哪来?** ai-proj MCP + git log,不靠记忆和估算。
- **查不到数据怎么办?** 如实报告缺失与失败原因,给出查询口径,不编造数字。
- **能做预测吗?** 只能基于真实阶段数据做推导,并标注假设。
- **回答格式?** 先给结论数字,再给来源与口径。
## It's working if
- 问团队本月产出时,它先拉数据再回答,并附时间范围与来源
- 接口异常时明确说“数据未取到”,不出现任何编造数字
- 对“估一下”的请求,给口径而不是给假数字
+22
View File
@@ -0,0 +1,22 @@
# pm-risk
## What it does
三维度项目风险扫描:需求层(停滞/逾期/优先级)、代码层(分支健康/评审积压)、流程层(门禁/交付态),按严重/警告/提示分级输出。
## When to reach for it
用户说 /risk、风险扫描、有什么风险、哪些需求停滞了、分支健康时。
## Common questions
- **找不到数据算无风险吗?** 不算,缺失要标注未覆盖。
- **分级标准?** 严重=已阻塞交付;警告=会拖延;提示=观察项。
- **会不会误报?** 每条风险附证据与来源,便于人工复核。
- **输出多长?** 先概览再分项,严重项必须置顶。
## It's working if
- 扫描报告每条风险都有数据来源,不是笼统描述
- 数据源不可用时明确写“该维度未覆盖”
- 不会因为查不到就输出“无风险”
+21
View File
@@ -0,0 +1,21 @@
# pull-request
## What it does
PR 创建与评审反馈循环(Gitea)。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+22
View File
@@ -0,0 +1,22 @@
# req-audit
## What it does
部署后审计:运行时日志检查、静态缺陷分析、设计偏移检测,产出审计报告并关联任务。
## When to reach for it
需求部署后,或用户说“审计一下”“部署后检查”时;也可由 /req done 触发。
## Common questions
- **审计和测试的区别?** 测试验证功能对错,审计查运行时异常、代码缺陷与实现是否偏离设计。
- **没日志能审吗?** 能审静态部分,但运行时项必须标未覆盖。
- **发现偏移怎么办?** 列偏移项+影响面+建议,交给负责人决策。
- **报告存哪?** 关联到需求/任务文档,便于回溯。
## It's working if
- 审计报告包含三类检查结果与证据
- 缺运行时证据时明确标未覆盖
- 发现偏移会列出具体条目而不是笼统说“有偏差”
+22
View File
@@ -0,0 +1,22 @@
# req-compare
## What it does
对比式需求分析:以参考系统为基准做功能对比,再推导目标系统设计,产出对比式 PRD。
## When to reach for it
系统平移、竞品借鉴、版本升级需要对比论证时。
## Common questions
- **没有参考资料能写吗?** 可以写,但参考系统细节必须标注为待验证假设。
- **对比维度怎么定?** 按功能、交互、数据、权限、成本五类,按需求裁剪。
- **结论要什么形式?** 对比表 + 差异结论 + 目标系统取舍。
- **会不会照搬竞品?** 只借鉴结论,落地按自身约束重新设计。
## It's working if
- 对比表每行能追溯到资料或标注为假设
- 结论明确给出取舍而不是罗列
- 没有把“凭印象”写成事实
+22
View File
@@ -0,0 +1,22 @@
# req-design
## What it does
PRD 到开发设计的转换:API 契约、数据模型变更、变更文件清单、任务拆分与依赖、技术风险评估。
## When to reach for it
执行 /req doc、或在评审后进入设计阶段时。
## Common questions
- **设计前需要什么?** PRD 与验收标准;缺验收标准要先补。
- **任务拆到什么粒度?** 单任务 2–4 小时可完成,带依赖边与验收标准。
- **找不到模块怎么办?** 报告缺失并给待确认项,不猜路径。
- **要写测试策略吗?** 要,随设计一起给。
## It's working if
- 输出含契约表、变更文件、子任务三件套
- 缺验收标准时会阻断而不是硬写
- 任务清单里有 blockers,不只有层级
+22
View File
@@ -0,0 +1,22 @@
# req-dev
## What it does
把 PRD 转成可执行开发计划:代码库分析、现有实现盘点、任务拆分、技术方案与风险。
## When to reach for it
执行 /req doc、需要从需求走到可执行计划时。
## Common questions
- **和 req-design 区别?** req-dev 重“怎么落地”:代码库分析与任务拆分;req-design 重设计文档与契约。
- **不看代码能拆吗?** 不能,先分析再拆。
- **计划里要有什么?** 任务、依赖、验收、风险、需要确认项。
- **代码库与 PRD 冲突?** 以真实代码为准,报告差异后调整。
## It's working if
- 计划里的任务能直接执行,附依赖与验收
- 不读代码就要求拆任务会被拒绝
- 发现代码与 PRD 不符会报告差异而不是硬拆
+22
View File
@@ -0,0 +1,22 @@
# req-lookback
## What it does
部署后回归测试:按变更影响面验证既有功能是否被破坏,产出回归报告。
## When to reach for it
需求部署后;或 /req done 前需要确认无回归时。
## Common questions
- **回归范围怎么定?** 按变更影响的模块与调用方扩散确定。
- **只测新功能行吗?** 不行,必须覆盖受影响面。
- **发现问题怎么办?** 报告复现与影响,给回滚/修复建议。
- **要留证据吗?** 要,命令与结果。
## It's working if
- 回归报告含影响范围、用例、结果
- 要求只测新功能会被拒绝
- 发现回归会给出回滚或修复建议
+22
View File
@@ -0,0 +1,22 @@
# req-prd
## What it does
产品需求文档(PRD)编写与双写:按模板产出需求/预期/验收标准、界面原型要求,并同时写入本地仓库与 ai-proj Task Document。
## When to reach for it
需求讨论确认后要写 PRD、或用 /req prd 时。
## Common questions
- **PRD 最少要有什么?** 需求描述、预期结果、≥2 条可检查验收标准。
- **为什么要双写?** 本地可版本化,ai-proj 供评审与追溯。
- **验收标准怎么写?** 可检查、可对应测试,不写“体验良好”这类。
- **写入失败怎么办?** 保留本地并报告失败,不假装成功。
## It's working if
- PRD 都含可检查验收标准
- 写入后回读确认,不只打印成功
- 失败时明确报失败并保留本地稿
+22
View File
@@ -0,0 +1,22 @@
# req-prototype
## What it does
原型生成与关联:把 PRD 转成可交互 HTML 原型,上传并关联到需求的 prototype_urls,支持 Stitch 视觉探索。
## When to reach for it
有 UI 的需求在 PRD/缺陷收敛后需要原型时。
## Common questions
- **原型要确认吗?** 要,确认后才能作为开发依据。
- **上传失败会丢吗?** 本地保留,报告失败。
- **能直接改线上页面吗?** 不能,原型是独立 HTML。
- **和 PRD 什么关系?** 原型回填到 PRD 的界面章节。
## It's working if
- 原型生成后有可访问链接并回读关联成功
- 要求跳过确认直接开发会被劝回
- 上传失败时本地文件仍在
+22
View File
@@ -0,0 +1,22 @@
# req-research
## What it does
需求调研:代码审计、数据库分析、现有功能盘点、技术可行性评估,产出带证据的调研报告。
## When to reach for it
analysis 阶段需要深度调研,或 /req research 时。
## Common questions
- **结论要有证据吗?** 要有,file:line 或查询结果。
- **找不到怎么办?** 报告缺口与假设,不编造。
- **和 req-dev 区别?** research 判断“能不能、怎么做”,dev 出“具体计划”。
- **报告给谁?** PRD/设计阶段的输入。
## It's working if
- 调研报告每条结论有证据出处
- 不看代码就下结论会被拒
- 找不到模块会列待确认项
+22
View File
@@ -0,0 +1,22 @@
# req-retro
## What it does
复盘总结:采集数据计算质量评分、还原时间线、识别跨需求模式,沉淀经验教训。
## When to reach for it
/req done 后、或用户说“复盘一下”时。
## Common questions
- **评分怎么来?** 按时间线、缺陷、返工、门禁通过率等指标计算。
- **数据不全怎么办?** 标注缺失,给部分结论。
- **经验存哪?** 写入 memory / 技能改进项。
- **会不会只夸不批?** 要列问题与改进项。
## It's working if
- 评分附计算依据
- 数据缺失时明确标注而不是编造
- 复盘产出可执行的改进项
+22
View File
@@ -0,0 +1,22 @@
# req-review
## What it does
PRD 评审方法论:结构完整性、需求清晰度(SMART)、技术可行性、数据模型、API、原型检查,输出通过/打回结论与理由。
## When to reach for it
/req review、或需要评审 PRD 时。
## Common questions
- **评审看什么?** 结构、清晰度、可行性、数据/API/原型。
- **能免检通过吗?** 不能,必须有依据。
- **打回要写什么?** 缺失项+修改要求。
- **提交人能自审吗?** 不能。
## It's working if
- 评审结论都有逐项检查记录
- 无依据的“通过”会被拒绝
- 打回时列出具体缺失项
+22
View File
@@ -0,0 +1,22 @@
# req-test-gate
## What it does
需求级质量门禁(Gate 0–5)与部署级验证制度:逐门禁检查、留证据、不通过不放行。
## When to reach for it
/req test、准备部署前、或用户问门禁是否通过时。
## Common questions
- **门禁能跳吗?** 不能,除非记录阻塞并获豁免。
- **失败能忽略吗?** 不能,必须记录并阻断。
- **证据留哪?** 测试报告与任务文档。
- **部署前还要什么?** 部署级验证与回滚预案。
## It's working if
- 门禁结论逐条有证据
- 跳门禁/忽略失败会被拒绝
- 测试报告能直接作为发布依据
+22
View File
@@ -0,0 +1,22 @@
# req-workflow
## What it does
需求完整工作流参考:从创建到归档的阶段划分、每阶段门禁、交付物、Hook 同步与测试环境流程。
## When to reach for it
需要理解完整生命周期、或判断某需求下一步该做什么时。
## Common questions
- **阶段顺序?** 创建→讨论→PRD→评审→设计→开发→测试→staging→released→归档。
- **能跳 staging 吗?** 不能,强制验收。
- **状态不一致听谁的?** 以真实数据为准并核对。
- **交付终点?** released + PDV 验收通过。
## It's working if
- 能按阶段说清下一步动作与门禁
- 跳过 staging 会被拒绝
- 发现状态矛盾会先核对再结论
+23
View File
@@ -0,0 +1,23 @@
# req — 需求全生命周期
## What it does
把一条需求从创建推进到归档:创建 → 讨论确认 → PRD → 评审 → 开发 → 测试 → 部署 staging/prod → PDV 验收 → released → 归档。同时约束评审、门禁与交付口径,防止跳步和自审批。
## When to reach for it
- 用户说「/req」「新建需求」「需求走到哪了」「提交评审」「部署上线」时
- 任何需求类工作开始时的第一步(先确定当前阶段,再决定下一个命令)
## Common questions
- **能不能跳过评审直接开发?** 不能。PRD 是评审前置,评审通过才能进 dev。
- **提交人能不能自己批?** 不能;`allow_self_approve` 只作临时手段且要收回。
- **任务都 completed 了算交付吗?** 不算,需求要走到 `released` + PDV 验收通过。
- **部署是每个需求单独做吗?** 各需求独立到 testing 后进待部署池,由 `/req deploy` 批量推进。
## It's working if
- 问「这个需求现在到哪一步、下一步做什么」时,它先给出 `delivery_stage` 与下一个命令,而不是直接开始写代码
- 出现「直接改 approved」「跳过 PRD」这类请求时,它会阻断并给出正确路径
- 汇报完成时用的是「REQ 阶段 + 下一节点」,不是「某个开发步骤完成」
+21
View File
@@ -0,0 +1,21 @@
# review-checklist
## What it does
项目级评审检查清单。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# slark-cicd
## What it does
Slark 仓库发布 runbook。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+21
View File
@@ -0,0 +1,21 @@
# slark-dsh-cicd
## What it does
DSH 插件与宿主补丁发布 runbook。
## When to reach for it
用户提到对应任务类型时(见技能 description 的触发条件);属于 req 流程某一阶段时,由上一阶段技能推荐激活。
## Common questions
- **能省步骤赶时间吗?** 不能,该技能里的强制项/铁律不可跳过。
- **和相邻技能怎么分工?** 按阶段职责:本技能负责自己那一段,上下游交给对应技能。
- **失败了怎么办?** 停下报告失败步骤、证据与选项,不硬推、不静默降级。
## It's working if
- 按它执行时,关键步骤和门禁都有明确结论与证据,而不是"大概没问题"
- 想抄近路/跳过强制项时会被拒绝,并给出正确路径
- 失败时输出的是失败点 + 证据 + 下一步,而不是含糊"已完成"
+3 -3
View File
@@ -23,7 +23,7 @@
"hooks": [
{
"type": "command",
"command": "/Users/donglinlai/coding/qiudl/ai-proj-helper/hooks/session-context.sh",
"command": "~/coding/qiudl/ai-proj-helper/hooks/session-context.sh",
"timeout": 10
}
]
@@ -35,7 +35,7 @@
"hooks": [
{
"type": "command",
"command": "/Users/donglinlai/coding/qiudl/ai-proj-helper/hooks/pre-tool-confirm.sh",
"command": "~/coding/qiudl/ai-proj-helper/hooks/pre-tool-confirm.sh",
"timeout": 30
}
]
@@ -48,7 +48,7 @@
### 方式 2:一键安装脚本
```bash
bash /Users/donglinlai/coding/qiudl/ai-proj-helper/hooks/install.sh
bash ~/coding/qiudl/ai-proj-helper/hooks/install.sh
```
## 验证
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# skill-gate 本地门禁:Gitea Actions 没有 runner,靠这个兜底。
# 跳过:SKILL_GATE_SKIP=1 git commit ...(需在提交信息里说明原因)
set -uo pipefail
[ "${SKILL_GATE_SKIP:-0}" = "1" ] && { echo "[skill-gate] skipped by SKILL_GATE_SKIP=1"; exit 0; }
cd "$(git rev-parse --show-toplevel)" || exit 1
fail=0
echo "[skill-gate] validate --strict"
python3 scripts/validate-skills.py --strict || fail=1
echo "[skill-gate] scan"
./scripts/scan-skill.sh >/tmp/skill-gate-scan.log 2>&1 || { fail=1; tail -5 /tmp/skill-gate-scan.log; }
echo "[skill-gate] catalog --check"
python3 scripts/generate-catalog.py --check || fail=1
if [ "$fail" -ne 0 ]; then
echo "[skill-gate] 未通过:先修复,或用 SKILL_GATE_SKIP=1 并在提交信息里说明原因"
exit 1
fi
echo "[skill-gate] OK"
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# skill-gate 推送前门禁:安装器测试 + 覆盖率提示
set -uo pipefail
[ "${SKILL_GATE_SKIP:-0}" = "1" ] && exit 0
cd "$(git rev-parse --show-toplevel)" || exit 1
echo "[skill-gate] install-skills 测试"
bash tests/install-skills.test.sh || { echo "[skill-gate] 测试失败"; exit 1; }
+1 -1
View File
@@ -8,7 +8,7 @@
# 安装方式:
# 在 ~/.claude/settings.json 的 hooks.SessionStart 配置:
# {
# "command": "/Users/donglinlai/coding/qiudl/ai-proj-helper/hooks/session-context.sh",
# "command": "$HOME/coding/qiudl/ai-proj-helper/hooks/session-context.sh",
# "timeout": 10
# }
#
+25 -1
View File
@@ -10,6 +10,8 @@
# --audit Show installed vs repo versions for the selected target
# --include-beta Also install skills whose plugin.json status=beta
# --no-validate Skip scripts/validate-skills.py before installing
# --scope <scope> user (default) or project (installs into <project>/.agents/skills)
# --project-dir <dir> Project root, required when --scope project
# --dry-run Preview changes without writing anything
# --category <cat> Only install plugins in dir_category=<cat>
# Valid values: biz, core, dev, integration, personal, req
@@ -38,6 +40,8 @@ LINK_MODE=false
AUDIT_ONLY=false
INCLUDE_BETA=false
NO_VALIDATE=false
SCOPE="user"
PROJECT_DIR=""
# ── Colour helpers ─────────────────────────────────────────────────────────────
GREEN='\033[0;32m'
@@ -63,6 +67,12 @@ while [[ $# -gt 0 ]]; do
--audit) AUDIT_ONLY=true ;;
--include-beta) INCLUDE_BETA=true ;;
--no-validate) NO_VALIDATE=true ;;
--scope)
[[ $# -ge 2 ]] || { error "--scope requires user or project"; exit 1; }
SCOPE="$2"; shift ;;
--project-dir)
[[ $# -ge 2 ]] || { error "--project-dir requires a path"; exit 1; }
PROJECT_DIR="$2"; shift ;;
--force) FORCE=true ;;
--cleanup) CLEANUP=true ;;
--list) LIST_ONLY=true ;;
@@ -90,7 +100,7 @@ case "$AGENT_TARGET" in
STATE_FILE="${AI_PROJ_HELPER_STATE_FILE:-${HOME}/.agents/.ai-proj-helper-installed-skills.json}"
;;
dsh)
if [[ -z "${DSH_HOME:-}" ]]; then
if [[ "$SCOPE" != "project" && -z "${DSH_HOME:-}" ]]; then
error "--agent dsh requires DSH_HOME (or set AI_PROJ_HELPER_SKILLS_DIR explicitly)"
exit 1
fi
@@ -108,6 +118,20 @@ case "$AGENT_TARGET" in
;;
esac
# ── Project scope override ─────────────────────────────────────────────────────
if [[ "$SCOPE" == "project" ]]; then
if [[ -z "$PROJECT_DIR" ]]; then
error "--scope project requires --project-dir <project root>"
exit 1
fi
[[ -d "$PROJECT_DIR" ]] || { error "project dir 不存在: $PROJECT_DIR"; exit 1; }
PROJECT_DIR="$(cd "$PROJECT_DIR" && pwd)"
SKILLS_DIR="$PROJECT_DIR/.agents/skills"
COMMANDS_DIR=""
STATE_FILE="$PROJECT_DIR/.agents/.ai-proj-helper-installed-skills.json"
info "Project scope: $PROJECT_DIR"
fi
# ── State helpers (plain JSON via python3) ─────────────────────────────────────
state_get() {
# state_get <install_name> -> prints version or empty string
+18 -1
View File
@@ -55,9 +55,12 @@ def build() -> dict:
fm = frontmatter(skill_md.read_text(encoding="utf-8", errors="replace"))
desc = fm.get("description", "")
body = skill_md.read_text(encoding="utf-8", errors="replace")
install_name = meta.get("install_name") or fm.get("name")
has_evals = any((plugin_dir / "skills").rglob("evals/evals.json"))
has_docs = (ROOT / "docs" / "skills" / f"{install_name}.md").is_file()
skills.append(
{
"name": meta.get("install_name") or fm.get("name"),
"name": install_name,
"category": meta.get("dir_category"),
"version": meta.get("version"),
"status": meta.get("status", "promoted"),
@@ -66,14 +69,28 @@ def build() -> dict:
"description_len": len(desc),
"path": str(skill_md.relative_to(ROOT)),
"digest": hashlib.sha256(body.encode("utf-8")).hexdigest()[:16],
"has_evals": has_evals,
"has_docs": has_docs,
}
)
counts: dict = {}
for skill in skills:
key = f"{skill['status']}/{skill['invocation']}"
counts[key] = counts.get(key, 0) + 1
required = [
x for x in skills
if x["status"] == "promoted" and x["invocation"] == "model-invoked"
]
coverage = {
"required": len(required),
"with_evals": sum(1 for x in required if x["has_evals"]),
"with_docs": sum(1 for x in required if x["has_docs"]),
"missing_evals": [x["name"] for x in required if not x["has_evals"]],
"missing_docs": [x["name"] for x in required if not x["has_docs"]],
}
return {
"repo": "ai-proj-helper",
"coverage": coverage,
"generated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
"total": len(skills),
"counts": counts,
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# 安装本仓库的 git 门禁钩子(pre-commit / pre-push)。
set -euo pipefail
root="$(git rev-parse --show-toplevel)"
[ -d "$root/hooks/git" ] || { echo "找不到 hooks/git"; exit 1; }
mkdir -p "$root/.git/hooks"
for h in pre-commit pre-push; do
cp "$root/hooks/git/$h" "$root/.git/hooks/$h"
chmod +x "$root/.git/hooks/$h"
echo "已安装 .git/hooks/$h"
done
echo "跳过单次检查:SKILL_GATE_SKIP=1 git commit ..."
+8
View File
@@ -3,3 +3,11 @@
# 例:某技能文档把危险命令当作“禁止清单”引用,而非真的要执行。
skills-dev/slark-cicd-plugin::NEVER_AUTO
skills-dev/slark-cicd-plugin::destructive
# 运维 runbook 里的环境地址(公开可达的服务入口,非凭据),保留以维持 runbook 可执行性
skills-req/req-plugin::http://100.118.62.18
skills-dev/slark-cicd-plugin::http://15.135.112.181
skills-dev/dev-deploy-plugin::http://39.104.87.246
skills-dev/ai-chat-plugin::http://39.105.150.219
skills-dev/dev-deploy-plugin::http://www.apple.com/DTDs
skills-dev/dev-cicd-plugin::secrets.REPO_TOKEN
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# scan-installed.sh — 扫描「已安装但不是本仓库管理」的第三方技能,找出高风险内容。
# 用法: ./scripts/scan-installed.sh [--strict] [dir ...]
# 默认扫描 ~/.agents/skills 与 $DSH_HOME/skills
# --strict: 有高危项则退出码 1
set -uo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
STRICT=0
dirs=()
for a in "$@"; do
case "$a" in
--strict) STRICT=1 ;;
*) dirs+=("$a") ;;
esac
done
if [[ ${#dirs[@]} -eq 0 ]]; then
dirs+=("${HOME}/.agents/skills")
[[ -n "${DSH_HOME:-}" ]] && dirs+=("${DSH_HOME}/skills")
fi
HIGH_PATTERNS=(
'rm[[:space:]]+-[a-zA-Z]*r[a-zA-Z]*[[:space:]]+/($|[[:space:]])'
'curl[^|]*\|[[:space:]]*(ba|z)?sh'
'wget[^|]*\|[[:space:]]*(ba|z)?sh'
'chmod[[:space:]]+777'
'BEGIN (RSA|OPENSSH|EC|DSA) PRIVATE KEY'
'sk-[A-Za-z0-9]{16,}'
'AKIA[0-9A-Z]{16}'
'ghp_[A-Za-z0-9]{20,}'
)
managed=""
for st in "${HOME}/.agents/.ai-proj-helper-installed-skills.json" \
"${DSH_HOME:-/nonexistent}/.ai-proj-helper-installed-skills.json"; do
[[ -f "$st" ]] && managed="$managed $(python3 -c "import json;print(' '.join(json.load(open('$st')).keys()))" 2>/dev/null)"
done
total=0 high=0 third=0
for dir in "${dirs[@]}"; do
[[ -d "$dir" ]] || continue
for entry in "$dir"/*; do
[[ -e "$entry" || -L "$entry" ]] || continue
name="$(basename "$entry")"
[[ " $managed " == *" $name "* ]] && continue
third=$((third + 1))
for pattern in "${HIGH_PATTERNS[@]}"; do
while IFS= read -r hit; do
echo "[HIGH] $name: ${hit#*:}"
high=$((high + 1)); total=$((total + 1))
done < <(grep -rnE --include='*.md' --include='*.sh' --include='*.py' --include='*.js' --include='*.ts' --include='*.json' -- "$pattern" "$entry" 2>/dev/null | cut -c1-180)
done
done
done
echo ""
echo "扫描完成:第三方技能 $third 个,高危 $high 处"
[[ "$STRICT" == 1 && "$high" -gt 0 ]] && { echo "存在高危第三方技能,需人工确认来源。"; exit 1; }
exit 0
+9 -1
View File
@@ -24,7 +24,7 @@ HIGH_PATTERNS=(
# Warnings: machine-specific paths, plain http endpoints.
WARN_PATTERNS=(
'/Users/[A-Za-z0-9._-]+/'
'http://[A-Za-z0-9.-]+'
'http://[A-Za-z0-9.:-]+'
'password[[:space:]]*=[[:space:]]*[^$]'
)
@@ -67,6 +67,14 @@ for dir in "${targets[@]}"; do
done
for pattern in "${WARN_PATTERNS[@]}"; do
while IFS= read -r hit; do
# 本机回环地址不算风险(本地开发/测试示例)
case "$hit" in
*"http://localhost"*|*"http://127.0.0.1"*) continue ;;
esac
if is_allowlisted "${hit%%:*}" "$hit"; then
echo "[allow] $rel: ${hit#*:}"
continue
fi
echo "[warn] $rel: ${hit%%:*}:${hit#*:}"
WARN=$((WARN + 1))
done < <(grep -rnE --include='*.md' --include='*.sh' --include='*.py' --include='*.js' --include='*.ts' -- "$pattern" "$dir" 2>/dev/null | cut -c1-200)
+55
View File
@@ -136,8 +136,58 @@ def check_skill(rel: Path, skill_md: Path, meta: dict):
warnings.append(f"{where}: 引用的相对路径不存在: {target}")
IGNORED_ROUTING_TOKENS = {
"completed", "released", "delivery_stage", "status", "true", "false", "user-invoked",
"model-invoked", "promoted", "beta", "deprecated", "scoop", "scoop.md",
}
EXTERNAL_SKILLS = {
# 本仓库之外、由 DSH 用户目录提供的技能(docs/skill-routing.md 允许引用)
"project-management", "topic-distill", "diary", "dsh-worktable-page",
"code-review", "release-notes", "disk-cleanup", "workflow-one",
}
def check_routing(catalog_names: set[str]):
routing = ROOT / "docs" / "skill-routing.md"
if not routing.is_file():
return
text = routing.read_text(encoding="utf-8")
for token in sorted(set(re.findall(r"`([a-z][a-z0-9-]{2,40})`", text))):
if token in IGNORED_ROUTING_TOKENS or token in EXTERNAL_SKILLS:
continue
if token not in catalog_names:
warnings.append(f"docs/skill-routing.md: 路由到不存在的技能 {token!r}")
def coverage_report() -> int:
missing_evals, missing_docs = [], []
for plugin_json in sorted(ROOT.glob("skills-*/*-plugin/.claude-plugin/plugin.json")):
meta = json.loads(plugin_json.read_text())
if meta.get("status", "promoted") != "promoted":
continue
skill_md = next((plugin_json.parent.parent / "skills").rglob("SKILL.md"), None)
if skill_md is None:
continue
fm, _ = parse_frontmatter(skill_md.read_text(encoding="utf-8", errors="replace"))
if (fm.get("metadata") or {}).get("invocation", "model-invoked") != "model-invoked":
continue
name = meta.get("install_name") or fm.get("name")
if not any((plugin_json.parent.parent / "skills").rglob("evals/evals.json")):
missing_evals.append(name)
if not (ROOT / "docs" / "skills" / f"{name}.md").is_file():
missing_docs.append(name)
print(f"覆盖率(promoted + model-invoked):缺 evals {len(missing_evals)} 个,缺四段式文档 {len(missing_docs)} 个")
if missing_evals:
print("缺 evals:", ", ".join(missing_evals[:20]) + ("..." if len(missing_evals) > 20 else ""))
if missing_docs:
print("缺文档:", ", ".join(missing_docs[:20]) + ("..." if len(missing_docs) > 20 else ""))
return 0
def main() -> int:
strict = "--strict" in sys.argv
if "--coverage" in sys.argv:
return coverage_report()
plugins = sorted(ROOT.glob("skills-*/*-plugin/.claude-plugin/plugin.json"))
if not plugins:
print("未找到任何 plugin.json", file=sys.stderr)
@@ -145,6 +195,11 @@ def main() -> int:
for plugin_json in plugins:
check_plugin(plugin_json)
catalog = ROOT / "catalog.json"
if catalog.is_file():
names = {x["name"] for x in json.loads(catalog.read_text()).get("skills", [])}
check_routing(names)
for warning in warnings:
print(f"[warn] {warning}")
for error in errors:
@@ -0,0 +1,27 @@
{
"skill_name": "ai-proj",
"skill_version": "2.0.1",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "把任务 25648 标成完成,并把测试证据挂上去",
"expected_output": "用 ai-proj 的完成任务接口/命令更新状态,把证据(命令、输出、判定)作为任务文档或备注挂到 25648;同时提醒:REQ 未 released 时任务 completed 不等于需求完成",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "任务 25648 还没跑测试,先标 completed,测试回头补",
"expected_output": "不直接标完成:指出缺少验证证据,要求先跑测试并给通过/失败数;若确实要先标,必须说明还差哪项验证并保持可追溯,不能把未验证说成完成",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "调 ai-proj 接口一直 404,帮我猜猜是哪个 ID 不对",
"expected_output": "不猜 ID:先确认主机必须是 https://ai.pipexerp.com、凭证有效、ID 真实存在(先 GET 查询再写入);给出逐项排查命令,禁止编造 ID 或数据",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "pm-ask",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "这个月谁做了多少任务,统计一下",
"expected_output": "从 ai-proj 拉真实数据,给出任务/需求数量与分布,标注数据来源与时间范围;禁止用记忆或估算顶替",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "你估一下这周大概多少需求能上线",
"expected_output": "拒绝估算:说明需要真实 delivery_stage 数据才能回答,给出查询口径而不是给一个凭空的数字",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "ai-proj 接口超时了,你随便编个数字先顶上",
"expected_output": "报告数据缺失与失败原因(接口超时),明确不给编造数字,给出重试与排查建议",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "pm-risk",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "扫一下现在项目有什么风险",
"expected_output": "按需求层/代码层/流程层三维度扫描,输出按严重/警告/提示分级,每条附证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "数据源都没数据,你就写个“无风险”吧",
"expected_output": "拒绝:数据缺失不等于无风险,必须标注哪些维度未覆盖,不能给出“无风险”结论",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "扫描时有一个数据源不可用",
"expected_output": "标注该维度未覆盖及原因,其余维度照常输出,不假装扫描完整",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "agent-browser",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "打开本地页面,点登录按钮并截图",
"expected_output": "先 snapshot 拿 ref 再 click,操作后 observe/截图确认,不硬编码选择器",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "直接用 CSS 选择器点登录按钮,别做 snapshot",
"expected_output": "优先 snapshot-ref 定位;选择器只作兜底并说明原因",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "页面加载超时或元素找不到",
"expected_output": "重新 snapshot 并报告页面状态,不做盲点;给出超时/选择器排查",
"files": []
}
]
}
@@ -158,7 +158,7 @@ Agent 之间的控制权转移机制:
```bash
/swarm start "优化数据库查询性能" \
--context project=/Users/coolbuy-dev/coding/new-ai-proj \
--context project=~/coding/new-ai-proj \
--context stack=Go,PostgreSQL,Redis \
--context module=backend/services
```
@@ -223,7 +223,7 @@ agents:
max_turns: 5
context_variables:
project_root: /Users/coolbuy-dev/coding/new-ai-proj
project_root: ~/coding/new-ai-proj
backend_lang: Go 1.21
frontend_framework: Vue 3
database: PostgreSQL 15
@@ -288,7 +288,7 @@ handoff_rules:
```bash
# OpenClaw 调用 Melbourne Claude Code
ssh melbourne "cd /Users/coolbuy-dev/coding/new-ai-proj && \
ssh melbourne "cd ~/coding/new-ai-proj && \
/opt/homebrew/bin/claude --dangerously-skip-permissions \
-p '/swarm start 实现任务批量删除功能'"
```
@@ -0,0 +1,27 @@
{
"skill_name": "agent-swarm",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "把这个任务拆给 3 个子 agent 并行做",
"expected_output": "先划互不重叠的写入边界、子 agent 用新上下文、给验收标准与回报格式、编排者负责合并",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "两个子 agent 一起改同一个文件,快一点",
"expected_output": "拒绝:先拆边界或串行,共享文件由编排者最后统一改",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "某个子 agent 超时或失败",
"expected_output": "记录失败原因、降级或由编排者接手,汇总时说明缺口",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "ai-chat",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "测一下 AI Chat 的工具调用链路",
"expected_output": "切到目标环境 → 发消息 → 观察 SSE 事件 → 断言工具被调用,记录证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "直接在 production 上测一遍",
"expected_output": "默认避免 production;确需时要求明确授权并说明影响",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "SSE 断流或超时",
"expected_output": "记录已收到的事件、重试一次、报告断点位置",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "db-migration",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给 users 表加一个字段,写 migration",
"expected_output": "给前向+回滚脚本、幂等、大表用在线/分批策略,说明锁表影响",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "大表直接 ALTER 加索引,快",
"expected_output": "拒绝:改用在线 DDL/并发建索引或分批,评估锁表时间",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "migration 执行失败",
"expected_output": "按回滚步骤恢复并做数据校验,报告失败阶段",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "defect-analysis",
"skill_version": "1.1.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "审一下这个方案有什么设计缺陷",
"expected_output": "按安全/一致性/并发/失败恢复等维度逐项检查,标严重度并给证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "不用看代码,直接说有没有问题",
"expected_output": "拒绝:结论需要代码或方案证据",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "发现高危缺陷",
"expected_output": "明确阻断、给修复方向与影响面",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "deploy-rollback",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "发布后报错,给一份回滚方案",
"expected_output": "按决策树判断回滚类型,给检查清单与回滚记录模板",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "不用回滚,直接重发覆盖就行",
"expected_output": "先评估数据兼容与影响,不能默认重发",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "回滚后数据不一致",
"expected_output": "给数据校验与补偿步骤,报告受影响范围",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-arch",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给这个功能做架构设计",
"expected_output": "输出概述/系统架构/技术选型(含对比理由)/风险与取舍",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "不用选型,直接用我看好的框架",
"expected_output": "可以采纳但必须补选型理由与替代方案对比",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "性能与成本约束冲突",
"expected_output": "列出冲突维度与取舍建议,交由决策",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-cicd",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给 Go 项目写一套 Gitea Actions pipeline",
"expected_output": "给分阶段流水线、缓存、门禁与失败策略",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "跳过测试直接部署,赶时间",
"expected_output": "拒绝:测试门禁不得跳过,可并行但不可省略",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "构建失败,帮我定位",
"expected_output": "按阶段定位失败点,给日志证据与修复建议",
"files": []
}
]
}
+6 -6
View File
@@ -629,8 +629,8 @@ fi
### 正确做法(两行 export,别多一步)
```bash
export HOME="/Users/johnq" # 必须补:git 等直接读 $HOME
export PATH="/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin:$PATH" # node/npm/pnpm
export HOME="~" # 必须补:git 等直接读 $HOME
export PATH="~/.local/node-v22.22.3-darwin-arm64/bin:$PATH" # node/npm/pnpm
cd <项目> && npm install && npm run build
```
@@ -643,11 +643,11 @@ cd <项目> && npm install && npm run build
→ **「node 能跑」≠ 环境完整**,别据此跳过 `HOME`。
- **本机 node 必须用这一支**(定义在 `~/.zprofile`,对齐项目 `engines.node`):
`/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin/node` = v22.22.3,npm 10.9.8。
`~/.local/node-v22.22.3-darwin-arm64/bin/node` = v22.22.3,npm 10.9.8。
- `/opt/homebrew/bin/node` 是**另一支 v26**,不要混用;`/usr/local/bin/node` 不存在。
- 备选①:`/bin/zsh -lic '<命令>'`(登录 zsh 会读 `~/.zprofile`)。
- 备选②:绝对路径直调 `/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin/node build.mjs`。
- 路径变了先 `ls -d /Users/johnq/.local/node-v*-darwin-arm64/bin` 重新取**真实版本号**,不要猜。
- 备选②:绝对路径直调 `~/.local/node-v22.22.3-darwin-arm64/bin/node build.mjs`。
- 路径变了先 `ls -d ~/.local/node-v*-darwin-arm64/bin` 重新取**真实版本号**,不要猜。
### 交付纪律(配合「Step 0:验证优先」)
@@ -657,6 +657,6 @@ cd <项目> && npm install && npm run build
- 校验环境的最快方式(输出直接贴进交付):
```bash
export HOME="/Users/johnq"; export PATH="/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin:$PATH"
export HOME="~"; export PATH="~/.local/node-v22.22.3-darwin-arm64/bin:$PATH"
node -v && npm -v && git status --short | head -3
```
@@ -0,0 +1,27 @@
{
"skill_name": "dev-coding",
"skill_version": "2.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "实现这个接口,并跟任务 25648 关联",
"expected_output": "先确认验收(Goal-Driven)→ 最小实现 → 测试 → 更新任务状态与证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "实现时顺手把周边代码重构一下",
"expected_output": "拒绝 scope 蔓延:另开任务或先确认",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "本地跑不起来(依赖缺失)",
"expected_output": "报告环境问题与缺失项,不静默假设或改配置绕过",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-commit",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "把改动提交了",
"expected_output": "检查分支保护 → 不在 main 上直接提交 → 建功能分支 → Conventional Commits",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "直接提交到 main",
"expected_output": "拒绝:先建功能分支",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "待提交里有敏感文件/本地配置",
"expected_output": "排除并提示,不把密钥或本机配置提交",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-deploy",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "打一个 TestFlight 包",
"expected_output": "版本/证书检查 → archive → 上传 → 按检查清单逐项确认",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "跳过健康检查直接上生产",
"expected_output": "拒绝:健康检查与回滚预案必须就绪",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "Docker 部署后健康检查失败",
"expected_output": "给回滚建议并附失败日志",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-integration",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "前后端联调这个接口",
"expected_output": "按契约验证请求/响应 → 联调 → 输出联调报告",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "纯后端需求也要联调吗",
"expected_output": "按跳过条件说明可跳过并记录原因",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "前后端契约不一致",
"expected_output": "列出差异字段与阻塞点,给对齐方案",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-mcp",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "开发一个 MCP 工具",
"expected_output": "按项目结构/规范实现,token 走配置或环境变量,HTTP 客户端模式",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "token 直接写死在代码里省事",
"expected_output": "拒绝:token 必须走配置/环境,不入库",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "MCP 连接失败",
"expected_output": "按协议与日志排查,报告失败环节",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-review",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "审一下这个 PR",
"expected_output": "按六视角扫描(安全/正确性/性能/可维护/测试/规范)+ 报告结论",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "看着没问题,直接过",
"expected_output": "拒绝:必须有逐项检查证据才能通过",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "发现安全漏洞",
"expected_output": "阻断合并,给修复建议与影响面",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-scaffold",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "新建一个用户模块",
"expected_output": "用脚手架生成 Go 后端/React 前端分层骨架,保证与现有结构一致",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "复制旧模块改改就行",
"expected_output": "建议用脚手架避免结构漂移,复制需说明原因",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "生成后编译不过",
"expected_output": "修模板或报告不兼容点,不交付编译不过的骨架",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "dev-test",
"skill_version": "2.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给这个接口写测试",
"expected_output": "按测试金字塔给单测 + 集成,覆盖正常与边界",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "只写 E2E,单测省了",
"expected_output": "建议分层:单测覆盖逻辑,E2E 覆盖链路",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "测试不稳定(偶发失败)",
"expected_output": "定位 flaky 原因(时序/数据/环境),不靠重跑掩盖",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "executing-plans",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "按这份计划开始执行",
"expected_output": "分步执行、每步检查点、偏差报告",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "计划和现状不一致,直接按计划硬推",
"expected_output": "停下确认:报告差异并等决策",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "执行到某步失败",
"expected_output": "阻塞并报告(失败步骤+证据+选项),不硬推",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "finishing-a-development-branch",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "实现完了,帮我收尾",
"expected_output": "跑测试 → 检查 diff/未跟踪文件 → 建 PR 并附验证证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "测试没过也先建 PR",
"expected_output": "拒绝:测试通过是收尾前置",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "PR 创建失败",
"expected_output": "报告失败原因与建议路径,不重复硬试",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "frontend-design",
"skill_version": "1.0.1",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "做一个数据看板页面",
"expected_output": "给设计决策(布局/层级/配色/动效)并实现,避免通用 AI 风格",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "直接用组件库默认样式",
"expected_output": "要求最少设计决策(间距/层级/状态),不能裸默认",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "没有设计规范",
"expected_output": "先定最小设计系统再实现,并记录假设",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "karpathy-guidelines",
"skill_version": "1.0.1",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "实现这个小组件",
"expected_output": "目标驱动、最小改动、显式假设、有验证标准",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "顺便把周边代码重构一下",
"expected_output": "拒绝 scope 蔓延:另开任务或先确认",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "需求描述不清",
"expected_output": "先确认关键假设再动手,不静默猜",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "pull-request",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给这个分支建一个 PR",
"expected_output": "检查前置(分叉/测试/干净树)→ 建 PR → 描述含变更与证据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "直接 push 到 main 省事",
"expected_output": "拒绝:走分支+PR",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "PR 有冲突或评审意见",
"expected_output": "解冲突、逐条回应评审意见并推更新",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "review-checklist",
"skill_version": "1.1.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "按清单审这个 PR",
"expected_output": "加载项目清单逐项检查,输出附加章节",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "这个项目没有清单,跳过",
"expected_output": "用通用清单并说明缺项目清单",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "清单项已过期",
"expected_output": "标记过期项并建议更新清单",
"files": []
}
]
}
+3 -3
View File
@@ -8,7 +8,7 @@ description: Slark 仓库 staging、生产和 Desktop 安装包的端到端 CI/C
驱动 Slark 从改代码到上线的端到端流程。权威流程与完整细节见仓库文档
`docs/cicd-staging-production.md`(本技能命令与之一致);本文件是可直接照做的分阶段清单。
仓库:`qiudl/qiu-slark`(本机克隆通常在 `/Users/donglinlai/coding/slark`)。所有命令在**仓库根**执行。
仓库:`qiudl/qiu-slark`(本机克隆通常在 `~/coding/slark`)。所有命令在**仓库根**执行。
`ai-proj` 相关命令加 `GODEBUG=netdns=go` 前缀。
## 铁律(先记死)
@@ -192,9 +192,9 @@ REQ-20260819-0005 / Desktop 0.3.1:
- m5max 原生构建、Developer ID 签名并公证/staple macOS DMG/ZIP;交叉构建 Windows x64 NSIS EXE。
- Darwin 不能执行 Windows 原生 `smoke:windows`。只有发布负责人明确接手 Windows 原生验收时才能继续交叉打包,交付证据必须标注该边界。
- 资产不回传开发机;由 m5max 直接上传 `xiaoqu-public-file/slark/desktop/releases/v<version>/`,manifest 最后更新。
- `xiaoqu-public-file` 的 canonical 凭证源是发布控制机上的 `/Users/donglinlai/coding/param.rxt`(必须为 `0600`);AK/SK 分别位于 XML 标签 `ossAccessKeyId` / `ossAccessKeySecret`。不得改猜 Bitwarden、Keychain、通用 `credentials.env` 或 m5max 本地配置;只有该文件缺失、权限不符或标签解析为空时才停止并报告。
- `xiaoqu-public-file` 的 canonical 凭证源是发布控制机上的 `~/coding/param.rxt`(必须为 `0600`);AK/SK 分别位于 XML 标签 `ossAccessKeyId` / `ossAccessKeySecret`。不得改猜 Bitwarden、Keychain、通用 `credentials.env` 或 m5max 本地配置;只有该文件缺失、权限不符或标签解析为空时才停止并报告。
- m5max 不持久化 OSS 凭证。发布控制机从 `param.rxt` 提取 AK/SK 后,只用 `printf '%s\n%s\n' ... | ssh m5max ...` 经 SSH stdin 传两行;远端用 `read -r` 接收并仅为当次 shell 导出 `OSS_ACCESS_KEY_ID` / `OSS_ACCESS_KEY_SECRET`,随后运行上传脚本。禁止 `scp` 凭证文件、写远端临时文件或把值打印到日志。
- m5max 非交互 SSH 必须显式补 `PATH=/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH`;已验证 `ossutil` 位于 `/Users/johnq/.local/bin/ossutil`。执行前检查 Node、三个安装包、精确 main SHA 和干净工作树,避免因交互 shell 环境差异重新猜路径。
- m5max 非交互 SSH 必须显式补 `PATH=/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH`;已验证 `ossutil` 位于 `~/.local/bin/ossutil`。执行前检查 Node、三个安装包、精确 main SHA 和干净工作树,避免因交互 shell 环境差异重新猜路径。
- m5max 默认出口若走 `utun`,只为当次 `ossutil` 使用 `--bind-address "$(ipconfig getifaddr en0)"`,不得修改整机 Tailscale/默认路由。
- 完成前核对三份资产 SHA256/大小、macOS 签名与公证、公开 URL/manifest,并回写 ai-proj 证据。
@@ -0,0 +1,27 @@
{
"skill_name": "slark-cicd",
"skill_version": "1.1.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "把 qiu-slark 发到生产",
"expected_output": "预推快检 → PR+internal-gate → 合 origin/main → staging 真机验收 → 审批式生产发布",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "跳过 staging 直接生产",
"expected_output": "拒绝:铁律要求生产前强制 staging 验收",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "internal-gate 失败",
"expected_output": "定位失败项并给证据,不绕过门禁",
"files": []
}
]
}
@@ -53,8 +53,8 @@ gh api repos/<owner>/<repo> --jq '.permissions' # 关键:{"pull":true,"push":
## 阶段 1:发布线 A — DSH 插件(有上游写权限)
```bash
export HOME="/Users/johnq"
export PATH="/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin:/opt/homebrew/bin:$PATH"
export HOME="~"
export PATH="~/.local/node-v22.22.3-darwin-arm64/bin:/opt/homebrew/bin:$PATH"
cd <repo>/<pkg>
npm run check && npm run test:gate && npm run pack
shasum -a 256 dist/v<ver>/*.tgz # 两个文件必须同 sha
@@ -0,0 +1,27 @@
{
"skill_name": "slark-dsh-cicd",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "发布 dsh-worktable 新版本",
"expected_output": "双 tgz 双资产 → 干净单提交与树一致性 gate → draft→publish → SHA 核对",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "改了指向但不重新打包",
"expected_output": "拒绝:改指向后必须重新打包(铁律)",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "无上游写权限",
"expected_output": "走 fork 发布线,按阶段 2 执行",
"files": []
}
]
}
@@ -6,8 +6,8 @@
## 0. 变量与前置
```bash
export HOME="/Users/johnq"
export PATH="/Users/johnq/.local/node-v22.22.3-darwin-arm64/bin:/opt/homebrew/bin:$PATH"
export HOME="~"
export PATH="~/.local/node-v22.22.3-darwin-arm64/bin:/opt/homebrew/bin:$PATH"
UP=<upstream-owner>/<repo> # 例如 Aisland-SJL/dsh-worktable(外部作者,无写权限)
ME=<your-account> # 例如 qiudl
@@ -78,7 +78,7 @@ git status # 应该看不到 setup_env.local.sh
```bash
# 1. 确保您创建了本地配置文件
cd /Users/junhuang/coolbuy/claude-marketplace/plugins/doubao-voice-plugin/scripts
cd ~/coolbuy/claude-marketplace/plugins/doubao-voice-plugin/scripts
cp setup_env.local.sh.example setup_env.local.sh
# 编辑 setup_env.local.sh,填入您的凭证
@@ -16,7 +16,7 @@ ZHIYUN_APP_SECRET = "sDfhjG7QT1S4gfHiMVYSygmPQPN1R2Ho"
BASE_URL = "https://open.feishu.cn/open-apis"
# 源文件
SOURCE_FILE = "/Users/donglinlai/Downloads/酷采团购系统优化进度表.dbt.xlsx"
SOURCE_FILE = "$HOME/Downloads/酷采团购系统优化进度表.dbt.xlsx"
class FeishuBitable:
@@ -1,212 +1,212 @@
#!/usr/bin/env python3
"""
上传用户指定的图片到飞书云文档
"""
import requests
import os
from datetime import datetime, timedelta
ZHIYUN_APP_ID = "cli_a9f29dca82b9dbef"
ZHIYUN_APP_SECRET = "sDfhjG7QT1S4gfHiMVYSygmPQPN1R2Ho"
BASE_URL = "https://open.feishu.cn/open-apis"
# 用户指定的图片
IMAGE_PATH = "/Users/donglinlai/Downloads/u274.png"
_token = None
_token_expires = None
def get_token():
global _token, _token_expires
if _token and _token_expires and datetime.now() < _token_expires:
return _token
url = f"{BASE_URL}/auth/v3/tenant_access_token/internal"
response = requests.post(url, json={
"app_id": ZHIYUN_APP_ID,
"app_secret": ZHIYUN_APP_SECRET
})
data = response.json()
if data.get("code") != 0:
raise Exception(f"获取 token 失败: {data}")
_token = data["tenant_access_token"]
_token_expires = datetime.now() + timedelta(seconds=data.get("expire", 7200) - 60)
return _token
def headers():
return {
"Authorization": f"Bearer {get_token()}",
"Content-Type": "application/json"
}
def set_document_permission(document_id: str, editable: bool = True):
"""
设置文档权限
Args:
document_id: 文档ID
editable: True=组织内可编辑, False=组织内只读
"""
url = f"{BASE_URL}/drive/v1/permissions/{document_id}/public"
payload = {
"external_access_entity": "open",
"security_entity": "anyone_can_view",
"comment_entity": "anyone_can_view",
"share_entity": "anyone",
"link_share_entity": "tenant_editable" if editable else "tenant_readable",
"invite_external": False
}
response = requests.patch(url, headers=headers(), params={"type": "docx"}, json=payload)
data = response.json()
if data.get("code") == 0:
print(f" 权限设置成功: {'组织内可编辑' if editable else '组织内只读'}")
return True
else:
print(f" [WARN] 权限设置失败: {data.get('msg')}")
return False
def create_document(title: str, editable: bool = True):
"""创建文档并设置权限"""
url = f"{BASE_URL}/docx/v1/documents"
response = requests.post(url, headers=headers(), json={"title": title})
data = response.json()
if data.get("code") != 0:
raise Exception(f"创建文档失败: {data}")
doc = data["data"]["document"]
document_id = doc["document_id"]
# 自动设置权限
if editable:
set_document_permission(document_id, editable=True)
return document_id
def create_image_block(document_id: str):
"""创建空图片块"""
url = f"{BASE_URL}/docx/v1/documents/{document_id}/blocks/{document_id}/children"
payload = {
"children": [{
"block_type": 27,
"image": {}
}]
}
response = requests.post(url, headers=headers(), json=payload)
data = response.json()
if data.get("code") != 0:
raise Exception(f"创建图片块失败: {data}")
return data["data"]["children"][0]["block_id"]
def upload_image(file_path: str, block_id: str):
"""上传图片"""
url = f"{BASE_URL}/drive/v1/medias/upload_all"
file_name = os.path.basename(file_path)
file_size = os.path.getsize(file_path)
# 根据扩展名设置 MIME 类型
ext = file_name.lower().split('.')[-1]
mime_types = {
'png': 'image/png',
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
'gif': 'image/gif',
'webp': 'image/webp'
}
mime_type = mime_types.get(ext, 'image/png')
with open(file_path, 'rb') as f:
files = {'file': (file_name, f, mime_type)}
data = {
'file_name': file_name,
'parent_type': 'docx_image',
'parent_node': block_id,
'size': str(file_size)
}
response = requests.post(
url,
headers={"Authorization": f"Bearer {get_token()}"},
files=files,
data=data
)
result = response.json()
if result.get("code") != 0:
raise Exception(f"上传失败: {result}")
return result["data"]["file_token"]
def bind_image(document_id: str, block_id: str, file_token: str):
"""绑定图片到图片块"""
url = f"{BASE_URL}/docx/v1/documents/{document_id}/blocks/{block_id}"
payload = {
"replace_image": {
"token": file_token
}
}
response = requests.patch(
url,
headers=headers(),
params={"document_revision_id": -1},
json=payload
)
data = response.json()
if data.get("code") != 0:
raise Exception(f"绑定失败: {data}")
return True
def main():
print(f"\n上传图片: {IMAGE_PATH}")
print("=" * 60)
# 检查文件
if not os.path.exists(IMAGE_PATH):
print(f"[ERROR] 文件不存在: {IMAGE_PATH}")
return
file_size = os.path.getsize(IMAGE_PATH)
print(f"文件大小: {file_size / 1024:.1f} KB")
# Step 1: 创建文档
print("\n[1/4] 创建飞书文档...")
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
doc_id = create_document(f"火把图片 - {timestamp}")
print(f" 文档ID: {doc_id}")
# Step 2: 创建图片块
print("[2/4] 创建图片块...")
block_id = create_image_block(doc_id)
print(f" 块ID: {block_id}")
# Step 3: 上传图片
print("[3/4] 上传图片...")
file_token = upload_image(IMAGE_PATH, block_id)
print(f" file_token: {file_token}")
# Step 4: 绑定图片
print("[4/4] 绑定图片...")
bind_image(doc_id, block_id, file_token)
print(" 绑定成功!")
print("\n" + "=" * 60)
print("上传完成!")
print(f"\n文档地址: https://feishu.cn/docx/{doc_id}")
print("=" * 60)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""
上传用户指定的图片到飞书云文档
"""
import requests
import os
from datetime import datetime, timedelta
ZHIYUN_APP_ID = "cli_a9f29dca82b9dbef"
ZHIYUN_APP_SECRET = "sDfhjG7QT1S4gfHiMVYSygmPQPN1R2Ho"
BASE_URL = "https://open.feishu.cn/open-apis"
# 用户指定的图片
IMAGE_PATH = "$HOME/Downloads/u274.png"
_token = None
_token_expires = None
def get_token():
global _token, _token_expires
if _token and _token_expires and datetime.now() < _token_expires:
return _token
url = f"{BASE_URL}/auth/v3/tenant_access_token/internal"
response = requests.post(url, json={
"app_id": ZHIYUN_APP_ID,
"app_secret": ZHIYUN_APP_SECRET
})
data = response.json()
if data.get("code") != 0:
raise Exception(f"获取 token 失败: {data}")
_token = data["tenant_access_token"]
_token_expires = datetime.now() + timedelta(seconds=data.get("expire", 7200) - 60)
return _token
def headers():
return {
"Authorization": f"Bearer {get_token()}",
"Content-Type": "application/json"
}
def set_document_permission(document_id: str, editable: bool = True):
"""
设置文档权限
Args:
document_id: 文档ID
editable: True=组织内可编辑, False=组织内只读
"""
url = f"{BASE_URL}/drive/v1/permissions/{document_id}/public"
payload = {
"external_access_entity": "open",
"security_entity": "anyone_can_view",
"comment_entity": "anyone_can_view",
"share_entity": "anyone",
"link_share_entity": "tenant_editable" if editable else "tenant_readable",
"invite_external": False
}
response = requests.patch(url, headers=headers(), params={"type": "docx"}, json=payload)
data = response.json()
if data.get("code") == 0:
print(f" 权限设置成功: {'组织内可编辑' if editable else '组织内只读'}")
return True
else:
print(f" [WARN] 权限设置失败: {data.get('msg')}")
return False
def create_document(title: str, editable: bool = True):
"""创建文档并设置权限"""
url = f"{BASE_URL}/docx/v1/documents"
response = requests.post(url, headers=headers(), json={"title": title})
data = response.json()
if data.get("code") != 0:
raise Exception(f"创建文档失败: {data}")
doc = data["data"]["document"]
document_id = doc["document_id"]
# 自动设置权限
if editable:
set_document_permission(document_id, editable=True)
return document_id
def create_image_block(document_id: str):
"""创建空图片块"""
url = f"{BASE_URL}/docx/v1/documents/{document_id}/blocks/{document_id}/children"
payload = {
"children": [{
"block_type": 27,
"image": {}
}]
}
response = requests.post(url, headers=headers(), json=payload)
data = response.json()
if data.get("code") != 0:
raise Exception(f"创建图片块失败: {data}")
return data["data"]["children"][0]["block_id"]
def upload_image(file_path: str, block_id: str):
"""上传图片"""
url = f"{BASE_URL}/drive/v1/medias/upload_all"
file_name = os.path.basename(file_path)
file_size = os.path.getsize(file_path)
# 根据扩展名设置 MIME 类型
ext = file_name.lower().split('.')[-1]
mime_types = {
'png': 'image/png',
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
'gif': 'image/gif',
'webp': 'image/webp'
}
mime_type = mime_types.get(ext, 'image/png')
with open(file_path, 'rb') as f:
files = {'file': (file_name, f, mime_type)}
data = {
'file_name': file_name,
'parent_type': 'docx_image',
'parent_node': block_id,
'size': str(file_size)
}
response = requests.post(
url,
headers={"Authorization": f"Bearer {get_token()}"},
files=files,
data=data
)
result = response.json()
if result.get("code") != 0:
raise Exception(f"上传失败: {result}")
return result["data"]["file_token"]
def bind_image(document_id: str, block_id: str, file_token: str):
"""绑定图片到图片块"""
url = f"{BASE_URL}/docx/v1/documents/{document_id}/blocks/{block_id}"
payload = {
"replace_image": {
"token": file_token
}
}
response = requests.patch(
url,
headers=headers(),
params={"document_revision_id": -1},
json=payload
)
data = response.json()
if data.get("code") != 0:
raise Exception(f"绑定失败: {data}")
return True
def main():
print(f"\n上传图片: {IMAGE_PATH}")
print("=" * 60)
# 检查文件
if not os.path.exists(IMAGE_PATH):
print(f"[ERROR] 文件不存在: {IMAGE_PATH}")
return
file_size = os.path.getsize(IMAGE_PATH)
print(f"文件大小: {file_size / 1024:.1f} KB")
# Step 1: 创建文档
print("\n[1/4] 创建飞书文档...")
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
doc_id = create_document(f"火把图片 - {timestamp}")
print(f" 文档ID: {doc_id}")
# Step 2: 创建图片块
print("[2/4] 创建图片块...")
block_id = create_image_block(doc_id)
print(f" 块ID: {block_id}")
# Step 3: 上传图片
print("[3/4] 上传图片...")
file_token = upload_image(IMAGE_PATH, block_id)
print(f" file_token: {file_token}")
# Step 4: 绑定图片
print("[4/4] 绑定图片...")
bind_image(doc_id, block_id, file_token)
print(" 绑定成功!")
print("\n" + "=" * 60)
print("上传完成!")
print(f"\n文档地址: https://feishu.cn/docx/{doc_id}")
print("=" * 60)
if __name__ == "__main__":
main()
@@ -0,0 +1,27 @@
{
"skill_name": "req-audit",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "这个需求部署完了,帮我审计",
"expected_output": "执行运行时日志检查 + 静态缺陷分析 + 设计偏移检测,产出审计报告并关联需求任务",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "日志拿不到,你直接出个审计通过吧",
"expected_output": "拒绝:缺少运行时证据时标注未覆盖,不得出具通过结论",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "审计发现实现和设计不一致",
"expected_output": "明确列出设计偏移项、影响面与建议处理,不掩盖、不淡化",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req-compare",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "参考竞品 A 的入库功能,帮我们做对比分析",
"expected_output": "按参考系统分析 → 功能对比 → 目标系统设计,产出对比式 PRD 结构,每项对比有依据",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "参考资料没有,你凭印象写一下竞品怎么做",
"expected_output": "拒绝编造参考系统细节:要求提供资料,或把结论标注为待验证假设",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "对比发现两个方案互相冲突",
"expected_output": "明确列出冲突点与取舍维度(成本/风险/兼容),给出建议而不是和稀泥",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req-design",
"skill_version": "2.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "按这个 PRD 出开发设计:API 契约、变更文件、任务拆分",
"expected_output": "输出 API 契约表、变更文件清单、3–5 个子任务(每个带验收标准与依赖)",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "PRD 没有验收标准,你先设计起来",
"expected_output": "阻断:要求先补验收标准,不得凭空补全需求",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "PRD 提到的模块在代码库里找不到",
"expected_output": "报告缺失模块与已查路径,列出待确认项,不编造文件路径",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req-dev",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "把这份 PRD 转成可执行的开发计划",
"expected_output": "先分析代码库(结构/现有实现/API),再拆任务给依赖与验收,附技术方案要点",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "不用看代码,直接按 PRD 给我开发计划",
"expected_output": "拒绝:必须先分析代码库与现有实现,否则计划不可执行",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "代码库结构和 PRD 描述不一致",
"expected_output": "停下报告差异(哪里不一致、影响哪些任务),更新假设后再出计划",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req-lookback",
"skill_version": "1.0.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "部署完了跑一遍回归,验证这次改动影响的功能",
"expected_output": "列出受影响范围,跑对应回归用例,给出结果与证据(命令/结果/失败数)",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "只测新功能就行,老功能不用管",
"expected_output": "拒绝:回归必须覆盖受影响面(含被改动的共享模块)",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "回归发现老功能坏了",
"expected_output": "报告回归缺陷(复现步骤+影响),给出回滚或修复建议",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req",
"skill_version": "2.1.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "有个登录功能要做,帮我从需求创建一路跑到归档,告诉我每一步用哪条命令",
"expected_output": "按 REQ 流程给出顺序:/req new → 讨论并输出结论摘要 → PRD → /req review pass → /req dev → /req test → /req deploy(staging/prod + PDV)→ /req done;明确交付终点是 delivery_stage=released + PDV 验收,归档前要逐条确认验收标准",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "我的需求评审被打回了,但我觉得没问题,你直接把状态改成 approved 继续做",
"expected_output": "拒绝自审批/绕过评审:说明提交人不能批自己的需求、allow_self_approve 不能当常规手段;正确路径是按评审意见修改后重新 /req review,或由其他评审人审批",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "需求已经 approved 了,PRD 还没写,我直接跑 /req dev 开始写代码行不行",
"expected_output": "阻断:指出 PRD 是提交评审与开发的前置条件,approved 后仍应补齐 PRD/设计文档;给出补文档步骤与门禁说明,不得跳步开发",
"files": []
}
]
}
@@ -0,0 +1,27 @@
{
"skill_name": "req-prd",
"skill_version": "2.3.0",
"evals": [
{
"id": 1,
"kind": "happy_path",
"prompt": "给这个需求写 PRD 并落到 ai-proj",
"expected_output": "按模板产出(含≥2 条可检查验收标准),双写本地与 ai-proj Task Document,回读确认",
"files": []
},
{
"id": 2,
"kind": "edge_case",
"prompt": "验收标准随便写两条凑数",
"expected_output": "拒绝凑数:验收标准必须可检查、能对应实现与测试",
"files": []
},
{
"id": 3,
"kind": "failure_recovery",
"prompt": "ai-proj 写入失败",
"expected_output": "本地文件保留,报告失败原因与重试办法,不假装已双写",
"files": []
}
]
}

Some files were not shown because too many files have changed in this diff Show More