epistract-epistemic

epistract-epistemic is a command for Claude Code from usathyan/epistract. It costs 34 tokens per session (1,166 once invoked), scanned A, original, MIT.

A command that examines an existing knowledge graph, which is a structured map of connected information, for hypotheses, contradictions, conditional claims, negative results, and differences between patents and papers. It adds these findings as a claims layer in JSON format.

In plain words
What is it for?
Use it on an output directory containing graph data from an earlier ingest or build command, with an option to skip the language-model narration.
Why use it?
It exposes how claims relate to one another after the graph has already been built, including conflicts and claims that depend on conditions.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the epistract plugin — 5 skills, 22 commands, 3 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add usathyan/epistract
Claude Code
/plugin install epistract

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/usathyan/epistract/epistemic.svg)](https://agentmods.dev/commands/usathyan/epistract/epistemic)
Your own site
<a href="https://agentmods.dev/commands/usathyan/epistract/epistemic"><img src="https://agentmods.dev/badge/commands/usathyan/epistract/epistemic.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 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,166 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00034 $0.01166
Opus 5 $0.00017 $0.00583
Sonnet 5 $0.00007 $0.00233
Haiku 4.5 $0.00003 $0.00117

Measured 6d ago against content hash 548bb4dd3689, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

epistract-epistemic 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 6d 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.

commands/epistemic.md · 84 lines

How it starts

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

Epistract Epistemic Analysis

Analyze a built knowledge graph for epistemic patterns — hypotheses, contradictions, conditional claims, negative results, and patent vs. paper epistemic signatures. Produces a claims_layer.json overlay complementing the existing community structure.

Usage Guard

If invoked with no arguments or with --help: Display the following usage block verbatim and stop — do not run any pipeline steps.

Usage: /epistract:epistemic <output-dir>

Required:
  <output-dir>    Path to directory containing graph_data.json from a prior /epistract:ingest or /epistract:build run

Examples:
  /epistract:epistemic ./epistract-output
  /epistract:epistemic ./clinical-output

Arguments

Arguments

  • path (required): Output directory containing graph_data.json (from a prior /epistract-ingest or /epistract-build)
  • --no-narrate (optional): Skip the LLM analyst narrator and produce only the deterministic rule output. Use for offline runs, when no API key is available, or when you want byte-identical repeat runs.

What This Does

This command runs after the graph is built (after /epistract-ingest or /epistract-build). It reads the assembled graph_data.json — where cross-document evidence is merged — and identifies five categories of epistemic facts:

  1. Hypothesized mechanisms — clusters of hedged relations forming a conjecture
  2. Conflicting evidence — same relation with opposing evidence from different sources
  3. Patent vs. paper signatures — prophetic/claimed vs. empirically demonstrated
  4. Temporal state transitions — evolving truth (pre-clinical → approved)
  5. Negative results — high-confidence statements about absence

After the rule-based analysis, an automatic analyst narrator reads the domain persona (from domains/<name>/workbench/template.yaml:persona) plus the fresh claims_layer.json and produces epistemic_narrative.md — a structured briefing an analyst would write: prophetic claim landscape grouped by topic, contested claims with source IDs, coverage gaps, recommended follow-ups. The narrator is ADDITIVE — any failure (no API key, API error, domain has no persona) leaves claims_layer.json on disk as the authoritative rule output and prints a clear note to stderr.

Read the full file on GitHub · 84 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. 6d ago First seen · 84 lines · 34 tokens per session scan A 548bb4dd3689

Subscribe to this mod's changes

epistract-epistemic is a command published in the GitHub repository usathyan/epistract (8 stars, last pushed 21d ago), licensed MIT. It adds 34 tokens to every session and 1,166 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-31.