agf-skill-stocktake

$npx mdskill add pcliangx/AppGenesisForge/agf-skill-stocktake

Audits content quality of AGF's own skills using a 5-dimension checklist.

  • Reviews skill actionability, scope fit, uniqueness, pointer freshness, and gate binding.
  • Depends on file system access to .claude/skills/agf-*/SKILL.md files.
  • Evaluates each skill against a 5-verdict rubric: Keep, Improve, Update, Retire, Merge.
  • Outputs structured audit results with reasons meeting anti-cop-out quality bar.

SKILL.md

.github/skills/agf-skill-stocktakeView on GitHub ↗
---
name: agf-skill-stocktake
description: Use when PL / tech-lead audits the content quality of AGF's own skills (`.claude/skills/agf-*/SKILL.md`). Provides the 5-dimension checklist (Actionability / Scope fit / Uniqueness vs CLAUDE.md+standards / Currency of pointers / Gate-binding validity), 5-verdict rubric (Keep/Improve/Update/Retire/Merge), reason-quality bar (反敷衍), and output skeleton. Triggered each MINOR release retro or manually.
---

# Skill Stocktake(AGF 自有 skill 内容质量审计)

Use this skill when:

- MINOR release retro 时审 AGF 自有 skill 是否腐化
- 手动盘点 skill 质量(感觉 skill 集膨胀 / 指针过期 / 内容重叠)
- 新增 / 删除 skill 后回归一次确保无重叠

## What it is — and is not

**Skill Stocktake** 审计 AGF 自有治理型 skill 的**内容质量**——不是语法(`lint-all.sh` 管)、不是 SSOT drift(`gen-roles.py --check` 管)。它审 skill 是否仍 actionable / scope-fit / unique / 指针新鲜 / 绑定有效 gate。

**不审**:第三方 skill(`docx` / `pptx`,Anthropic 提供,非 AGF 治理资产)。

## Scope

`.claude/skills/agf-*/SKILL.md`。**以 `ls .claude/skills/agf-*/SKILL.md` 实际为准,不在文档硬编码计数**(守 `verified-facts.md` 纪律)。

## 5 维 checklist(每 skill 逐条核)

AGF 在 ECC 4 维上加 1 维 **Gate 绑定**(AGF 治理型 skill 的核心——每个 `agf-*` 都该绑一个受治理流程 + gate):

1. **Actionability**:有可立即执行的步骤 / 命令 / 代码示例(不是空泛原则)
2. **Scope fit**:name / trigger(description)/ 内容对齐,不过宽不过窄
3. **Uniqueness**:内容不被 `CLAUDE.md` / `standards/` / 另一 skill 替代(守 SSOT,不重复)
4. **Currency(指针新鲜度)**:引用的 `CLAUDE.md` / `standards/*.md` / `docs/adr/*.md` 路径仍存在 + 内容同步(用 `rg` / `[ -f ]` 验路径,抽查引用内容是否漂移)
5. **Gate 绑定有效性**(AGF 特有):skill 是否仍绑一个有效 gate / SSOT 命令(如 `agf-deploying-uat` 绑部署门 + `/agf-deploy-uat`;`agf-writing-change` 绑变更文件夹 + `agf-spec-validate`)。无 gate 的 skill 要么是知识型(说明)要么是孤儿(候选 Retire)

## 5 档 verdict

| Verdict | 含义 |
|---|---|
| **Keep** | 5 维全过,仍有效 |
| **Improve** | 值得保留但需具体改进(指明哪段 / 什么改 / 目标规模) |
| **Update** | 引用的技术 / 路径过期(`rg` / WebSearch 验证后更新) |
| **Retire** | 低质量 / 过时 / cost-asymmetric(说明什么覆盖了它) |
| **Merge into [X]** | 与另一 skill 重叠(指明目标 + 整合什么内容) |

## Reason 质量要求(反敷衍)

评估是整体 AI 判断(非数值 rubric)。但 `reason` 字段必须自包含、可决策:

- ❌ 不写 "unchanged" / "overlaps with X" 这种空话
- ✅ **Retire**:(1) 发现什么具体缺陷 (2) 什么覆盖了同一需求
  - Bad: `"Superseded"`
  - Good: `"agf-writing-prd 已 v6.9.0 弃用,agf-writing-change 覆盖全部场景 + delta + archive;无独有内容残留"`
- ✅ **Merge**:目标 skill + 整合什么内容
- ✅ **Improve**:哪段、什么改、目标规模
- ✅ **Keep**(仅 mtime 改):重述原 verdict 依据,不写 "unchanged"

## 流程

### 1. Inventory

```bash
ls .claude/skills/agf-*/SKILL.md
```

### 2. 逐 skill 评估

对每个 skill:Read `SKILL.md` → 5 维核对 → 填 verdict + reason。

**Currency 维必须验路径**(静默腐化高发点):
```bash
# 验 skill 引用的路径存在
rg -oE '\[.*?\]\(([^)]+)\)' .claude/skills/agf-<name>/SKILL.md | ...   # 抽链接
[ -f <引用路径> ] && echo OK || echo STALE
```

skill 数量以 `ls .claude/skills/agf-*/SKILL.md | wc -l` 实际为准(**一批跑完**,不需要 chunk / resume;ECC 的 chunk 是为 261 skill 设计,AGF 裁剪掉)。

### 3. 输出

写 `docs/reviews/skill-stocktake-<YYYY-MM-DD>.md`:

- frontmatter(`reviewer` / `date` / `scope: agf-*` / `skill_count`)
- 汇总表(Skill | Verdict | Reason 一行)
- 按 verdict 分组详情
- 改进项(Improve / Update / Retire / Merge 的具体 action 清单)

### 4. PL 决策

**Retire / Merge** 涉及删 / 合 skill,PL 确认后才动(不自动删——守 `agf-writing-change` 变更门,删 skill 是 REMOVED Requirement 级变更)。Improve / Update 由 PL 派 maintainer 或 tech-lead 执行。

## 触发节奏

- **每 MINOR release retro**:作为 retro 的可选步骤(见 `agf-running-release-retro`)
- **手动**:PL / tech-lead 觉得 skill 集膨胀 / 指针过期时随时跑
- **PATCH 不跑**:skill 腐化慢,MINOR 周期够
- **MAJOR release 前**:强烈建议跑一次(大版本是清理窗口)

## Anti-patterns

- ❌ 把 stocktake 当 lint 跑(语法 / drift 是 `lint-all.sh` + `gen-roles.py --check` 的事)
- ❌ 审第三方 skill(`docx` / `pptx` 非 AGF 治理资产)
- ❌ Retire / Merge 不经 PL 确认直接删 / 合(违反变更门)
- ❌ reason 写 "unchanged" / "overlaps"(反敷衍要求)
- ❌ 跳过 Currency 维的 `rg` 验证(指针过期是静默腐化,不验 = 没审)
- ❌ 硬编码 skill 计数(以 `ls` 实际为准,守 `verified-facts.md`)

More from pcliangx/AppGenesisForge

SkillDescription
agf-code-mapDeeply Understand (codemap) — 持久化代码图谱 + 变更影响分析 + 理解地图。接手遗留项目 Day-1 / PR 影响分析 / 解释陌生代码 / PRD·ADR 前现状理解时用。编排 tools/codemap/ 的 codemap CLI
agf-deploying-uatUse when deploy-engineer is about to deploy the merged-to-main code to the isolated local UAT stack (after code review + SIT Audit pass and merge, before qa-engineer runs E2E/UAT). Provides the applicability gate, pre-flight checks, isolated compose bring-up (independent project name + port offset +900), in-container migration, real-output smoke test, hand-off, and the deploy-report skeleton. Pairs with deployment.md "UAT 环境部署" contract and slash /agf-deploy-uat.
agf-design-disciplineUse when uiux-designer is about to produce a design spec (spec.md) or static HTML prototype, or frontend-dev is about to build UI from a design. Provides the anti-AI-slop design discipline layer — Brief Inference (Design Read), three aesthetic dials tuned for product UI, AI Tells blacklist with overrides, mechanically-checkable Pre-Flight. Sits above the token layer (DESIGN.md) and mechanical review (code-reviewer); does not redeclare tokens or guide non-shadcn design systems. Inspired by taste-skill, cropped for AGF product UI per ADR-013.
agf-releasing-appleUse when apple-release-engineer is about to build the signed distributable (TestFlight build / notarized DMG / internal package) from merged-to-main code (after apple code review + SIT Audit pass and merge, before apple-qa-engineer runs E2E/UAT). Provides the applicability gate, pre-flight checks, lane execution per channel, notarization, real-output smoke test, hand-off, and the release-report skeleton. Pairs with deployment.md §7 "Apple 发布" contract and slash /agf-apple-release.
agf-running-apple-sitUse when apple-dev has finished feature code + Unit tests (Swift Testing) and is about to enter code-review. Provides the Apple SIT scope (xcodebuild test + simulator per declared target), the AC-driven integration walk, APIProtocol-mock discipline, and evidence sink (progress/apple-dev.md). SIT is dev-owned; apple-code-reviewer audits the evidence.
agf-running-release-retroUse when product-lead is about to run a release retrospective after a successful MAJOR or MINOR release push (PATCH skipped). Provides applicability gate, pre-conditions, 7-step execution sequence, anti-patterns, and the verification gate before commit. Pairs with template docs/reviews/retro-_TEMPLATE.md and slash /agf-release-retro.
agf-running-sit-testsUse when an execution-layer dev (frontend-dev / backend-dev / ai-agent-dev / ml-engineer / miniapp-dev) has finished feature code + Unit tests and is about to enter code-review. Provides the SIT scope, environment, AC-driven integration walk, and evidence sink (progress/<role>.md). SIT is now a dev-owned step, not a separate QA stage.
agf-wiring-apple-llmUse when wiring LLM features into the Apple client (macOS / iOS) — streaming chat via the FastAPI multi-LLM gateway, or on-device inference (Apple Foundation Models / Core ML). Provides the route decision (gateway vs on-device), streaming transport pattern, env/config contract, offline & cost guardrails, and minimum verifications before declaring the integration done.
agf-wiring-multi-llm-sdkUse when wiring up or switching between China-domestic LLM providers (DeepSeek, Doubao/Volc Ark, Qwen/DashScope, MiniMax). Provides OpenAI-compatible adapter pattern, env-var contracts, fallback strategy, cost guardrails, and minimum verifications before declaring integration done.
agf-writing-adrUse when tech-lead is about to record an architecture decision (new tech stack member, deviation from baseline, deployment / observability / auth scheme choice). Provides ADR structure, version-audit appendix format, and "what NOT to ADR" guidance. Replaces ad-hoc copy from ADR-000.