Communitygithub.com

agent-self-evaluation

在完成任何非琐碎任务后使用。代理根据5个维度(准确性、完整性、清晰性、可操作性、简洁性)对输出进行自我评分,并附上每个维度的具体证据,生成结构化的1-5分评分卡及改进建议。

agent-self-evaluation 是什么?

该技能是一种结构化反思机制,旨在让AI代理在完成复杂任务后,基于一个五维度评估框架(准确性、完整性、清晰性、可操作性、简洁性)对其输出进行自我评分。它不是简单的通过/失败检查,而是要求代理提供具体证据来支持每个维度的评分(低于5分的必须有证据),从而捕捉遗漏、标记过度自信并找出改进空间。技能支持多种触发场景,如编写多文件代码、多步骤工作流、多次调试会话或生成设计文档后。工作流包括:收集原始材料(用户请求、最终输出、工具结果、用户反馈)、独立对每个维度评分、生成包含评分卡、总分和1-3项改进建议的报告,并对3分及以下的维度立即修复或用30秒内的快速修复解决。技能特别强调了避免“一切都是5分”的自我赞美、过度惩罚超出范围的任务以及将个人偏好与客观差距混为一谈等反模式。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/agent-self-evaluation

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

代理自我评估

在完成复杂任务后,代理暂停并根据结构化的五维度评估标准对自己的输出进行评分。这不是通过/失败的门槛——而是一个有意识的反思步骤,用于在用户提出要求之前捕捉遗漏、标记过度自信并找出改进领域。

何时激活

  • 编写跨越3个以上文件或50行以上代码后
  • 完成多步骤工作流后(实现 → 测试 → 审查)
  • 涉及3次以上尝试的调试会话后
  • 生成了设计文档、架构决策或书面分析后
  • 用户询问“这个做得好吗?”或“给自己打分”时
  • 在任何会话结束的 Stop 钩子中(如已配置 — 参见 references/hook-integration.md)

核心概念

五个评估维度

维度问题捕捉什么
准确性事实、声明和输出正确吗?幻觉、错误的 API 名称、不正确的语法、虚假陈述
完整性是否涵盖了用户要求的所有内容?遗漏的边界情况、未处理的错误路径、忘记的需求、跳过的子任务
清晰性解释是否易于理解且结构良好?令人困惑的解释、无定义的术语、缺失上下文、冗长啰嗦
可操作性用户能否立即根据输出采取行动?模糊的建议、缺少步骤、“你应该做X”但不展示如何做、无验证路径
简洁性是否使用了最少的词语/令牌?冗余、过度解释、逐字重复用户的问题、填充内容

评分标准

5 — 卓越:没有任何合理的改进空间
4 — 良好:只有小的吹毛求疵,没有实质性差距
3 — 合格:满足请求,但至少在某个维度上有明显弱点
2 — 薄弱:存在明显差距,影响可用性或正确性
1 — 差:根本未满足请求或包含重大错误

证据规则

低于5分的每个分数必须引用具体证据。3分不能只说“可以更好”——它必须确切说明缺少了什么或错误在哪里。口号是:“展示差距,而不仅仅是命名差距。”

工作流

第一步:收集原始材料

收集你要评估的内容:

- 原始用户请求(从对话中回读)
- 你的最终回复/输出(交付物)
- 任何验证正确性的工具输出(测试结果、退出码、lint 输出)
- 任务期间收到的任何用户反馈(纠正、“重试”、“这不对”)

第二步:独立评分每个维度

逐一处理5个维度。对每个维度:

  1. 阅读维度问题
  2. 在输出中找到证据(或缺乏证据)
  3. 给出1-5分的评分
  4. 如果分数 < 5,写一句改进说明,指出差距

不要先在脑海里计算平均值然后再倒推。每个维度要独立评分。

第三步:生成评估报告

使用 templates/evaluation-report.md 中的模板。报告必须包含:

- 一句话总结
- 五维度评分卡(每个维度的分数 + 证据)
- 总分(简单平均值,四舍五入到一位小数)
- 1-3个按影响排序的具体改进项
- 自我检查:“用户会同意这个评估吗?”

第四步:应用改进

如果任何维度得分为3或更低:

  1. 说明你会采取什么不同的做法
  2. 如果差距可以在30秒内修复(缺失链接、表达不清晰),立即修复
  3. 如果差距需要返工,明确标注:“该维度得分为[原因],因为[证据]。重新运行并采用[具体修复]可能会将其提升至[分数]。”

代码示例

示例:良好评估(得分4+)

任务:为 HTTP 客户端添加重试逻辑

评分卡:
  准确性:    5 — 所有 API 调用正确。已验证:重试使用了
                  指数退避。没有虚构的方法。
  完整性: 4 — 涵盖了快乐路径 + 3种错误情况。缺少:
                  挂起连接的超时处理。
  清晰性:      5 — 代码注释解释了退避公式。
                  PR 描述链接到了促使此更改的事件。
  可操作性:5 — 单次合并。无需后续任务。测试通过。
  简洁性:  4 — 共47行。重试循环可以提取出来
                  放到一个帮助函数中,减少约8行。

总分:4.6 — 一个差距(超时处理)。合并前修复。

示例:薄弱评估(得分2-3)

任务:为 HTTP 客户端添加重试逻辑

评分卡:
  准确性:    2 — 使用了 urllib3,这与我们基于 httpx 的
                  代码库不匹配。错误的库。
  完整性: 3 — 对 GET 有效。未处理 POST/PUT(用户
                  说的是“所有 HTTP 请求”)。
  清晰性:      4 — 代码可读。变量命名良好。
  可操作性:2 — 提到了“添加测试”但没有创建测试文件。
                  用户在合并前需要自己编写测试。
  简洁性:  3 — 120行。重试配置在3个地方重复
                  而不是使用一个共享的 RetryConfig 对象。

总分:2.8 — 使用了错误的库。需要用 httpx 重写。
  先修复准确性(切换为 httpx),然后扩展到所有
  HTTP 方法,最后合并配置。

反模式

“一切都是5分”

失败:准确性:    5 — 一切良好。
   完整性: 5 — 所有内容都已覆盖。
   清晰性:      5 — 清晰。

没有引用证据。这是自我赞美,不是评估。真正的5分需要证明没有可以改进的地方。

过度惩罚范围蔓延

失败:完整性: 2 — 未处理 WebSocket 连接或
   gRPC 流式传输(用户没有要求这些)

只评估用户实际请求的内容,而不是你本来可以额外构建的东西。

利用评估重新争论

失败:“正如我之前所说,这种方法有问题。分数:1”

评估是关于交付的输出,而不是重新争论已经做出的设计决策。如果方法有问题,应该在交付前就发现。

将个人偏好与客观差距混淆

失败:“分数:3。我不喜欢 Python 装饰器。”

“不喜欢”不是证据。引用具体的可读性、可测试性或正确性问题,否则将分数保持在4分及以上。

最佳实践

  • 评估输出,而非过程。 用户关心你交付了什么,而不是你经历了多少次迭代。
  • 每个薄弱维度只提一个改进项。 不要为一个维度列出5件事——选择影响最大的差距。
  • 将改进项与用户影响挂钩。 “缺少错误处理意味着用户的 API 调用将静默崩溃”胜过“添加错误处理”。
  • 具体说明'修复后'的样子。 “重新运行并配置 httpx 传输层使用重试”胜过“修复库问题”。
  • 将工具输出用作证据。 如果测试通过,引用它们。如果 lint 干净,引用它。不要猜测——通过 grep 查找证明。
  • 如果找不到任何差距,再努力尝试。 所有五个维度都获得完美分数的情况很少见。问自己:“如果我是用户,这个输出有什么让我恼火的地方?”

相关技能

  • agent-eval — 不同编码代理在基准任务上的头对头比较
  • verification-loop — 系统地将输出与预期结果进行验证
  • security-review — 关注安全的代码审查清单

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/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

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.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

api-connector-builder

Build a new API connector or provider by matching the target repo

相关技能