Agent skill

Agent Architecture Audit

by affaan-m in affaan-m/ECC

エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。

MITAuto-check passed

Install Agent Architecture Audit

skills CLI
$ npx skills add affaan-m/ECC --skill agent-architecture-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC agent-architecture-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ja-JP/skills/agent-architecture-audit .claude/skills/agent-architecture-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-architecture-audit
GitHub stars
276k
Token cost
~1.6k tokens
SKILL.md length
295 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。

  • Works in 5 steps: ラッパーリグレッション → メモリ汚染 → ツール規律の失敗 → …
  • SKILL.md covers 起動タイミング, 12 層スタック, 一般的な障害パターン and 監査ワークフロー, plus 6 more sections
  • Calls rg

What it does

Agent Architecture Audit is an agent skill from affaan-m/ECC. エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

Example prompts

  • “/agent-architecture-audit”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. ラッパーリグレッション
  2. メモリ汚染
  3. ツール規律の失敗
  4. レンダリング・トランスポート破損
  5. 隠れたエージェント層

What it can do on your machine

Read from SKILL.md and the folder at commit 4eb71d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Architecture Audit loads about 1.6k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 295 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 4eb71d9, republished under its MIT licence (© affaan-m). 295 words, ~1,598 tokens.

Download SKILL.mdSave it as .claude/skills/agent-architecture-audit/SKILL.md (or your agent's skills folder).
name
agent-architecture-audit
description
エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。
origin
oh-my-agent-check
tools
Read, Write, Edit, Bash, Grep, Glob

エージェントアーキテクチャ監査

ラッパー層、古いメモリ、リトライループ、トランスポート・レンダリングの変異の背後に失敗を隠すエージェントシステムのための診断ワークフロー。

起動タイミング

必須の場合:

  • エージェントまたは LLM を活用したアプリケーションを本番リリースする前
  • ツール呼び出し、メモリ、または多段階ワークフローを含む機能をリリースする前
  • ラッパー層を追加した後にエージェントの動作が低下する場合
  • ユーザーが「エージェントが悪化している」または「ツールが不安定」と報告する場合
  • 同じモデルがプレイグラウンドでは動作するがラッパー内で壊れる場合
  • 根本原因を見つけることなく 15 分以上エージェントの動作をデバッグしている場合

特に重要な場合:

  • 新しいプロンプト層、ツール定義、またはメモリシステムを追加した場合
  • システム内の異なるエージェントが一貫性なく動作する場合
  • 昨日は正常だったモデルが今日ハルシネーションを起こしている場合
  • 応答をサイレントに変異させる隠れた修復・リトライループが疑われる場合

使用しない場合:

  • 一般的なコードデバッグ — agent-introspection-debugging を使用
  • コードレビュー — 言語固有のレビューエージェントを使用
  • セキュリティスキャン — security-review または security-review/scan を使用
  • エージェントパフォーマンスのベンチマーク — agent-eval を使用
  • 新機能の作成 — 適切なワークフロースキルを使用

12 層スタック

すべてのエージェントシステムはこれらの層を持ちます。いずれも回答を破壊する可能性があります:

#層問題の内容
1システムプロンプト矛盾する指示、指示の肥大化
2セッション履歴前のターンからの古いコンテキスト注入
3長期メモリセッション間の汚染、新しい会話に古いトピックが混入
4蒸留圧縮されたアーティファクトが疑似事実として再投入
5アクティブリコールコンテキストを無駄にする冗長な再要約層
6ツール選択誤ったツールルーティング、モデルが必要なツールをスキップ
7ツール実行ハルシネーションによる実行 — 呼び出したと主張するが実際には呼び出していない
8ツール解釈ツール出力の誤読または無視
9回答整形最終応答でのフォーマット破損
10プラットフォームレンダリングトランスポート層の変異(UI、API、CLI が有効な回答を変異させる)
11隠れた修復ループサイレントなフォールバック・リトライエージェントが 2 回目の LLM パスを実行
12永続化期限切れの状態またはキャッシュされたアーティファクトがライブエビデンスとして再利用

一般的な障害パターン

1. ラッパーリグレッション

ベースモデルは正しい回答を生成するが、ラッパー層がそれを悪化させる。

症状:

  • プレイグラウンドや直接 API 呼び出しでは正常に動作するが、エージェント内で壊れる
  • 新しいプロンプト層を追加したら既存の動作が低下した
  • エージェントは自信を持っているが、自信を持って間違っている
  • 「最後のアップデート前は動作していた」
2. メモリ汚染

履歴、メモリ検索、または蒸留を通じて古いトピックが新しい会話に漏れる。

症状:

  • エージェントが無関係な過去のトピックを持ち出す
  • ユーザーの修正が定着しない(古いメモリが新しいものを上書きする)
  • 同一セッション内のアーティファクトが疑似事実として再投入される
  • メモリが際限なく増加し、時間とともに応答品質が低下する
3. ツール規律の失敗

ツールはプロンプトで宣言されているがコードでは強制されていない。モデルがそれをスキップするか実行をハルシネーションする。

症状:

  • プロンプトに「ツール X を必ず使用する」とあるが、モデルはそれを呼び出さずに回答する
  • ツール結果は正しく見えるが実際には実行されていない
  • 異なるツールが同じ責任をめぐって競合する
  • モデルが使うべきでない時にツールを使う、または使うべき時にスキップする
4. レンダリング・トランスポート破損

エージェントの内部回答は正しいが、プラットフォーム層が配信中にそれを変異させる。

症状:

  • ログは正しい回答を示すが、ユーザーには壊れた出力が表示される
  • Markdown レンダリング、JSON パース、またはストリーミングフラグメントが有効な応答を破損する
  • 隠れたフォールバックエージェントが配信前に回答をサイレントに置き換える
  • 出力がターミナルと UI で異なる
5. 隠れたエージェント層

明示的なコントラクトなしにサイレントな修復、リトライ、要約、またはリコールエージェントが実行される。

症状:

  • 内部生成とユーザー配信の間で出力が変化する
  • 「自動修正」ループがユーザーの知らない 2 回目の LLM パスを実行する
  • 複数のエージェントが調整なしに同じ出力を修正する
  • 回答が不可視の層によって「滑らか」または「修正」される

監査ワークフロー

フェーズ 1: スコープ

監査対象を定義する:

  • 対象システム — どのエージェントアプリケーションか?
  • エントリポイント — ユーザーはどのように操作するか?
  • モデルスタック — どの LLM とプロバイダーか?
  • 症状 — ユーザーは何を報告しているか?
  • 時間ウィンドウ — いつ始まったか?
  • 監査する層 — 12 層のうちどれが該当するか?
フェーズ 2: エビデンス収集

コードベースからエビデンスを収集する:

  • ソースコード — エージェントループ、ツールルーター、メモリ受付、プロンプトアセンブリ
  • ログ — 過去のセッショントレース、ツール呼び出し記録
  • 設定 — プロンプトテンプレート、ツールスキーマ、プロバイダー設定
  • メモリファイル — SOP、ナレッジベース、セッションアーカイブ

rg を使用してアンチパターンを検索する:

bash
# プロンプトテキストのみで表現されたツール要件(コードでなく)
rg "must.*tool|必须.*工具|required.*call" --type md

# バリデーションなしのツール実行
rg "tool_call|toolCall|tool_use" --type py --type ts

# メインエージェントループ外の隠れた LLM 呼び出し
rg "completion|chat\.create|messages\.create|llm\.invoke"

# ユーザー修正優先度なしのメモリ受付
rg "memory.*admit|long.*term.*update|persist.*memory" --type py --type ts

# 追加の LLM 呼び出しを実行するフォールバックループ
rg "fallback|retry.*llm|repair.*prompt|re-?prompt" --type py --type ts

# サイレントな出力変異
rg "mutate|rewrite.*response|transform.*output|shap" --type py --type ts
フェーズ 3: 障害マッピング

各発見事項について文書化する:

  • 症状 — ユーザーが見るもの
  • メカニズム — ラッパーがそれを引き起こす方法
  • ソース層 — 12 層のうちどれか
  • 根本原因 — 最も深い原因
  • エビデンス — ファイル:行 またはログ:行の参照
  • 信頼度 — 0.0 から 1.0
フェーズ 4: 修正戦略

デフォルトの修正順序(コードファースト、プロンプトファーストではない):

  1. ツール要件のコードゲート化 — プロンプトテキストだけでなくコードで強制する
  2. 隠れた修復エージェントの削除または縮小 — フォールバックをコントラクトで明示的にする
  3. コンテキストの重複を削減 — プロンプト・履歴・メモリ・蒸留を通じた同一情報
  4. メモリ受付の厳格化 — ユーザーの修正 > エージェントのアサーション
  5. 蒸留トリガーの厳格化 — 圧縮すべきでないものは圧縮しない
  6. レンダリング変異の削減 — パススルー、変換しない
  7. 型付き JSON エンベロープへの変換 — 構造化された内部フロー、自由形式の散文ではない

重要度モデル

レベル意味アクション
criticalエージェントが自信を持って誤った操作動作を生成できる次のリリース前に修正
highエージェントが頻繁に正確性や安定性を低下させるこのスプリントで修正
medium正確性は通常維持されるが出力が脆弱または無駄次のサイクルで計画
low主に見た目または保守性の問題バックログ

出力フォーマット

発見事項をユーザーにこの順序で提示する:

  1. 重要度順の発見事項(最も重要なものから)
  2. アーキテクチャ診断(どの層が何を破損させ、なぜか)
  3. 優先度付き修正計画(コードファースト、プロンプトファーストではない)

お世辞や要約から始めないこと。システムが壊れている場合は直接そう述べる。

クイック診断質問

エージェントシステムを監査する際、以下に答える:

#質問Yes の場合 →
1モデルが必要なツールをスキップして回答できるか?ツールがコードゲートされていない
2古い会話コンテンツが新しいターンに現れるか?メモリ汚染
3同じ情報がシステムプロンプトとメモリと履歴にあるか?コンテキストの重複
4プラットフォームが配信前に 2 回目の LLM パスを実行するか?隠れた修復ループ
5内部生成とユーザー配信で出力が異なるか?レンダリング破損
6「ツール X を必ず使用する」ルールがプロンプトテキストのみか?ツール規律の失敗
7エージェント自身のモノローグが永続メモリになり得るか?メモリポイズニング

避けるべきアンチパターン

  • ラッパー層のリグレッションを否定する前にモデルを責めることを避ける。
  • 汚染パスを示さずにメモリを責めることを避ける。
  • 現在のクリーンな状態が汚れた過去の出来事を消すことを許可しない。
  • Markdown の散文を信頼できる内部プロトコルとして扱わない。
  • コードがそれを強制しないのにプロンプトテキストの「ツールを必ず使用する」を受け入れない。
  • 発見事項を直接的に、エビデンスに基づいて、重要度順に維持する。

レポートスキーマ

監査はこの形状に従った構造化されたレポートを生成すべきです:

json
{
  "schema_version": "ecc.agent-architecture-audit.report.v1",
  "executive_verdict": {
    "overall_health": "high_risk",
    "primary_failure_mode": "string",
    "most_urgent_fix": "string"
  },
  "scope": {
    "target_name": "string",
    "model_stack": ["string"],
    "layers_to_audit": ["string"]
  },
  "findings": [
    {
      "severity": "critical|high|medium|low",
      "title": "string",
      "mechanism": "string",
      "source_layer": "string",
      "root_cause": "string",
      "evidence_refs": ["file:line"],
      "confidence": 0.0,
      "recommended_fix": "string"
    }
  ],
  "ordered_fix_plan": [
    { "order": 1, "goal": "string", "why_now": "string", "expected_effect": "string" }
  ]
}

関連スキル

  • agent-introspection-debugging — エージェントランタイムの失敗(ループ、タイムアウト、状態エラー)のデバッグ
  • agent-eval — エージェントパフォーマンスの対決ベンチマーク
  • security-review — コードと設定のセキュリティ監査
  • autonomous-agent-harness — 自律エージェント操作のセットアップ
  • agent-harness-construction — エージェントハーネスをゼロから構築

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/ja-JP/skills/agent-architecture-audit of affaan-m/ECC.

Open the folder on GitHubat commit 4eb71d9

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Agent Architecture Audit

What does Agent Architecture Audit do?

エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。. Agent Architecture Audit is an agent skill from affaan-m/ECC.

How do I install Agent Architecture Audit in Claude Code?

Run `npx skills add affaan-m/ECC --skill agent-architecture-audit -a claude-code`. Or copy the skill folder (docs/ja-JP/skills/agent-architecture-audit in affaan-m/ECC) into .claude/skills/agent-architecture-audit in your project. Claude Code loads it when a task matches its description.

How do I install Agent Architecture Audit in Codex?

Run `npx skills add affaan-m/ECC --skill agent-architecture-audit -a codex`. Or copy the skill folder (docs/ja-JP/skills/agent-architecture-audit in affaan-m/ECC) into .agents/skills/agent-architecture-audit in your project. Codex loads it when a task matches its description.

Can I use Agent Architecture Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill agent-architecture-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-architecture-audit, .gemini/skills/agent-architecture-audit, .github/skills/agent-architecture-audit and .opencode/skills/agent-architecture-audit in your project.

What does Agent Architecture Audit need to run?

Going by SKILL.md and its folder, Agent Architecture Audit needs the command-line tools its instructions call (rg).

Does Agent Architecture Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Architecture Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Architecture Audit use?

Agent Architecture Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Architecture Audit use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

Who maintains Agent Architecture Audit?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,111 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 10, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.