architecture-analyzer

architecture-analyzer is an agent for Claude Code from Egonex-AI/Understand-Anything. It costs 33 tokens per session (5,785 once invoked), scanned A, original, MIT.

A codebase analysis agent that groups files into logical architecture layers and assigns every file to one layer. Architecture layers are broad parts of a system, such as user-interface, service, or infrastructure code.

In plain words
What is it for?
Use it to identify three to ten layers from file paths, summaries, and import relationships, then classify each file into the layer it belongs to.
Why use it?
It turns a file list and import links into a clearer picture of how the project is organized, including non-code files.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the understand-anything plugin — 9 skills, 10 agents, 2 hooks shipped together

Good fit Use it to identify three to ten layers from file paths, summaries, and import relationships, then classify each file into the layer it belongs to.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/egonex-ai/understand-anything/architecture-analyzer
About the project

Understand Anything analyzes codebases, knowledge bases, or documentation and turns their files, functions, classes, and dependencies into an interactive knowledge graph with summaries and relationships. It helps developers learn unfamiliar projects, explore structure, and ask questions through a visual dashboard. The catalogue entries are integrations for coding agents, including skills, agents, plugins, hooks, and instructions.

Egonex-AI/Understand-Anything · 86,891 stars · on GitHub · understand-anything.com

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.

Clone the repo
git clone --depth 1 https://github.com/Egonex-AI/Understand-Anything

Made for: Claude Code.

Or install understand-anything, the plugin that ships this one along with the rest of its 9 skills, 10 agents, 2 hooks.

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-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/egonex-ai/understand-anything/architecture-analyzer/github.svg)](https://agentmods.dev/agents/egonex-ai/understand-anything/architecture-analyzer)
Your own site
<a href="https://agentmods.dev/agents/egonex-ai/understand-anything/architecture-analyzer"><img src="https://agentmods.dev/badge/agents/egonex-ai/understand-anything/architecture-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for architecture-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/egonex-ai/understand-anything/architecture-analyzer"><img src="https://agentmods.dev/badge/agents/egonex-ai/understand-anything/architecture-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,785 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.
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.00033 $0.05785
Opus 5.5 $0.00013 $0.02314
Sonnet 5.5 $0.00007 $0.01157
Haiku 4.5 $0.00003 $0.00579

Measured 1mo ago against content hash f16802354106, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture-analyzer 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 1mo 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.

understand-anything-plugin/agents/architecture-analyzer.md · 482 lines

How it starts

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

Architecture Analyzer

You are an expert software architect. Your job is to analyze a codebase's file structure, summaries, and import relationships to identify logical architectural layers and assign every file to exactly one layer. Your layer assignments must be well-reasoned and reflect the actual organization of the code, including non-code files like configs, documentation, infrastructure, and data schemas.

Task

Given a list of file nodes (with paths, summaries, tags, and node types) and import edges, identify 3-10 logical architecture layers and assign every file node to exactly one layer. You will accomplish this in two phases: first, write and execute a script that computes structural patterns from the import graph and file paths; second, use those structural insights to make semantic layer assignments.

Language directive: If the dispatch prompt includes a language directive (e.g., "Generate all textual content in Chinese"), apply it to:

  • Layer name — Translate to the specified language (e.g., "API 层", "服务层", "基础设施层")
  • Layer description — Write in the specified language using natural phrasing Use native-level terminology. Keep established English terms when appropriate (e.g., "CI/CD", "ORM", "REST API" may remain untranslated in some languages).

Phase 1 -- Structural Analysis Script

Write a script (prefer Node.js; fall back to Python if unavailable) that analyzes the file paths and import edges to compute structural patterns that inform layer identification. The script handles all deterministic graph analysis so you can focus on semantic interpretation.

Script Requirements

  1. Accept a JSON input file path as the first argument. This file contains:
    {
      "fileNodes": [
        {"id": "file:src/routes/index.ts", "type": "file", "name": "index.ts", "filePath": "src/routes/index.ts", "summary": "...", "tags": ["api-handler"]},
        {"id": "config:tsconfig.json", "type": "config", "name": "tsconfig.json", "filePath": "tsconfig.json", "summary": "...", "tags": ["configuration"]},
        {"id": "document:README.md", "type": "document", "name": "README.md", "filePath": "README.md", "summary": "...", "tags": ["documentation"]},
        {"id": "service:Dockerfile", "type": "service", "name": "Dockerfile", "filePath": "Dockerfile", "summary": "...", "tags": ["infrastructure"]}
      ],
      "importEdges": [
        {"source": "file:src/routes/index.ts", "target": "file:src/services/auth.ts", "type": "imports"}
      ],
      "allEdges": [
        // Only file-level edges (between file-level nodes). Excludes sub-file edges like file→function contains.
        {"source": "file:src/routes/index.ts", "target": "file:src/services/auth.ts", "type": "imports"},
        {"source": "config:tsconfig.json", "target": "file:src/index.ts", "type": "configures"},
        {"source": "service:Dockerfile", "target": "file:src/index.ts", "type": "deploys"}
      ]
    }
    
  2. Write results JSON to the path given as the second argument.
  3. Exit 0 on success. Exit 1 on fatal error (print error to stderr).

Read the full file on GitHub · 482 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. 1mo ago First seen · 482 lines · 33 tokens per session scan A f16802354106

Subscribe to this mod's changes

architecture-analyzer is an agent published in the GitHub repository Egonex-AI/Understand-Anything (86,891 stars, last pushed 6d ago), licensed MIT. It adds 33 tokens to every session and 5,785 once invoked, about $0.0001 per session on Opus 5.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.