Community程式設計與開發github.com

steipete/skill-cleaner

Codex/OpenClaw 技能審計:即時預算、使用情況、重複項目、精簡描述。

skill-cleaner 是什麼?

這是一個專為 Codex 與 OpenClaw 等 AI 代理平台設計的技能審計與清理工具。它能夠即時分析技能預算使用量、偵測重複的技能名稱或內容、列出冗長描述以節省提示詞預算,並找出長時間未使用的技能候選清單。支援多種執行模式,包括與 Codex 即時庫存比對、深度日誌掃描、以及自訂技能根目錄。分析報告會依序呈現「技能預算」、「描述候選」、「重複項目」、「未使用候選」及「根目錄摘要」,讓使用者能輕鬆決定哪些技能需要刪除、停用或精簡。在執行刪除或編輯前,工具會建議先驗證保留副本是否存在,並優先保留 Codex 內建技能或具有政策意義的維護技能,僅建議移除重複的區域性或腳本目錄技能。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/skill-cleaner

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

Skill Cleaner

當需要裁剪技能提示詞預算、找出重複技能、稽核已啟用/停用的技能根目錄,或決定要移除哪些技能/插件時,請使用此工具。

工作流程

  1. 從此技能目錄或專案根目錄執行分析器:
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --months 3

有用的變體:

node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --no-logs
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --no-live --no-logs
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --months 6 --max-log-mb 800 --deep-logs
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --context-tokens 272000 --budget-percent 2 --no-logs
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --root ~/Dropbox/boxd/skills --no-logs
node --experimental-strip-types skills/skill-cleaner/scripts/skill-cleaner.ts --root ~/.agents/skills --root-only --no-logs
  1. 按以下順序閱讀報告:
  • 技能預算:即時 Codex 庫存、2% 預算、預算內用量、以及完整描述的壓力。
  • 描述候選:描述過長的地方,可使用更寬鬆的語法節省提示詞預算。
  • 重複項目:在 Codex、插件快取、儲存庫兄弟目錄與個人技能根目錄中,出現相同技能名稱或幾乎相同的描述/主體。
  • 未使用候選:近期在 Codex/OpenClaw 日誌中,沒有使用者提及或實際讀取 SKILL.md 的技能。
  • 根目錄摘要:技能的來源,以及設定是否將其標記為停用。
  1. 在刪除或編輯前:
  • 確認保留的副本確實存在且已載入。
  • 當 Codex 內建技能已涵蓋時,優先刪除儲存庫本地或 agent-scripts 的重複項目。
  • 保留儲存庫本地的 OpenClaw 維護者技能,因為它們可能編碼了儲存庫政策或即時操作。
  • 保留描述中的觸發名詞:產品、工具、動作、物件。

分析器注意事項

  • 預設情況下,codex debug prompt-input 提供模型可見的確切技能清單、順序、名稱與別名路徑。--no-live 會強制使用較廣泛的檔案系統回退。
  • 廣泛的檔案系統掃描仍用於重複、停用與歸檔快取的診斷,但不視為已載入的庫存。
  • 此腳本鏡像 Codex 的模型可見行格式:- name: description (file: path)。
  • 它套用 Codex 風格的 frontmatter 規則:僅使用 YAML frontmatter,預設名稱來自上層目錄,單行淨化的 name 和 description。
  • 它遵循 Codex core-skills/src/render.rs:context_window 的 2%,代幣成本為 ceil(utf8_bytes / 4),然後完整描述 -> 等長描述截斷 -> 省略最少行數。別名表的行成本已包含在內。
  • 它讀取 ~/.codex/models_cache.json 以取得 GPT-5.5 的 context_window;回退值為 272,000 個代幣與 2%。
  • 預設僅掃描一般的 Codex/插件/儲存庫技能根目錄。額外資料夾(如 Dropbox 歸檔)僅在加上 --root <path> 時包含。
  • --root-only 需要至少一個 --root <path>,會跳過即時 Codex 庫存,僅掃描提供的根目錄。
  • 它會以 realpath 方式去除重複的根目錄,因此像 ~/.codex/skills/agent-scripts -> ~/Projects/agent-scripts/skills 這種符號連結根目錄不會產生假的重複。
  • 對於重複名稱,它會報告描述/主體的相似度,並僅在主體接近副本時建議刪除候選。保留優先順序預設為:直接 Codex 系統技能 > 直接 Codex 技能 > 插件技能 > 個人/儲存庫副本。
  • 預設掃描 ~/.codex/history.jsonl 與近期 ~/.codex/sessions/**/*.jsonl。加上 --deep-logs 可掃描歸檔的工作階段以及常見的 OpenClaw/Clawd 日誌資料夾。
  • 使用證據是啟發式的:使用者在工具呼叫引數中 $skill/use skill 的提及與路徑。

輸出政策

  • 先提出建議;僅在使用者要求時才進行編輯。
  • 如果要求執行清理,以小組方式進行提交:描述、刪除、設定停用。
  • 在未指定目的地或確認這些目錄可丟棄前,不要刪除被忽略/未追蹤的技能目錄。

Individual skills in this repo

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

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

相關技能