Chuyển đến nội dung
Skillpedia
Prompt và LLM280k · #411

skill-stocktake

Skill này làm gì

Công cụ này kiểm tra chất lượng các công cụ khác (gọi là “skill”) mà bạn dùng với AI. Nó đảm bảo chúng hoạt động tốt và được tổ chức ngăn nắp.

Khi nào nên dùng

  • ✓Khi bạn muốn chắc chắn các công cụ AI của mình đang hoạt động đúng.
  • ✓Khi bạn thêm hoặc cập nhật công cụ cho AI.
  • ✓Khi bạn muốn rà soát toàn bộ các công cụ hiện có.

Liên kết skill

https://github.com/affaan-m/ECC/blob/main/skills/skill-stocktake/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/affaan-m/ECC/blob/main/skills/skill-stocktake/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra chất lượng các công cụ AI của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ xem xét các “skill” (hướng dẫn cho AI) để tìm vấn đề chất lượng. Nó có thể kiểm tra nhanh chỉ những công cụ đã thay đổi, hoặc rà soát toàn bộ tất cả chúng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

skill-stocktake

Slash command (/skill-stocktake) that audits all Claude skills and commands using a quality checklist + AI holistic judgment. Supports two modes: Quick Scan for recently changed skills, and Full Stocktake for a complete review.

Scope

The command targets the following paths relative to the directory where it is invoked:

Path Description
~/.claude/skills/ Global skills (all projects)
{cwd}/.claude/skills/ Project-level skills (if the directory exists)

At the start of Phase 1, the command explicitly lists which paths were found and scanned.

Directories named .trash are excluded from both scan modes: archived skills are not part of the live inventory. If an older results.json contains .trash entries, start a new Full Stocktake using the cache initialization below before resuming Quick Scan. An ordinary save merges entries and does not remove archived records.

Targeting a specific project

To include project-level skills, run from that project's root directory:

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

If the project has no .claude/skills/ directory, only global skills and commands are evaluated.

Modes

Mode Trigger Duration
Quick Scan results.json exists (default) 5–10 min
Full Stocktake results.json absent, or /skill-stocktake full 20–30 min

The shell scripts require Bash, Node.js, and jq on PATH.

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

Quick Scan Flow

Re-evaluate only skills that have changed since the last run (5–10 min).

  1. Read ~/.claude/skills/skill-stocktake/results.json
  2. Run: bash ~/.claude/skills/skill-stocktake/scripts/quick-diff.sh \ ~/.claude/skills/skill-stocktake/results.json (Project dir is auto-detected from $PWD/.claude/skills; pass it explicitly only if needed)
  3. If output is []: report "No changes since last run." and stop
  4. Re-evaluate only those changed files using the same Phase 2 criteria
  5. Carry forward unchanged skills from previous results
  6. Output only the diff
  7. Run: bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \ ~/.claude/skills/skill-stocktake/results.json <<< "$EVAL_RESULTS"

Full Stocktake Flow

Phase 1 — Inventory

Run this entire block in one Bash invocation. It prints the inventory for the agent and initializes a new full run only when there is no unfinished run to resume:

(
  set -euo pipefail
  SCAN_JSON=$(bash ~/.claude/skills/skill-stocktake/scripts/scan.sh)
  printf '%s\n' "$SCAN_JSON"
  RESULTS_JSON=~/.claude/skills/skill-stocktake/results.json

  CACHE_STATUS=""
  if [[ -f "$RESULTS_JSON" ]]; then
    CACHE_STATUS=$(jq -r '.batch_progress.status // ""' "$RESULTS_JSON")
  fi
  if [[ "$CACHE_STATUS" == "in_progress" ]]; then
    RESUMED_RESULTS=$(jq --slurpfile saved "$RESULTS_JSON" '
      . as $inventory | $saved[0]
      | .skills = (.skills | to_entries
        | map(.key = (.value.path // .key))
        | map(select(. as $entry
          | $entry.value.mtime != null
            and any($inventory.skills[];
              .path == $entry.key and .mtime == $entry.value.mtime)))
        | from_entries)
      | .mode = "full"
      | .batch_progress = {
          total: ($inventory.skills | length),
          evaluated: (.skills | length), status: "in_progress"
        }
    ' <<< "$SCAN_JSON")
    bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \
      "$RESULTS_JSON" --replace <<< "$RESUMED_RESULTS"
  else
    INITIAL_RESULTS=$(printf '%s\n' "$SCAN_JSON" | jq '{
      mode: "full", skills: {},
      batch_progress: {total: (.skills | length), evaluated: 0, status: "in_progress"}
    }')
    bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \
      "$RESULTS_JSON" --replace <<< "$INITIAL_RESULTS"
  fi
)

The script enumerates skill files, extracts frontmatter, and collects UTC mtimes. Project dir is auto-detected from $PWD/.claude/skills; pass it explicitly only if needed. Present the scan summary and inventory table from the script output:

Scanning:
  ✓ ~/.claude/skills/         (17 files)
  ✗ {cwd}/.claude/skills/    (not found — global skills only)
Skill 7d use 30d use Description

…

Câu hỏi thường gặp

“Skill” là gì?

“Skill” giống như các chương trình nhỏ hoặc bộ hướng dẫn dạy AI thực hiện những tác vụ cụ thể.

“Quick Scan” và “Full Stocktake” là gì?

“Quick Scan” chỉ kiểm tra các công cụ mới được thay đổi gần đây. “Full Stocktake” rà soát toàn bộ các công cụ.

Điều gì xảy ra nếu không tìm thấy một công cụ?

Nếu không tìm thấy công cụ, nó sẽ không được đưa vào bước kiểm tra chất lượng. Công cụ sẽ cho biết những vị trí nào đã được tìm kiếm.

Chi tiết

Mô tả gốc của tác giả

Use when auditing Claude skills and commands for quality. Supports Quick Scan (changed skills only) and Full Stocktake modes with sequential subagent batch evaluation.

repo: affaan-m/ECC

Độ phổ biến

Sao GitHub
280k
Vị trí xếp hạng
#411
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự