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.
npx agentmods add commands/usathyan/epistract/domaingit clone --depth 1 https://github.com/usathyan/epistractWrote 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.
[](https://agentmods.dev/commands/usathyan/epistract/domain)<a href="https://agentmods.dev/commands/usathyan/epistract/domain"><img src="https://agentmods.dev/badge/commands/usathyan/epistract/domain.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00016 | $0.02928 |
| Opus 5 | $0.00008 | $0.01464 |
| Sonnet 5 | $0.00003 | $0.00586 |
| Haiku 4.5 | $0.00002 | $0.00293 |
Grade A, and why
epistract-domain 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.
How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/epistract:domain
Create a new domain package from sample documents. Analyzes documents via multi-pass LLM analysis to propose a domain schema, then generates a complete domain package (domain.yaml, SKILL.md, epistemic.py, references/) ready for the standard pipeline.
Usage Guard
If invoked with --help: Display the following and stop. Otherwise start the wizard.
Usage: /epistract:domain
Launches the interactive domain creation wizard. No arguments needed up front — the wizard will ask you for:
1. Domain name (e.g., "legal-contracts", "genomics")
2. A brief domain description (1-2 sentences)
3. Paths to 2–5 sample documents representative of the domain
Output:
domains/<domain-name>/domain.yaml — entity and relation type schema
domains/<domain-name>/SKILL.md — extraction prompt for the domain
domains/<domain-name>/epistemic.py — epistemic analysis rules
Prerequisites
Prerequisites
- Python environment with epistract dependencies installed
- 2-5 sample documents from the target domain (PDF, DOCX, HTML, TXT, or any format Kreuzberg supports)
Usage
/epistract:domain
The wizard will prompt for:
- Domain name -- short identifier (e.g., "real-estate", "healthcare-records")
- Domain description -- 1-2 sentences describing the domain (e.g., "Real estate lease agreements between landlords and tenants")
- Sample document paths -- paths to 2-5 representative documents
Steps
Step 1: Gather Inputs
Ask the user for:
- Domain name: A short, hyphenated identifier. Will become the directory name under
domains/. - Domain description: 1-2 sentences. This provides context for LLM schema discovery.
- Sample document paths: At least 2 documents (recommend 3-5). Accept any file format.
Validate inputs:
- Domain name must be lowercase, alphanumeric with hyphens only
- Check for domain name collision using
core/domain_wizard.py:from core.domain_wizard import check_domain_exists if check_domain_exists(domain_name): # Warn user: domain already exists. Ask to overwrite or pick new name. - Verify all document paths exist and are readable files
- Warn if only 1 document provided (minimum 2 required)
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.
- 3d ago First seen · 299 lines · 16 tokens per session scan A 926bec176dda
epistract-domain is a command published in the GitHub repository usathyan/epistract (8 stars, last pushed 19d ago), licensed MIT. It adds 16 tokens to every session and 2,928 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-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.