# /understand-domain: Extract the business flows hidden in your code

Source: https://trendhub.net/skills/egonex-ai-understand-anything/understand-domain
Skill folder: https://github.com/Egonex-AI/Understand-Anything/tree/main/understand-anything-plugin/skills/understand-domain
Pack: Understand Anything (https://trendhub.net/skills/egonex-ai-understand-anything)
Works with: Claude Code, Codex, Gemini CLI, OpenCode, Cline, Kiro, Trae and other agents (macOS/Linux), Windows (PowerShell), VS Code + GitHub Copilot, Copilot CLI, Devin

understand-domain produces a separate graph of business domains, flows and process steps. If a knowledge graph already exists it derives the domain view from that cheaply; otherwise a Python script gathers the file tree, entry points and signatures for a domain-analyzer subagent. The result is saved as domain-graph.json and opened in the dashboard.

## When to use it

- A product manager or new hire needs to see what the system does in business terms.
- You want to trace which routes, jobs and handlers make up a checkout or signup flow.
- You need a quick domain overview without paying for a full code analysis.

## How it works

1. **Resolve the project**: The agent sets the project root, redirects away from temporary worktrees and locates the plugin's agent definitions.
2. **Pick a source**: With a fresh existing graph it uses that as context; with none, or with --full, it runs a lightweight scan that finds routes, CLI commands, event handlers and cron jobs.
3. **Analyse domains**: It sends that context to a domain-analyzer subagent that writes domains, flows and steps to an intermediate file.
4. **Validate, save and show**: It validates the output, keeps whatever is valid, saves domain-graph.json, cleans up scratch files and opens the dashboard's domain view.

## What it steers the agent away from

- Rescanning the codebase when a current graph can be reused
- Spending many agent tool calls exploring files the script can summarise
- Discarding a whole result because part of it fails validation

## What it can touch

Runs git and a bundled Python script, dispatches one subagent, writes domain-graph.json under .ua/ and starts the dashboard.

## Pairs well with

- `/understand-dashboard`
- `/understand-onboard`
- `/understand`

## Questions

### Does it need the main graph?

No. It works standalone with a lighter scan, but it is cheaper and draws on more detail when a knowledge graph already exists.

### How do I force a fresh domain scan?

Run it with --full to ignore the existing graph.
