domain-discovery

domain-discovery is a command for Claude Code from sigistry/marketplace. It costs 15 tokens per session (2,983 once invoked), scanned A, original, MIT.

A codebase exploration command that maps a system’s business areas, data entities, connections, technologies, and entry points.

In plain words
What is it for?
Use it to locate application startup files, routes, APIs, database schemas, models, and the relationships between the things the system manages.
Why use it?
It gives developers a working picture of an unfamiliar project before they make changes.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the legacy-analyzer plugin — 5 commands shipped together

Good fit Use it to locate application startup files, routes, APIs, database schemas, models, and the relationships between the things the system manages.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sigistry/marketplace/domain-discovery
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/sigistry/marketplace

Made for: Claude Code.

Or install legacy-analyzer, the plugin that ships this one along with the rest of its 5 commands.

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-discovery

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/domain-discovery/github.svg)](https://agentmods.dev/commands/sigistry/marketplace/domain-discovery)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/domain-discovery"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/domain-discovery/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 domain-discovery

Your own site · 80×15
<a href="https://agentmods.dev/commands/sigistry/marketplace/domain-discovery"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/domain-discovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,983 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.00015 $0.02983
Opus 5 $0.00008 $0.01491
Sonnet 5 $0.00003 $0.00597
Haiku 4.5 $0.00002 $0.00298

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

Security

Grade A, and why

domain-discovery 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 7d 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/legacy-analyzer/commands/domain-discovery.md · 459 lines

How it starts

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

Domain Discovery Command

Rapidly understand the business domains and entity structure of an unfamiliar codebase. This command is perfect for initial exploration when you have no context about what the system does.

Objective

Quickly identify what business domains exist, what entities the system manages, and how they relate to each other. Think of this as creating a "business map" of the codebase.

Step 1: Quick Discovery Scan

Identify Entry Points

  • Main application files (main., app., index.*)
  • Configuration files (package.json, requirements.txt, pom.xml, etc.)
  • Routing/endpoint definitions
  • Database schema files
  • API documentation if present

Technology Detection

  • Framework and language
  • Database type
  • API style (REST, GraphQL, gRPC, etc.)
  • Frontend framework (if applicable)

Step 2: Entity Identification

Find all business entities in the codebase:

Where to Look

  • Database models/schemas
  • API response structures
  • TypeScript interfaces / Java classes / Python classes
  • GraphQL schemas
  • ORM model definitions
  • Serializers and DTOs

Entity Extraction

For each entity found, document:

## Entity: [EntityName]

**File Location**: `file_path:line_number`

**Description**: [Infer what this entity represents in business terms]

**Attributes**:
| Field Name | Type | Required | Description |
|------------|------|----------|-------------|
| id | string | yes | Unique identifier |
| name | string | yes | [Inferred purpose] |
| status | enum | yes | [Possible values: draft, active, archived] |
| createdAt | datetime | yes | Creation timestamp |

**Business Purpose**: [What business problem or concept this entity models]

**Lifecycle**: [How this entity is created, updated, and deleted]

Step 3: Relationship Mapping

Identify how entities relate to each other:

Relationship Types

  • One-to-Many (User has many Orders)
  • Many-to-Many (Students have many Courses, Courses have many Students)
  • One-to-One (User has one Profile)
  • Hierarchical (Comment has parent Comment)
  • Polymorphic relationships

Read the full file on GitHub · 459 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. 7d ago First seen · 459 lines · 15 tokens per session scan A 911a73f01b5a

Subscribe to this mod's changes

domain-discovery is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 2,983 once invoked, about $0.0001 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-09-03.