arch-from-code

arch-from-code is a skill for Claude Code, Codex from Adit-Jain-srm/skill-forge. It costs 78 tokens per session (1,629 once invoked), scanned A, original, MIT.

A code-analysis skill that creates architecture diagrams, dependency maps, and system documentation from the current source code. Architecture describes the main parts of a system and how they connect; dependencies are the relationships between those parts.

In plain words
What is it for?
Use it to map services, data flows, boundaries, and dependencies, or to create Mermaid, PlantUML, and C4 diagrams. It can also support onboarding, architecture reviews, and Architecture Decision Records, which document important technical choices.
Why use it?
It helps document an unfamiliar or changing codebase from its actual files instead of relying on outdated diagrams or guesses.

Skill for Claude CodeCodex

Part of the skill-forge plugin — 19 skills 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 skills/adit-jain-srm/skill-forge/arch-from-code
Any agent
npx skills add Adit-Jain-srm/skill-forge --skill arch-from-code
Clone the repo
git clone --depth 1 https://github.com/Adit-Jain-srm/skill-forge

Made for: Claude Code, Codex.

Or install skill-forge, the plugin that ships this one along with the rest of its 19 skills.

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 arch-from-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/adit-jain-srm/skill-forge/arch-from-code.svg)](https://agentmods.dev/skills/adit-jain-srm/skill-forge/arch-from-code)
Your own site
<a href="https://agentmods.dev/skills/adit-jain-srm/skill-forge/arch-from-code"><img src="https://agentmods.dev/badge/skills/adit-jain-srm/skill-forge/arch-from-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,629 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.00078 $0.01629
Opus 5 $0.00039 $0.00814
Sonnet 5 $0.00016 $0.00326
Haiku 4.5 $0.00008 $0.00163

Measured 3d ago against content hash 63ea9d58ce78, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

arch-from-code 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 3d 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.

skills/arch-from-code/SKILL.md · 229 lines

How it starts

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

Architecture from Code

Overview

Read the actual codebase. Generate accurate architecture diagrams. No guessing, no outdated docs — diagrams that reflect what the code ACTUALLY does right now.

When to Use

  • "Document this project's architecture"
  • "Show me the dependency graph"
  • "Generate a C4 diagram of this system"
  • "What services talk to each other?"
  • "Map out the data flow"
  • Onboarding onto an unfamiliar codebase
  • Architecture review before major refactoring
  • Generating ADRs (Architecture Decision Records)

Quick Start

# Step 1: Identify the codebase structure
find . -name "*.ts" -o -name "*.py" -o -name "*.go" | head -50
# Or: list top-level directories
ls -la src/ app/ lib/ services/ packages/

# Step 2: Run this skill's analysis process (below)
# Step 3: Output Mermaid diagram

Process

Step 1: Discover Project Shape

# Package manager = tech stack signal
ls package.json pyproject.toml go.mod Cargo.toml pom.xml *.csproj 2>/dev/null

# Entry points
ls src/index.* src/main.* app/main.* cmd/main.* 2>/dev/null

# Service boundaries (microservices)
ls -d services/* apps/* packages/* 2>/dev/null

# Configuration reveals integrations
cat .env.example docker-compose.yml 2>/dev/null | grep -i "host\|url\|port\|database\|redis\|queue"

Step 2: Trace Dependencies

For TypeScript/JavaScript:

# External dependencies = integration points
cat package.json | jq '.dependencies' 
# Internal imports = module relationships
grep -r "from ['\"]\.\./" src/ --include="*.ts" | sed 's/.*from ['\''\"]\(.*\)['\''\"]/\1/' | sort | uniq -c | sort -rn

For Python:

cat requirements.txt pyproject.toml | grep -v "^#"
grep -r "^from\|^import" src/ --include="*.py" | grep -v __pycache__ | sort | uniq -c | sort -rn

For Go:

cat go.mod | grep -v "^//"
grep -r "import" . --include="*.go" | grep -v vendor | sort | uniq -c | sort -rn

Step 3: Identify Layers & Boundaries

Read top-level directories and classify:

Read the full file on GitHub · 229 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. 3d ago First seen · 229 lines · 78 tokens per session scan A 63ea9d58ce78

Subscribe to this mod's changes

arch-from-code is a skill published in the GitHub repository Adit-Jain-srm/skill-forge (2 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 1,629 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

user-research-cookiy

End-to-end user research assistant — qualitative and quantitative. Use this skill whenever the user mentions user research, user interviews, discussion guides, interview guides, research plans, qualitative research, quantitative research, user surveys, survey design, usability studies, participant recruitment…

cookiy-ai/user-research-skill · 154 tokens

crossframe-essay

CrossFrame Essay explicit-only Chinese critical insight writing skill. Use only when the user explicitly names crossframe-essay, $crossframe-essay, /crossframe-essay, or asks to use CrossFrame Essay; do not trigger implicitly for ordinary writing, commentary, article, editing, or long-answer tasks. Suite-directed use…

xi-kari/crossframe-skill · 80 tokens

crossframe-promax

Use when the user explicitly names crossframe-promax, CrossFrame ProMax, $crossframe-promax, or /crossframe-promax; never infer activation from generic requests for depth, completeness, maximum effort, or long output.

xi-kari/crossframe-skill · 52 tokens

crossframe-suite

CrossFrame Suite explicit-only router. Use only when the user explicitly names crossframe-suite, $crossframe-suite, /crossframe-suite, or asks to use the CrossFrame suite; do not trigger implicitly for ordinary analysis, writing, public, organization, debate, teaching, reading, or review tasks. After explicit…

xi-kari/crossframe-skill · 81 tokens

crossframe-inquiry

经由 crossframe-suite 完成态接管或用户显式命令使用,不隐式响应。把 CrossFrame 诊断、文章、review、claim ledger 和机制候选转化为结构追问,帮助用户继续深思、反证、补证、迁移应用或收束。.

xi-kari/crossframe-skill · 70 tokens

crossframe-max

Use when the user explicitly invokes crossframe-max, /crossframe-max, $crossframe-max, maximum CrossFrame mode, exhaustive structural projection, full-scale world-model interpretation, no word-limit complete explanation, or v6 meta-runtime design review for skills, prompts, agents, tools, templates, scripts, and…

xi-kari/crossframe-skill · 72 tokens