Communitygithub.com

代理排序

透過並行的、基於倉庫感知的審查流程,將技能、指令、規則、鉤子和附加元件分類到「每日使用」與「函式庫」兩個類別中,為特定倉庫建立有證據支持的 ECC 安裝計畫。當需要根據專案實際需求精簡 ECC,而非載入完整套件時使用。

代理排序 是什麼?

這個技能旨在為特定程式碼倉庫建立一個精簡的、僅包含必要工具的 ECC 環境。其核心概念是將 ECC 的各個元件(如技能、指令、規則等)分類為「DAILY」(每日使用,每次會話都載入)和「LIBRARY」(函式庫,保留但非預設載入)兩大類別,以減少不必要的噪音和上下文干擾。 該技能要求所有分類決策都必須有來自實際程式碼庫的具體證據,例如檔案副檔名、套件管理器、框架配置等,而非基於主觀臆測或個人偏好。它提供了一套結構化的流程,包括:1) 讀取並分析倉庫的技術棧;2) 建立證據表;3) 決定每個元件的歸類;4) 產生安裝計畫(安裝、移除或重新路由);5) 可選擇性地建立一個搜尋用函式庫路由器;6) 最後進行驗證。 此技能支援平行子代理(如果可用)來加速審查,可並行處理「代理、技能、指令、規則、鉤子與腳本、附加項目」這六個審查流程。最終產出物包括每日清單、函式庫清單、安裝計畫以及驗證報告。它特別適合那些技術棧清晰,但希望重複安裝決策有客觀依據,或者當前專案使用的工具集已經偏離其原始設定的團隊。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/agent-sort

在你喜歡的 AI 中提問

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

說明文件

代理排序 是做什麼的?

當一個倉庫需要一個專案專用的 ECC 表面,而非預設的完整安裝時,使用此技能。

目標不是猜測「什麼感覺有用」。目標是根據實際程式碼庫的證據來分類 ECC 元件。

使用時機

  • 一個專案只需要 ECC 的子集,完整安裝太過吵雜
  • 倉庫的技術棧很明確,但沒有人想逐一手動挑選技能
  • 團隊希望有一個可重複的安裝決策,該決策基於 grep 證據而非個人意見
  • 你需要區分總是載入的每日工作流程表面,以及可搜尋的函式庫/參考表面
  • 一個倉庫的語言、規則或鉤子設定已經偏離,需要清理

不可妥協的規則

  • 使用當前的倉庫作為真相來源,而非通用偏好
  • 每個「DAILY」的決策都必須引用具體的倉庫證據
  • 「LIBRARY」不代表「刪除」;它代表「保持可存取,但預設不載入」
  • 不要安裝目前倉庫無法使用的鉤子、規則或腳本
  • 優先使用 ECC 原生表面;不要引入第二個安裝系統

產出物

按順序產出以下成品:

  1. DAILY 盤點清單
  2. LIBRARY 盤點清單
  3. 安裝計畫
  4. 驗證報告
  5. 可選的 skill-library 路由器,如果專案需要的話

分類模型

僅使用兩個類別:

  • DAILY
    • 每個會話都應為此倉庫載入
    • 與倉庫的語言、框架、工作流程或操作表面強烈匹配
  • LIBRARY
    • 保留有用,但不值得預設載入
    • 應可透過搜尋、路由器技能或有選擇性的手動使用來存取

證據來源

在進行任何分類之前,使用倉庫本地的證據:

  • 檔案副檔名
  • 套件管理器和鎖定檔
  • 框架配置
  • CI 和鉤子配置
  • 建置/測試腳本
  • 引入和依賴清單
  • 明確描述技術棧的倉庫文件

有用的指令包括:

rg --files
rg -n "typescript|react|next|supabase|django|spring|flutter|swift"
cat package.json
cat pyproject.toml
cat Cargo.toml
cat pubspec.yaml
cat go.mod

並行審查流程

如果並行子代理可用,將審查拆分為以下流程:

  1. 代理
    • 分類 agents/*
  2. 技能
    • 分類 skills/*
  3. 指令
    • 分類 commands/*
  4. 規則
    • 分類 rules/*
  5. 鉤子和腳本
    • 分類鉤子表面、MCP 健康檢查、輔助腳本和作業系統相容性
  6. 附加項目
    • 分類上下文、範例、MCP 配置、模板和指導文件

如果子代理不可用,則依序執行相同的流程。

核心工作流程

1. 讀取倉庫

在分類任何項目之前,先確立實際的技術棧:

  • 使用的語言
  • 使用的框架
  • 主要的套件管理器
  • 測試棧
  • 程式碼檢查/格式化棧
  • 部署/執行時期表面
  • 已存在的操作者整合

2. 建立證據表

對於每個候選表面,記錄:

  • 元件路徑
  • 元件類型
  • 提議的類別
  • 倉庫證據
  • 簡短的理由

使用此格式:

skills/frontend-patterns | skill | DAILY | 84 個 .tsx 檔案,next.config.ts 存在 | 核心前端棧
skills/django-patterns   | skill | LIBRARY | 無 .py 檔案,無 pyproject.toml       | 此倉庫未啟用
rules/typescript/*       | rules | DAILY | package.json + tsconfig.json            | 活躍的 TS 倉庫
rules/python/*           | rules | LIBRARY | 零個 Python 原始碼檔案             | 僅保持可存取

3. 決定 DAILY 與 LIBRARY

提升為 DAILY 當:

  • 倉庫明確使用匹配的技術棧
  • 元件足夠通用,能幫助每個會話
  • 倉庫已依賴對應的執行時期或工作流程

降級為 LIBRARY 當:

  • 元件與技術棧不符
  • 倉庫未來可能需要它,但不是每天
  • 它增加了上下文負擔,但沒有立即的相關性

4. 建立安裝計畫

將分類轉化為行動:

  • DAILY 技能 -> 安裝或保留在 .claude/skills/
  • DAILY 指令 -> 僅在仍然有用時保留為明確的 Shims
  • DAILY 規則 -> 僅安裝匹配的語言集合
  • DAILY 鉤子/腳本 -> 僅保留相容的
  • LIBRARY 表面 -> 保持可透過搜尋或 skill-library 存取

如果倉庫已經使用選擇性安裝,則更新該計畫,而不是創造另一個系統。

5. 建立可選的函式庫路由器

如果專案想要一個可搜尋的函式庫表面,則建立:

  • .claude/skills/skill-library/SKILL.md

該路由器應包含:

  • DAILY 與 LIBRARY 的簡短說明
  • 分組的觸發關鍵字
  • 函式庫參考的位置

不要將每個技能主體複製到路由器中。

6. 驗證結果

套用計畫後,驗證:

  • 每個 DAILY 檔案都存在於預期位置
  • 過時的語言規則沒有被保留啟用
  • 不相容的鉤子沒有被安裝
  • 最終的安裝確實與倉庫技術棧匹配

回傳一份簡潔的報告,包含:

  • DAILY 數量
  • LIBRARY 數量
  • 已移除的過時表面
  • 未解決的問題

交接

如果下一步是互動式安裝或修復,請交接給:

  • configure-ecc

如果下一步是重疊清理或目錄審查,請交接給:

  • skill-stocktake

如果下一步是更廣泛的上下文修剪,請交接給:

  • strategic-compact

輸出格式

按此順序回傳結果:

STACK
- 語言/框架/執行時期摘要

DAILY
- 總是載入的項目及其證據

LIBRARY
- 可搜尋/參考的項目及其證據

INSTALL PLAN
- 應該安裝、移除或重新路由的項目

VERIFICATION
- 已執行的檢查和剩餘的差距

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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

相關技能