Communitygithub.com

技能庫存盤點 (skill-stocktake)

用於審計 Claude 技能和指令的品質。支援快速掃描(僅檢查變更的技能)和完整盤點模式,並使用順序性子代理批次評估。

技能庫存盤點 (skill-stocktake) 是什麼?

此技能提供了一個名為 `/skill-stocktake` 的斜線指令,用於對所有 Claude 技能和指令進行全面品質審計。它使用一個品質檢查清單結合 AI 整體判斷來評估每個技能。該工具支援兩種主要模式:**快速掃描**模式會針對自上次運行以來有變更的技能進行重新評估,通常耗時 5-10 分鐘;**完整盤點**模式則會掃描所有已知的技能,耗時 20-30 分鐘。 整個流程分為四個階段:首先,它會掃描全域 (`~/.claude/skills/`) 和專案級別 (`{cwd}/.claude/skills/`) 的技能目錄來建立庫存清單。接著,它會啟動一個通用型子代理來根據一個檢查清單評估每個技能,該清單會檢查內容重疊、技術參考的新鮮度以及使用頻率,並給出「保留」、「改進」、「更新」、「淘汰」或「合併至 [X]」等判定。第三階段會產出摘要表格,最後一個階段則會根據判定結果提出具體的行動建議,例如淘汰、合併或改進技能。 此技能的主要用途是保持技能庫的精簡、高效和現代化,非常適合需要定期維護 Claude 工作流程和自訂技能設定的開發者。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/skill-stocktake

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

技能庫存盤點 (skill-stocktake) 是做什麼的?

斜線指令 (/skill-stocktake),使用品質檢查清單 + AI 整體判斷來審計所有 Claude 技能和指令。支援兩種模式:快速掃描,用於近期變更的技能;以及完整盤點,用於完整的審查。

範圍

此指令會鎖定以下路徑(相對於執行指令的目錄):

路徑說明
~/.claude/skills/全域技能(所有專案)
{cwd}/.claude/skills/專案層級技能(若目錄存在)

在第一階段開始時,指令會明確列出找到並掃描了哪些路徑。

鎖定特定專案

若要包含專案層級技能,請在該專案的根目錄執行:

cd ~/path/to/my-project
/skill-stocktake

如果專案沒有 .claude/skills/ 目錄,則只會評估全域技能和指令。

模式

模式觸發條件持續時間
快速掃描results.json 存在(預設)5–10 分鐘
完整盤點results.json 不存在,或 /skill-stocktake full20–30 分鐘

結果快取: ~/.claude/skills/skill-stocktake/results.json

快速掃描流程

僅重新評估自上次執行以來有變更的技能(5–10 分鐘)。

  1. 讀取 ~/.claude/skills/skill-stocktake/results.json
  2. 執行:bash ~/.claude/skills/skill-stocktake/scripts/quick-diff.sh \ ~/.claude/skills/skill-stocktake/results.json (專案目錄會從 $PWD/.claude/skills 自動偵測;僅在需要時明確傳遞)
  3. 如果輸出為 []:報告「自上次執行以來無變更。」並停止
  4. 僅使用相同的第二階段標準重新評估那些變更的檔案
  5. 沿用先前結果中未變更的技能
  6. 僅輸出差異
  7. 執行:bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \ ~/.claude/skills/skill-stocktake/results.json <<< "$EVAL_RESULTS"

完整盤點流程

第一階段 — 庫存

執行:bash ~/.claude/skills/skill-stocktake/scripts/scan.sh

此腳本會列舉技能檔案、提取 frontmatter,並收集 UTC 修改時間。 專案目錄會從 $PWD/.claude/skills 自動偵測;僅在需要時明確傳遞。 從腳本輸出呈現掃描摘要和庫存表格:

掃描中:
  ✓ ~/.claude/skills/         (17 個檔案)
  ✗ {cwd}/.claude/skills/    (未找到 — 僅限全域技能)
技能7天使用次數30天使用次數說明

第二階段 — 品質評估

啟動一個代理工具子代理(通用型代理),並附上完整庫存和檢查清單:

Agent(
  subagent_type="general-purpose",
  prompt="
根據以下清單評估技能庫存。

[庫存]

[檢查清單]

為每個技能回傳 JSON:
{ "判決": "保留"|"改進"|"更新"|"淘汰"|"合併至 [X]", "理由": "..." }
"
)

子代理讀取每個技能,套用檢查清單,並為每個技能回傳 JSON:

{ "判決": "保留"|"改進"|"更新"|"淘汰"|"合併至 [X]", "理由": "..." }

區塊指引: 每次子代理呼叫處理約 20 個技能,以維持可管理的上下文。在每個區塊之後,將中間結果儲存至 results.json(status: "in_progress")。

在所有技能評估完成後:設定 status: "completed",繼續進行第三階段。

恢復偵測: 若啟動時發現 status: "in_progress",從第一個未評估的技能繼續。

每個技能會根據以下檢查清單進行評估:

- [ ] 已檢查與其他技能的內容重疊
- [ ] 已檢查與 MEMORY.md / CLAUDE.md 的重疊
- [ ] 已驗證技術參考的新鮮度(若有工具名稱 / CLI 標誌 / API,請使用 WebSearch)
- [ ] 已考慮使用頻率

判決標準:

判決意義
保留有用且符合現狀
改進值得保留,但需要特定改進
更新引用的技術已過時(使用 WebSearch 驗證)
淘汰品質低、陳舊或成本不對稱
合併至 [X]與另一個技能有大量重疊;指明合併目標

評估是 AI 整體判斷 — 非數字評分表。指導維度:

  • 可操作性:程式碼範例、指令或步驟,讓你能立即行動
  • 範圍契合度:名稱、觸發條件和內容一致;不會過於寬泛或狹隘
  • 獨特性:價值無法被 MEMORY.md / CLAUDE.md / 其他技能取代
  • 時效性:技術參考在當前環境中可正常運作

理由品質要求 — 理由 欄位必須自成體系並足以做出決策:

  • 請勿只寫「未變更」— 務必重新陳述核心證據
  • 對於淘汰:陳述 (1) 發現了什麼具體缺陷,(2) 取而代之的是什麼,能滿足相同需求
    • 錯誤:「已被取代」
    • 正確:「disable-model-invocation: true 已設定;已被 continuous-learning-v2 取代,該技能涵蓋所有相同模式加上信心評分。無任何獨特內容保留。」
  • 對於合併:指明目標並說明要整合哪些內容
    • 錯誤:「與 X 重疊」
    • 正確:「42 行精簡內容;chatlog-to-article 的步驟 4 已涵蓋相同工作流程。將 '文章角度' 提示作為一項備註整合到該技能中。」
  • 對於改進:說明所需的具體變更(哪個章節、什麼行動、目標大小)
    • 錯誤:「太長」
    • 正確:「276 行;章節 '框架比較' (第 80–140 行) 與 ai-era-architecture-principles 重複;將其刪除以縮減至約 150 行。」
  • 對於保留(快速掃描中僅修改時間變更):重新陳述原始判決理由,請勿寫「未變更」
    • 錯誤:「未變更」
    • 正確:「修改時間已更新但內容未變。獨特的 Python 參考資料,由 rules/python/ 明確匯入;未發現重疊。」

第三階段 — 摘要表格

技能7天使用次數判決理由

第四階段 — 整合

  1. 淘汰 / 合併:在向使用者確認之前,針對每個檔案提供詳細的論證:
    • 發現什麼具體問題(重疊、過時、損壞的參考等)
    • 哪個替代方案涵蓋了相同的功能(淘汰時:哪個現有技能/規則;合併時:目標檔案及要整合的內容)
    • 移除的影響(任何受影響的相依技能、MEMORY.md 參考或工作流程)
  2. 改進:提出具體的改進建議並附上理由:
    • 要改變什麼以及為什麼(例如,「將 430 行縮減至 200 行,因為章節 X/Y 與 python-patterns 重複」)
    • 由使用者決定是否執行
  3. 更新:提出已檢查來源的更新內容
  4. 檢查 MEMORY.md 行數;如果超過 100 行,提議壓縮

結果檔案結構

~/.claude/skills/skill-stocktake/results.json:

evaluated_at:必須設定為評估完成時的實際 UTC 時間。 透過 Bash 取得:date -u +%Y-%m-%dT%H:%M:%SZ。 切勿使用像 T00:00:00Z 這種僅包含日期的近似值。

{
  "evaluated_at": "2026-02-21T10:00:00Z",
  "mode": "full",
  "batch_progress": {
    "total": 80,
    "evaluated": 80,
    "status": "completed"
  },
  "skills": {
    "skill-name": {
      "path": "~/.claude/skills/skill-name/SKILL.md",
      "verdict": "Keep",
      "reason": "Concrete, actionable, unique value for X workflow",
      "mtime": "2026-01-15T08:30:00Z"
    }
  }
}

備註

  • 評估是盲審:無論技能來源為何(ECC、自撰、自動提取),都適用相同的檢查清單
  • 歸檔 / 刪除操作始終需要明確的使用者確認
  • 不根據技能來源做出不同判決

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能