agent-architecture-audit

agent-architecture-audit is a skill for Claude Code, Codex from mturac/everything-openai-codex. It costs 141 tokens per session (3,890 once invoked), scanned A, original, MIT.

A diagnostic workflow for applications that use AI agents or large language models. It checks layers such as prompts, conversation history, memory, tool use, retries, and final response formatting.

In plain words
What is it for?
Use it before releasing an agent feature or when an agent becomes unreliable, hallucinates, skips tools, misreads tool results, or behaves differently across environments.
Why use it?
It helps locate failures that may be hidden by wrappers, stale memory, incorrect tool routing, or retry loops.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before releasing an agent feature or when an agent becomes unreliable, hallucinates, skips tools, misreads tool results, or behaves differently across environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mturac/everything-openai-codex/agent-architecture-audit
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.

Any agent
npx skills add mturac/everything-openai-codex --skill agent-architecture-audit
Clone the repo
git clone --depth 1 https://github.com/mturac/everything-openai-codex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-architecture-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-architecture-audit.svg)](https://agentmods.dev/skills/mturac/everything-openai-codex/agent-architecture-audit)
Your own site
<a href="https://agentmods.dev/skills/mturac/everything-openai-codex/agent-architecture-audit"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-architecture-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00141 $0.03890
Opus 5 $0.00071 $0.01945
Sonnet 5 $0.00028 $0.00778
Haiku 4.5 $0.00014 $0.00389

Measured 4d ago against content hash 74181dba11b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

agent-architecture-audit 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 4d 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.

docs/ja-JP/skills/agent-architecture-audit/SKILL.md · 257 lines

How it starts

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

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

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

起動タイミング

必須の場合:

  • エージェントまたは 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. レンダリング・トランスポート破損

Read the full file on GitHub · 257 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. 4d ago First seen · 257 lines · 141 tokens per session scan A 74181dba11b5

Subscribe to this mod's changes

agent-architecture-audit is a skill published in the GitHub repository mturac/everything-openai-codex (89 stars, last pushed 14d ago), licensed MIT. It adds 141 tokens to every session and 3,890 once invoked, about $0.0007 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-09-03.