epistract-domain-update

epistract-domain-update is a command for coding agents from usathyan/epistract. It costs 26 tokens per session (5,057 once invoked), scanned C, original, MIT.

A guided command for editing one installed Epistract domain, which is a configured subject area such as contracts or drug discovery.

In plain words
What is it for?
Use it to add, remove, or rename entities and relations; revise extraction prompts; adjust epistemic analysis; or analyze new documents for schema suggestions.
Why use it?
It provides a structured way to change the domain’s data model, document-extraction instructions, or confidence and conflict rules.

Command

Part of the epistract plugin — 5 skills, 22 commands, 3 agents 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 commands/usathyan/epistract/domain-update
Clone the repo
git clone --depth 1 https://github.com/usathyan/epistract

Or install epistract, the plugin that ships this one along with the rest of its 5 skills, 22 commands, 3 agents.

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 epistract-domain-update

README.md
[![agentmods](https://agentmods.dev/badge/commands/usathyan/epistract/domain-update.svg)](https://agentmods.dev/commands/usathyan/epistract/domain-update)
Your own site
<a href="https://agentmods.dev/commands/usathyan/epistract/domain-update"><img src="https://agentmods.dev/badge/commands/usathyan/epistract/domain-update.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,057 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00026 $0.05057
Opus 5 $0.00013 $0.02528
Sonnet 5 $0.00005 $0.01011
Haiku 4.5 $0.00003 $0.00506

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

Security

Grade C, and why

epistract-domain-update scanned grade C with 1 finding 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 5d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TMPDIR"
commands/domain-update.md · 606 lines

How it starts

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

/epistract:domain-update

Edit an installed domain by updating one of its three components:

  • Schema (domain.yaml) — add, remove, or rename entity types and relation types
  • Extraction prompt (SKILL.md) — revise the LLM instructions used during document ingestion
  • Epistemic analysis (epistemic.py) — adjust confidence tiers, hedging patterns, and conflict rules

One component is edited per invocation. After the write completes the wizard exits. Re-invoke to edit another component.

Usage Guard

If invoked with --help or with no arguments: Display the following and stop. Otherwise proceed to Steps.

Usage: /epistract:domain-update <name>

Arguments:
  <name>    Name of the domain to update (e.g. "contracts", "drug-discovery")

Editable components:
  1. Schema (domain.yaml)              — add/remove/rename entity and relation types
  2. Extraction prompt (SKILL.md)      — revise LLM extraction instructions
  3. Epistemic analysis (epistemic.py) — adjust confidence tiers and conflict rules
  4. Re-run corpus analysis            — analyze new documents and suggest schema additions

Examples:
  /epistract:domain-update contracts
  /epistract:domain-update drug-discovery

To see available domains: /epistract:domain-list

Implementation notes — read before starting:

  • <name> is the domain name argument from the user invocation.
  • <dir> is the absolute path from the dir field of Step 1's JSON output. Use it for all subsequent file operations. Never construct the path manually from <name>.
  • Write domain.yaml via Python Path.write_text(), not a bare heredoc, to prevent shell metacharacter corruption in YAML descriptions that contain backticks or $.
  • Write SKILL.md and epistemic.py via heredoc with a single-quoted delimiter << 'CONTENT_EOF' to prevent shell expansion of $, backticks, and backslashes.
  • Do NOT round-trip proposed YAML through yaml.safe_load() + yaml.dump() — write verbatim to preserve formatting and inline comments.
  • The wizard exits after one component edit (one component per invocation). The user re-invokes to edit additional components.

Read the full file on GitHub · 606 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. 5d ago First seen · 606 lines · 26 tokens per session scan C ad41454b4556

Subscribe to this mod's changes

epistract-domain-update is a command published in the GitHub repository usathyan/epistract (8 stars, last pushed 20d ago), licensed MIT. It adds 26 tokens to every session and 5,057 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.