Agent审计
- 作者仓库星标 430
- 作者更新于 实时读取
- 作者仓库 aeon
- 领域
- 工程开发 · meta
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @aaronjmars · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- Linux
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
---
name: Skill Evals
description: Validate skill outputs against assertions, diff vs prior eval to flag regressions, file issues f…
category: 工程开发
runtime: 无特殊运行时
---
# Skill Evals 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Steps / 1. Load inputs / 2. Run coverage audit (delegated)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Steps / 1. Load inputs / 2. Run coverage audit (delegated)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Steps / 1. Load inputs / 2. Run coverage audit (delegated)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: Skill Evals
description: Validate skill outputs against assertions, diff vs prior eval to flag regressions, file issues f…
category: 工程开发
source: aaronjmars/aeon
---
# Skill Evals
## 什么时候使用
- 把工程方向的常用动作沉淀成 Agent 可调用的技能 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 围绕 meta 组织上下文、步骤和验…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Steps / 1. Load inputs / 2. Run coverage audit (delegated)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "Skill Evals" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Steps / 1. Load inputs / 2. Run coverage audit (delegated)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} ${var} — Skill name to evaluate. If empty, evaluates all skills in
evals.json.
Today is ${today}. Read memory/MEMORY.md for context.
This skill exists to catch quality regressions between runs — not just to re-state a snapshot of the latest output. The lede is what changed since last eval and what to do about it, not a flat pass/fail table.
Steps
1. Load inputs
skills/skill-evals/evals.json— assertion manifest (read withjq; if parse fails, retry once after 5s, then exitSKILL_EVALS_ERROR).aeon.yml— registered skills, enabled flags, cron schedules.memory/cron-state.json—total_runs,success_rate,last_quality_score,last_failed,last_successper skill.memory/issues/INDEX.md— currently open issues (used to dedupe issue filing in step 5b).- Most recent prior eval at
articles/skill-evals-*.md(sorted descending, excluding today's). If none exist, mark prior_run asBOOTSTRAP— every result isNEW_*.
If evals.json is missing or has zero skills keys, run ./scripts/eval-audit --stubs to scaffold a starter spec and exit SKILL_EVALS_BOOTSTRAP with a notify telling the operator to commit the stub.
2. Run coverage audit (delegated)
Call ./scripts/eval-audit --json and parse:
summary.coverage_pct,summary.covered,summary.uncovered_enabled,summary.uncovered_disableduncovered_enabled[].skilland.inferred_pattern— these are the spec-gap candidates surfaced in the Action Queue.
Do not re-implement coverage detection in prose. If the script fails, fall back to the in-memory check (compare evals.json keys to aeon.yml enabled skills) and mark eval-audit=fail in the source-status footer.
3. Determine eval scope
- If
${var}is set → evaluate only that one skill (skip if not inevals.jsonand notify "skill-evals: ${var} has no spec — add an entry to evals.json"). - Otherwise evaluate every skill in
evals.json.
4. For each skill in scope, run checks
a. Find latest output: glob output_pattern, sort descending by filename. If empty → status NO_OUTPUT, root_cause no_file_match, skip remaining checks.
b. Empty/stale: if file size is 0 bytes → FAIL, root_cause empty_file. If file mtime is older than 2× expected_cadence (derived from the skill's cron in aeon.yml; fall back to 14 days if cron is workflow_dispatch or unparseable) → STALE, root_cause stale_file. Stale outputs still run their assertions but are reported as STALE so dashboard noise is correct.
c. Word count: count words; fail if < min_words → root_cause word_count (record actual vs threshold).
d. Required patterns: for each pattern (pipe-separated alternatives), grep with -E. Missing → root_cause missing_pattern:<pattern>.
e. Forbidden patterns: any match → root_cause forbidden_pattern:<pattern>.
f. Numeric checks: for each entry, extract first regex match. Outside [min, max] → root_cause numeric_oob:<label>. If no match found and entry has skip_if_not_found: true, skip; otherwise WARN with root_cause numeric_missing:<label>.
g. Quality cross-check: read memory/skill-health/{skill}.json. If avg_score < 2.5 → status QUALITY_DEGRADED, root_cause quality_score:<avg>. If 2.5 ≤ avg_score < 3.5, record as note (no status change). If file missing, record quality=unknown.
Final status precedence: NO_OUTPUT > FAIL > STALE > QUALITY_DEGRADED > WARN > PASS.
5. Diff vs prior eval (the lede)
Parse the prior eval article's results table. For each skill produce one of:
NEW_FAIL— was PASS/STALE/WARN, now FAIL/QUALITY_DEGRADED/NO_OUTPUTFIXED— was failing, now PASSSTILL_FAIL— was failing, still failing (carry the issue ID forward)NEW_PASS— wasn't in prior (newly added to evals.json)NEW_NO_COVERAGE— covered prior, no eval entry now (rare; usually means evals.json edit)STABLE— same status both runsa. Issue filing. For every
NEW_FAILandNEW_QUALITY_DEGRADED:- Check
memory/issues/INDEX.md— if an open issue already names this skill in the title, skip (avoid duplicates). - Else write
memory/issues/ISS-{NNN}.mdwith frontmatter:--- id: ISS-{NNN} title: {skill}: {root_cause_short} status: open severity: {high if NEW_FAIL, medium if QUALITY_DEGRADED} category: {map root_cause: missing_pattern→prompt-bug, forbidden_pattern→prompt-bug, numeric_oob→quality-regression, word_count→quality-regression, stale_file→missing-secret-or-cron, empty_file→quality-regression, quality_score→quality-regression, no_file_match→missing-secret-or-cron} detected_by: skill-evals detected_at: {ISO timestamp} affected_skills: [{skill}] root_cause: {full root_cause string} --- {one-paragraph context with file path, expected vs actual, link to article} {NNN}= next free 3-digit ID (scanmemory/issues/ISS-*.md, take max + 1, zero-pad).- Append a row to
memory/issues/INDEX.mdOpen table.
b. Issue closing. For every
FIXED: scanmemory/issues/ISS-*.mdfor an open issue whoseaffected_skillscontains this skill anddetected_by: skill-evals; flipstatus: resolved, setresolved_at, move row from Open → Resolved table in INDEX.md. (Don't touch issues filed by other detectors.)- Check
6. Compute verdict
One-line verdict, picked by precedence:
SKILL_EVALS_REGRESSED— anyNEW_FAILexistsSKILL_EVALS_QUALITY_DROP— anyNEW_QUALITY_DEGRADED(no NEW_FAIL)SKILL_EVALS_RECOVERED—FIXED ≥ 1and zero new failuresSKILL_EVALS_COVERAGE_CLIFF— coverage_pct dropped ≥ 10 points vs last run, or absolute coverage_pct < 25 and last run was ≥ 25SKILL_EVALS_OK— all stable, all green
7. Build the Action Queue
A short, ordered, concrete checklist at the top of the article. Cap at 8 items. Each item is one line, naming a specific skill and a specific next step:
- Patch (regex/threshold tweaks):
Patch evals.json:{skill} — {root_cause} - Investigate (FAIL with no obvious fix):
Investigate {skill} — {root_cause} (ISS-{NNN}) - Re-run (NO_OUTPUT, no recent dispatch):
Dispatch {skill} — no output in {N} days - Add spec (uncovered enabled):
Add evals.json entry for {skill} — pattern: {inferred_pattern}(one line per uncovered enabled skill, max 5; if more, summarize "+N more — see Coverage Gaps")
If the queue is empty, write Action Queue: none — all green.
8. Write the article
Path: articles/skill-evals-${today}.md. Skeleton:
# Skill Evals — ${today}
**Verdict:** {VERDICT}
**Coverage:** {covered}/{enabled_total} ({coverage_pct}%) {↑↓ vs prior or "(first run)"}
**Diff:** {N_NEW_FAIL} new fail · {N_FIXED} fixed · {N_STILL_FAIL} still failing · {N_STABLE} stable
## Action Queue
1. ...
2. ...
## Regressions (NEW_FAIL + NEW_QUALITY_DEGRADED)
| Skill | Status | Root cause | Issue |
|-------|--------|------------|-------|
| ... | NEW_FAIL | missing_pattern:stars | ISS-014 |
## Recovered (FIXED)
| Skill | Was | Now |
|-------|-----|-----|
## Still Failing
| Skill | Status | Root cause | Issue | Failing since |
|-------|--------|------------|-------|---------------|
## Full Results
| Skill | Status | Diff | Root cause | Quality | Words | Last output |
|-------|--------|------|------------|---------|-------|-------------|
## Coverage Gaps (enabled in aeon.yml, missing from evals.json)
- {skill} — inferred pattern: `{inferred_pattern}`
## Sources
- evals.json={ok|fail} · cron-state={ok|fail} · skill-health={ok|empty|fail} · eval-audit={ok|fail} · prior-article={ok|none}
Omit empty sections (no Recovered section if zero FIXED, etc.). Keep the Coverage Gaps section bounded to 10 lines max — overflow into a +N more summary.
9. Notify (gated)
Only call ./notify when one of the following holds:
- Verdict is
SKILL_EVALS_REGRESSED,SKILL_EVALS_QUALITY_DROP, orSKILL_EVALS_COVERAGE_CLIFF - Verdict is
SKILL_EVALS_RECOVERED(good news worth a ping)
Stay silent on SKILL_EVALS_OK (still write the article + log entry; just don't ping). This trains the operator that a notification means action is needed.
Notify body (concise, soul-voice):
*Skill Evals — {VERDICT}*
{N_NEW_FAIL} new fail · {N_FIXED} fixed · coverage {coverage_pct}%
Top action: {action_queue[0]}
Article: articles/skill-evals-${today}.md
If N_NEW_FAIL > 0, append the first 3 regressions as {skill}: {root_cause} lines.
10. Log
Append to memory/logs/${today}.md:
### skill-evals
- Verdict: {VERDICT}
- Diff: {N_NEW_FAIL} new fail / {N_FIXED} fixed / {N_STILL_FAIL} still failing / {N_STABLE} stable
- Coverage: {covered}/{enabled_total} ({coverage_pct}%)
- Issues filed: [list ISS-IDs]
- Issues closed: [list ISS-IDs]
- Action queue head: {action_queue[0] or "none"}
Sandbox note
All inputs are local files (evals.json, aeon.yml, memory/*, articles/*, scripts/eval-audit). No outbound HTTP — no fallback needed. ./scripts/eval-audit is a local bash script and uses jq; if jq is missing (rare on GH Actions ubuntu runners), the script will exit non-zero — mark eval-audit=fail in the source-status footer and continue with the in-memory coverage check.
Constraints
- Never overwrite a prior issue file. Always allocate a fresh
ISS-{NNN}number. - Never close an issue this skill didn't file (only
detected_by: skill-evalsissues are closeable here). - Don't notify when verdict is
SKILL_EVALS_OK— silence is the correct signal on a green week. - Preserve the assertion schema (
output_pattern,min_words,required_patterns,forbidden_patterns,numeric_checks) — additions allowed (skip_if_not_found,expected_cadence), removals are breaking. - Cap Coverage Gaps and Action Queue sections to keep the article scannable; the article is read by humans, not just machines.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核