learn-architecture

learn-architecture is a command for coding agents from Jsnnmsc/claude-code-learning-marketplace. It costs 0 tokens per session (505 once invoked), scanned A, original, MIT.

An interactive assistant for studying a codebase's architecture: how its parts are organised, connected, and designed.

In plain words
What is it for?
Use it to examine the whole system, a layer, module interactions, dependencies, design decisions, or trade-offs, with notes or Mermaid diagrams.
Why use it?
It turns an unfamiliar system into an explanation or tour instead of leaving you to infer its structure from files alone.

Command

Part of the codebase-learning plugin — 5 commands, 4 agents shipped together

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 commands/jsnnmsc/claude-code-learning-marketplace/learn-architecture
Clone the repo
git clone --depth 1 https://github.com/Jsnnmsc/claude-code-learning-marketplace

Or install codebase-learning, the plugin that ships this one along with the rest of its 5 commands, 4 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsnnmsc/claude-code-learning-marketplace/learn-architecture.svg)](https://agentmods.dev/commands/jsnnmsc/claude-code-learning-marketplace/learn-architecture)
Your own site
<a href="https://agentmods.dev/commands/jsnnmsc/claude-code-learning-marketplace/learn-architecture"><img src="https://agentmods.dev/badge/commands/jsnnmsc/claude-code-learning-marketplace/learn-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 505 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.1 $0.00000 $0.00505
Opus 5 $0.00000 $0.00253
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00051

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

Security

Grade A, and why

learn-architecture 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 5d 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.

plugins/codebase-learning/commands/learn-architecture.md · 78 lines

How it starts

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

Learn Architecture - System Architecture Analysis

You are an architecture learning assistant specializing in analyzing and explaining system architecture, design decisions, and structural patterns.

Task Overview

Analyze the codebase architecture and help the user understand:

  • High-level system architecture
  • Layer separation and module organization
  • Component relationships and dependencies
  • Design decisions and trade-offs
  • Architectural patterns in use

Process

  1. Ask for Output Format using AskUserQuestion:

    • Interactive Documentation (detailed markdown with architecture diagrams)
    • Guided Exploration (step-by-step architectural tour)
    • Visual Diagrams (Mermaid architecture diagrams, dependency graphs)
    • Structured Notes (organized architectural insights)
  2. Ask for Scope using AskUserQuestion:

    • Full system architecture
    • Specific layer or module
    • Component interactions
    • Dependency structure
  3. Launch Architecture Analyzer Agent using the Task tool:

    • Pass the user's scope and output format preferences
    • Agent type: codebase-learning:architecture-analyzer
    • Provide clear context about what to analyze

Agent Prompt Template

Use this template when launching the agent:

Analyze the architecture of [SCOPE] in this codebase.

Focus on:
- High-level architectural patterns
- Layer/module organization
- Key components and their responsibilities
- Inter-component dependencies
- Design decisions and rationale

Output format: [USER_PREFERRED_FORMAT]

Provide educational explanations suitable for someone learning this codebase.

After Agent Completion

  1. Save the analysis to a markdown file:

    • Create filename: .codebase-analysis/architecture-[timestamp].md
    • Include the complete analysis from the agent
    • Format the content properly with markdown
    • Use the Write tool to save the file
    • Show the user the file path where it was saved
  2. Present the results:

    • Read and display the saved markdown file to the user
    • Inform them they can open the file in their editor for better viewing

Read the full file on GitHub · 78 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. 5d ago First seen · 78 lines · 0 tokens per session scan A 68ac275ad9c3

Subscribe to this mod's changes

learn-architecture is a command published in the GitHub repository Jsnnmsc/claude-code-learning-marketplace (3 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 505 tokens. 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-31.