analyze-architecture

analyze-architecture is a skill for Claude Code from theadityamittal/claude-professor. It costs 40 tokens per session (2,977 once invoked), scanned C, original, MIT.

A codebase analysis workflow that scans a project and builds a set of linked Markdown files describing its architecture.

In plain words
What is it for?
Scanning important project files, producing an architecture graph, updating an existing analysis, and documenting differences between a branch and the stored architecture.
Why use it?
It gives developers a map of how the project is organised and can show what changed when the architecture is refreshed or compared with another branch.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: model in frontmatter; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-professor plugin — 3 skills, 1 agent shipped together

Good fit Scanning important project files, producing an architecture graph, updating an existing analysis, and documenting differences between a branch and the stored architecture.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add theadityamittal/claude-professor
Claude Code
/plugin install claude-professor

Made for: Claude Code.

Or install claude-professor, the plugin that ships this one along with the rest of its 3 skills, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/theadityamittal/claude-professor/analyze-architecture/github.svg)](https://agentmods.dev/skills/theadityamittal/claude-professor/analyze-architecture)
Your own site
<a href="https://agentmods.dev/skills/theadityamittal/claude-professor/analyze-architecture"><img src="https://agentmods.dev/badge/skills/theadityamittal/claude-professor/analyze-architecture/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 analyze-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/theadityamittal/claude-professor/analyze-architecture"><img src="https://agentmods.dev/badge/skills/theadityamittal/claude-professor/analyze-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,977 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00040 $0.02977
Opus 5 $0.00020 $0.01489
Sonnet 5 $0.00008 $0.00595
Haiku 4.5 $0.00004 $0.00298

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

Security

Grade C, and why

analyze-architecture scanned grade C with 1 finding 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 12d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf docs/professor/architecture/.build
skills/analyze-architecture/SKILL.md · 245 lines

How it starts

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

You are an architecture analyst orchestrating a 4-stage pipeline. Each stage runs as a subagent and writes its output to disk. You read only compact status JSON from each stage — never raw codebase data.

Input

Read $ARGUMENTS for flags:

  • No flags: full analysis from scratch
  • --update: refresh existing architecture (re-scan, update changed, preserve unchanged)
  • --branch {name}: generate a delta file comparing the specified branch against the stored base architecture
  • --budget {N}: max files in scan manifest (default: 100). Increase for large codebases (e.g., --budget 300). Files are prioritized: manifests > configs > source > tests > docs.

Setup

Create the build directory:

mkdir -p docs/professor/architecture/.build

Stage 1: Scan

Dispatch an Explore subagent with this exact prompt:

You are a codebase scanner. Your job is to produce a scan manifest and write it to disk. Do not explain your work — just execute.

Step 1: Run the scan script (use the --budget value from arguments, or 100 if not specified):

node ${CLAUDE_PLUGIN_ROOT}/scripts/graph.js scan --dir . --budget {budget}

The script returns JSON wrapped in {status, data, error} envelope format. Parse the data field for results.

Step 2: The script returns a JSON manifest with files[]. Each file has path, language, type, and size. For each file with type of source, manifest, or config: read the file and add:

  • description: max 12 words describing its purpose
  • exports: array of function/class/constant names exported by the file (empty array for non-source files)

For files you cannot or do not read: leave description and exports absent.

Step 3: Write the enriched manifest to docs/professor/architecture/.build/scan-manifest.json. Use the exact JSON structure the script returned, with your description and exports additions merged per file.

Step 4: Output ONLY this JSON (no prose, no markdown): {"wrote": "scan-manifest.json", "files_found": <total_files from script output>}

Read the full file on GitHub · 245 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. 12d ago First seen · 245 lines · 40 tokens per session scan C d45d5d275883

Subscribe to this mod's changes

analyze-architecture is a skill published in the GitHub repository theadityamittal/claude-professor (11 stars, last pushed 4mo ago), licensed MIT. It adds 40 tokens to every session and 2,977 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.