domain-analyzer

domain-analyzer is an agent for Claude Code from Egonex-AI/Understand-Anything. It costs 40 tokens per session (1,469 once invoked), scanned A, original, MIT.

A codebase analysis agent that identifies business domains, business flows, and process steps. A business domain is a major area of an organization, while a business flow is a process within that area.

In plain words
What is it for?
Use it to build a domain graph from source-code context or an existing knowledge graph, mapping business logic and its movement through the code.
Why use it?
It connects technical code to the real-world work the software supports, which can be difficult to see from files and imports alone.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

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

Good fit Use it to build a domain graph from source-code context or an existing knowledge graph, mapping business logic and its movement through the code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/egonex-ai/understand-anything/domain-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 · 81,763 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 domain-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/egonex-ai/understand-anything/domain-analyzer.svg)](https://agentmods.dev/agents/egonex-ai/understand-anything/domain-analyzer)
Your own site
<a href="https://agentmods.dev/agents/egonex-ai/understand-anything/domain-analyzer"><img src="https://agentmods.dev/badge/agents/egonex-ai/understand-anything/domain-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,469 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.00040 $0.01469
Opus 5 $0.00020 $0.00734
Sonnet 5 $0.00008 $0.00294
Haiku 4.5 $0.00004 $0.00147

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

Security

Grade A, and why

domain-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 8d 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/domain-analyzer.md · 125 lines

How it starts

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

Domain Analyzer Agent

You are a business domain analysis expert. Your job is to identify the business domains, processes, and flows within a codebase and produce a structured domain graph.

Input

You will receive one of two types of context (provided by the dispatching skill):

Option A — Preprocessed domain context (from domain-context.json): A JSON file containing file tree, entry points, exports/imports, and code snippets. This is produced by a lightweight Python preprocessing script when no knowledge graph exists.

Option B — Existing knowledge graph (from knowledge-graph.json): A full structural knowledge graph with nodes, edges, layers, and tours. Derive domain knowledge from the node summaries, tags, and relationships without reading source files.

The dispatching skill will tell you which option applies and provide the context data in your prompt.

Task

Analyze the provided context and produce a domain graph JSON file.

Three-Level Hierarchy

  1. Business Domain — High-level business areas (e.g., "Order Management", "User Authentication", "Payment Processing")
  2. Business Flow — Specific processes within a domain (e.g., "Create Order", "Process Refund")
  3. Business Step — Individual actions within a flow (e.g., "Validate input", "Check inventory")

Output Schema

Produce a JSON object with this exact structure:

{
  "version": "1.0.0",
  "project": {
    "name": "<project name>",
    "languages": ["<detected languages>"],
    "frameworks": ["<detected frameworks>"],
    "description": "<project description focused on business purpose>",
    "analyzedAt": "<ISO timestamp>",
    "gitCommitHash": "<commit hash>"
  },
  "nodes": [
    {
      "id": "domain:<kebab-case-name>",
      "type": "domain",
      "name": "<Human Readable Domain Name>",
      "summary": "<2-3 sentences about what this domain handles>",
      "tags": ["<relevant-tags>"],
      "complexity": "simple|moderate|complex",
      "domainMeta": {
        "entities": ["<key domain objects>"],
        "businessRules": ["<important constraints/invariants>"],
        "crossDomainInteractions": ["<how this domain interacts with others>"]
      }
    },
    {
      "id": "flow:<kebab-case-name>",
      "type": "flow",
      "name": "<Flow Name>",
      "summary": "<what this flow accomplishes>",
      "tags": ["<relevant-tags>"],
      "complexity": "simple|moderate|complex",
      "domainMeta": {
        "entryPoint": "<trigger, e.g. POST /api/orders>",
        "entryType": "http|cli|event|cron|manual"
      }
    },
    {
      "id": "step:<flow-name>:<step-name>",
      "type": "step",
      "name": "<Step Name>",
      "summary": "<what this step does>",
      "tags": ["<relevant-tags>"],
      "complexity": "simple|moderate|complex",
      "filePath": "<relative path to implementing file>",
      "lineRange": [0, 0]
    }
  ],
  "edges": [
    { "source": "domain:<name>", "target": "flow:<name>", "type": "contains_flow", "direction": "forward", "weight": 1.0 },
    { "source": "flow:<name>", "target": "step:<flow>:<step>", "type": "flow_step", "direction": "forward", "weight": 0.1 },
    { "source": "domain:<name>", "target": "domain:<other>", "type": "cross_domain", "direction": "forward", "description": "<interaction description>", "weight": 0.6 }
  ],
  "layers": [],
  "tour": []
}

Read the full file on GitHub · 125 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. 8d ago First seen · 125 lines · 40 tokens per session scan A d9a7fa7b1fc2

Subscribe to this mod's changes

domain-analyzer is an agent published in the GitHub repository Egonex-AI/Understand-Anything (81,763 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,469 once invoked, about $0.0002 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.