architecture-audit

architecture-audit is a skill for Claude Code, Codex from Tracer-Cloud/opensre. It costs 26 tokens per session (1,715 once invoked), scanned A, original, Apache-2.0.

A repository-review skill that scans a codebase for architecture and layering problems, large files, compatibility shims, and other structural warning signs, then fills in an audit report.

In plain words
What is it for?
Use it for architecture reviews, structural summaries, finding layering violations or oversized files, and planning technical-debt work.
Why use it?
It gives a structured view of how a codebase is organized, where its main trouble spots are, and which refactors should come first.

Skill for Claude CodeCodex

About the project

OpenSRE is an open-source framework for building AI agents that investigate and resolve production incidents using operational data and tools. It is for site reliability engineers who want customizable incident-response workflows, training, and evaluation on their own infrastructure.

Tracer-Cloud/opensre · 11,003 stars · on GitHub

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 skills/tracer-cloud/opensre/architecture_audit
Any agent
npx skills add Tracer-Cloud/opensre --skill architecture_audit
Clone the repo
git clone --depth 1 https://github.com/Tracer-Cloud/opensre

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 architecture-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/tracer-cloud/opensre/architecture_audit.svg)](https://agentmods.dev/skills/tracer-cloud/opensre/architecture_audit)
Your own site
<a href="https://agentmods.dev/skills/tracer-cloud/opensre/architecture_audit"><img src="https://agentmods.dev/badge/skills/tracer-cloud/opensre/architecture_audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,715 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.00026 $0.01715
Opus 5 $0.00013 $0.00857
Sonnet 5 $0.00005 $0.00343
Haiku 4.5 $0.00003 $0.00171

Measured yesterday against content hash 89aa6133b2d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.

core/agent_harness/prompts/skills/architecture_audit/SKILL.md · 130 lines

How it starts

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

══════════════════════════════════════════════════════════ ARCHITECTURE AUDIT SKILL — interactive-shell action agent: ══════════════════════════════════════════════════════════

WHEN TO USE (call this skill when the user ask matches any of these):

  • Architecture audit / architecture review / architecture violations
  • Structural summary of a codebase (what it does, hotspots, debt themes, recommended refactor sequencing) — not a one-line README paraphrase
  • Phrases like: "audit Tracer-Cloud/opensre", "find architecture issues", "summarize this repo's architecture", "what's wrong with the layering", "find huge files / shims", "architecture report for owner/repo"

Do NOT use this skill for: live incident RCA, metric/log queries, deploying, or ordinary chat that only needs a short verbal overview with no scan.

HARD RULES (violating any = failed turn):

  • Never end the turn with shell_run as the last tool — final reply is the filled REPORT TEMPLATE (exact headings; - none for empty lists).
  • Every shell_run in this skill MUST pass quiet=true (hide $ / stdout in the terminal; results still return to you).
  • Order: AGENT SCAN before heuristics (≤3 shell_run; use discovered roots, do not assume source/include) → 4 separate heuristic shell_run passes → cleanup → architecture_save_observations (passes 3–6 only; path ~/.opensre/{session_id}/{repo_name}-architecture-audit-{uuid}.md) → no-tool report.
  • Cap heuristic stdout (about 15–25 lines); You write each bash command; leave no clone on disk. Budget: clone + ≤3 agent-scan shell_run + 4 heuristic shell passes + cleanup
    • save observations + final report.

STEP LABELING RULES (UX) — this skill hides its shell output (quiet=true), so the pinned plan overlay is the user's progress signal (Droid-style):

  • Call update_plan once at the start of the run with the 9 compact- sequence steps below (pending). Mark the first step in_progress.
  • Before starting each next step's tool calls, call update_plan again: mark the finished step completed, the next one in_progress. Never leave the plan idle with every step still pending.
  • Do not dump ### [n/9] headers into the transcript — the overlay already shows Plan · n/m. One short status sentence per step is enough.
  • After the final report is ready, call update_plan with every step completed (or leave the last step completed from the prior update).

Compact sequence:

  1. architecture_clone_repo(owner, repo, ref?) → workspace_root = /opensre/workspace (If already in the target checkout and no owner/repo named, skip clone and use cwd as workspace_root; then skip cleanup.)

  2. AGENT SCAN — orient on the repo before heuristics (max 3 shell_run, each with quiet=true) Purpose: learn enough layout/docs context that later passes hit the right trees — not to invent a parallel findings dump. From workspace_root (repo root), discover top-level packages and where source vs public headers vs API/schema trees live. Prefer CONTEXT.md and ADRs in areas you touch; if missing, fall back to AGENTS.md, ARCHITECTURE.md, DECISIONS.md, docs/adr/, CONTRIBUTING.md layout notes, or nearest equivalents. Note "none found" when absent. Explore organically (≤3 shell_run total) and note early friction that should steer later probes:

    • Where does understanding one concept require bouncing between many small modules?
    • Where are modules shallow — interface nearly as complex as the implementation?
    • Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
    • Where do tightly-coupled modules leak across their seams?
    • Which parts are untested, or hard to test through their current interface? Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want. Carry the discovered roots/contracts into steps 3–6.

Read the full file on GitHub · 130 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday Changed · -3 lines 89aa6133b2d5
  2. 5d ago First seen · 133 lines · 26 tokens per session scan A f9656fee25b4

Subscribe to this mod's changes

architecture-audit is a skill published in the GitHub repository Tracer-Cloud/opensre (11,003 stars, last pushed today), licensed Apache-2.0. It adds 26 tokens to every session and 1,715 once invoked, about $0.0001 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.