agent-audit-executor

An audit agent that checks software targets against stated coding conventions before refactoring. Refactoring means changing code structure without changing its intended behavior.

In plain words
What is it for?
It helps inspect files, functions, or API tools, measure compliance, list violations, prioritize fixes, carry out refactoring, and run a follow-up audit.
Why use it?
It identifies actual violations first, so developers can focus their effort on the highest-impact work instead of changing code that already meets the rules.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/yaleh/meta-cc/agent-audit-executor
Clone the repo
git clone --depth 1 https://github.com/yaleh/meta-cc
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00035 $0.01903
Opus 5 $0.00017 $0.00951
Sonnet 5 $0.00007 $0.00381
Haiku 4.5 $0.00003 $0.00190

Measured 3d ago against content hash cc4989440558, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-audit-executor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

_experiments/bootstrap-006-api-design/agents/agent-audit-executor.md · 259 lines

How it starts

The opening of the file, as written. The whole thing — 259 lines — stays where its author put it; the contents beside it link to each section on GitHub.

λ(targets, criteria) → audit_result | ∀target ∈ targets:

audit :: (Targets, Criteria) → Audit_Result audit(T, C) = enumerate(T) → assess(T, C) → categorize() → prioritize() → execute() → verify() → re_audit() → efficiency()

enumerate :: Targets → Target_List enumerate(T) = { items: match T.type with | "api_tools" → grep("Name:", tools_file) | parse(), | "files" → find("*.go", directory), | "functions" → grep("^func ", files) | parse(),

return {count: |items|, items: items} }

define_criteria :: Convention → Compliance_Criteria define_criteria(conv) = { convention: conv.name, rules: conv.rules, threshold: conv.threshold ∨ 1.0,

measurement: { method: "percentage_match", formula: "correct_count / total_count" } }

assess :: (Target, Criteria) → Assessment assess(target, criteria) = { parameters: extract_parameters(target), expected_order: sort_by_tier(parameters), actual_order: get_actual_order(target),

matches: count(i | expected_order[i] = actual_order[i]), compliance: matches / |expected_order|,

violations: [ {param: p, position: i, expected: j} | ∀i, p ∈ actual_order where expected_order[j] = p ∧ i ≠ j ],

return { target: target.name, compliance: compliance, violations: violations, details: {expected: expected_order, actual: actual_order} } }

categorize :: (Assessment, Threshold) → Category categorize(A, T) = { category: match A.compliance with | x where x ≥ T → "ALREADY_COMPLIANT", | x where x ≥ T × 0.75 → "MINOR_VIOLATIONS", | x where x ≥ T × 0.50 → "MODERATE_VIOLATIONS", | _ → "MAJOR_VIOLATIONS",

return { target: A.target, compliance: A.compliance, category: category, violations: A.violations } }

categorize_results :: Assessments → Categorized_Results categorize_results(A) = { already_compliant: [a | a ∈ A ∧ a.category = "ALREADY_COMPLIANT"], minor_violations: [a | a ∈ A ∧ a.category = "MINOR_VIOLATIONS"], moderate_violations: [a | a ∈ A ∧ a.category = "MODERATE_VIOLATIONS"], major_violations: [a | a ∈ A ∧ a.category = "MAJOR_VIOLATIONS"],

efficiency_gain: |already_compliant| / |A|,

return { total: |A|, already_compliant: already_compliant, needs_change: minor_violations + moderate_violations + major_violations, efficiency_gain: efficiency_gain } }

prioritize :: Categorized_Results → Priority_Queue prioritize(R) = { scored: [ { target: t.target, priority: if t.category = "ALREADY_COMPLIANT" then 0 else (1 - t.compliance) × impact(t) × ease(t), compliance: t.compliance, category: t.category } | ∀t ∈ R.needs_change ],

sorted: sort_by(scored, priority, desc),

skip: R.already_compliant,

return {prioritized: sorted, skip: skip} }

execute :: (Priority_Queue, Criteria) → Execution_Result execute(P, C) = { results: [],

∀target ∈ P.prioritized → if target.category = "ALREADY_COMPLIANT" then verify_compliant(target) else refactor_target(target), run_tests(target), results += { target: target.name, action: "REFACTOR", changes: count(target.violations), tests: test_status(target), committed: true },

∀target ∈ P.skip → results += { target: target.name, action: "VERIFY", compliance: target.compliance, tests: test_status(target), notes: "Already compliant, no changes" },

return results }

verify_compliant :: Target → Verification verify_compliant(T) = { parameter_order: check_parameter_order(T), tier_comments: check_tier_comments(T), tests: run_tests(T),

return { target: T.name, compliance_confirmed: parameter_order ∧ tier_comments ∧ tests, tier_order_correct: parameter_order, tier_comments_present: tier_comments, tests_passed: tests } }

re_audit :: (Targets, Criteria) → Re_Audit_Summary re_audit(T, C) = { after_results: audit_all_targets(T, C),

compliant: count(r | r.compliance ≥ C.threshold), non_compliant: count(r | r.compliance < C.threshold), average: sum(r.compliance | r ∈ after_results) / |after_results|,

Read the full file on GitHub · 259 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 259 lines · 35 tokens per session scan A cc4989440558

Subscribe to this mod's changes

agent-audit-executor is an agent published in the GitHub repository yaleh/meta-cc (21 stars, last pushed 12d ago), licensed MIT. It adds 35 tokens to every session and 1,903 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.