SuperAPI AI Directory

curation

Agents & models

View repository

Updated 10-15 19:58

About this skill

/curation — Learned Skills quality control

An on-demand maintenance tool used to clean up and standardize ~/.claude/skills/learned/ the learned skills accumulated in. Not tied to any automated process; called manually when the user wants to tidy up.

Role: Retrospective Format Remediation

Fixexisting format drift in learned skills. Complements /update Step 4 (enforcing format atnew writestime), not a replacement.

Timing Tool
Batch-fix existing learned skills /curation
Enforce format when new skills are written /update Step 4 (learn-eval)

Step 1: Scan learned skills

Scan the ~/.claude/skills/learned/ directory (including subdirectories), and for each .md file collect: slug (filename), whether frontmatter is present, frontmatter completeness (whether it contains name/description/user-invocable/origin), quality scoring format (table vs single line vs none), mtime, and file size.

Output a statistics table:

Learned Skills 掃描結果:
- 總數:XX 個
- 有 frontmatter:XX 個
- 無 frontmatter:XX 個
- 評分格式分布:表格 XX / 單行 XX / 無 XX

List each problematic file as a numbered list (file path, problem type, expected fix action) to serve as the tracking baseline for item-by-item fixes and verification in Step 4; mark the status in the list as each item is fixed.The denominator is the length of this list (the number of problematic files), not the total scanned count, nor the task count— clean files do not enter the list, and using the total scanned count as the denominator would make the completion rate never reach 100%; while TaskCreate does not exist on the default model (see rules/task-tracking-availability.md), and using the task count as the denominator would drop straight to zero in a tool-less environment. If the list is empty (scan is entirely clean) → go directly to Step 5 to output the report, Step 4 is not needed. If the session has a Task tool, you can additionally use TaskCreate to mirror this list.

Step 2: Classify problems

Divide the scan results into four categories:

Problem type Criteria Auto-fixable
fmt-missing-frontmatter File does not start with --- at the beginning Yes — infer name from the H1 heading, infer description from the first paragraph
fmt-incomplete-frontmatter Has frontmatter but is missing required fields Yes — fill in the missing fields
fmt-score-inconsistent Quality scoring uses the single-line format (specificity=4, ...) rather than a table Yes — convert to a 5-dimension table
deprecated-marked Marked as ~/.claude/skills/learned/index.md in an index file (such as ~~strikethrough~~ or a README.md in the directory) but the .md file still exists. If there is no index file, skip this category and note it in the report HITL — delete after confirmation

Explicitly not done:

  • Do not automatically merge "similar" skills (similarity judgment is subjective and requires human decision)
  • Do not re-score existing skills (existing scores are judgments made at extraction time and have historical value)

Step 3: HITL confirmation (batch)

Use AskUserQuestion to display the classification statistics (total count, counts of each format problem category, count of deprecated markers), and provide options:

  1. Auto-fix everything (format problems + delete deprecated)
  2. Fix format only, confirm deprecated items one by one
  3. Confirm all fixes one by one
  4. View the list only, do not fix

Step 4: Execute corrections

Execute based on user selection:

Format correction (automatic):

  • No frontmatter → infer from content and insert:

    • name: convert from H1 title to kebab-case
    • description: take the first sentence of the first paragraph
    • user-invocable: false
    • origin: auto-extracted
  • Incomplete frontmatter → fill in missing fields

  • Rating format conversion:specificity=4, actionability=5, ... → 5-dimension table (keep original values, map specificity=4 into the "Score (1-5)" column of the specificity row)

    Dimension Score (1-5) Description
    specificity The level of specificity of the knowledge
    actionability The degree to which it can be directly applied
    scope fit Whether the scope of applicability is appropriate
    non-redundancy The degree of overlap with existing skills
    coverage The completeness of the covered scenarios

Deprecation cleanup (HITL):

  • For each skill marked as deprecated, show the name and description
  • After user confirmation, delete the .md file
  • Synchronously update the index file (remove strikethrough entries)

Post-correction verification:

After each correction action is executed, immediately run deterministic verification and update that file's status in the checklist:

  • fmt-missing-frontmatter After correction:grep -c "^---" <file> Confirm ≥ 2 (one at the beginning and one at the end ---)
  • fmt-incomplete-frontmatter After correction:grep -E "^(name|description|user-invocable|origin):" <file> Confirm that all 4 fields exist
  • fmt-score-inconsistent After correction:grep -c "| specificity |" <file> Confirm ≥ 1 (table row exists)

Verification passed → mark that item as complete in the checklist; verification failed → keep that item in an open state, and it must not be considered complete. (When the session has the Task tool,update the checklist first, then mirror TaskUpdate——the checklist is the authoritative state; a failed Task call does not affect the determination.)

Step 5: Output report

## /curation 執行結果

### 統計
- 掃描:XX 個 skills
- 修正格式:XX 個
- 刪除廢棄:XX 個
- 跳過:XX 個

### 修正明細
| Skill | 問題 | 動作 |
|-------|------|------|
| xxx.md | 無 frontmatter | 已補全 |
| yyy.md | 評分格式 | 已轉換為表格 |
| zzz.md | 已廢棄 | 已刪除 |

### 剩餘問題
<!-- 列出使用者跳過或驗證失敗、狀態非完成的項目 -->