Communitygithub.com

代理工程

以評估先行、任務拆解和成本感知的模型路由方式,扮演代理工程師。在規劃或執行由AI代理端到端負責的工程工作時使用此技能。

代理工程 是什麼?

此技能定義了一套完整的「代理工程」工作流程,專門用於由AI代理執行大部分實作、人類負責品質與風險控管的場景。其核心運作原則包括:執行前先定義完成標準、將工作拆解成代理可單獨處理的單位、根據任務複雜度選擇合適的模型層級,以及透過評估與回歸測試來量測成果。技能中的評估先行循環要求先定義能力評估與回歸評估,執行基準測試並記錄失敗特徵,再進行實作,最後重新執行評估並比較差異。任務拆解則遵循15分鐘單元規則:每個單元必須可獨立驗證、具有單一主要風險,且具備明確的完成條件。此外,技能還提供了基於不同模型(Haiku、Sonnet、Opus)的路由策略、會話管理策略、AI生成程式碼的審查重點,以及成本追蹤規範,以確保代理工程工作的效率、品質與成本效益。

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

在你喜歡的 AI 中提問

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

說明文件

代理工程 是做什麼的?

使用此技能進行AI代理負責大部分實作、人類負責品質與風險控管的工程工作流程。

運作原則

  1. 在執行之前先定義完成標準。
  2. 將工作拆解成適合代理處理的單位。
  3. 根據任務複雜度路由至合適的模型層級。
  4. 透過評估與回歸檢查來量測成果。

評估先行循環

  1. 定義能力評估與回歸評估。
  2. 執行基準測試並記錄失敗特徵。
  3. 執行實作。
  4. 重新執行評估並比較差異。

任務拆解

應用 15 分鐘單元規則:

  • 每個單元應可獨立驗證
  • 每個單元應只有一個主要風險
  • 每個單元應有明確的完成條件

模型路由

  • Haiku:分類、樣板轉換、狹隘的編輯
  • Sonnet:實作與重構
  • Opus:架構設計、根本原因分析、跨檔案不變量

會話策略

  • 對於緊密耦合的單元,保持同一會話。
  • 在主要階段轉換後,開始全新的會話。
  • 在里程碑完成後進行壓縮,不要在活躍除錯期間進行。

AI 生成程式碼的審查重點

優先審查:

  • 不變量與邊界條件
  • 錯誤邊界
  • 安全性與驗證假設
  • 隱藏的耦合與部署風險

當自動格式化/程式碼檢查工具已強制執行風格時,不要在純風格分歧上浪費審查週期。

成本紀律

追蹤每項任務:

  • 使用的模型
  • Token 估計
  • 重試次數
  • 實際耗時
  • 成功/失敗

僅在較低層級模型因明確的推理差距而失敗時,才升級使用的模型層級。

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

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

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

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-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.

相關技能