provenance-dag

provenance-dag is a skill for Claude Code, Codex from docxology/template. It costs 103 tokens per session (1,144 once invoked), scanned A, original, Apache-2.0.

A record of where research files came from and which processing runs produced them. It links source files, runs, results, and claims in a directed graph, using content hashes to identify files.

In plain words
What is it for?
Use it to record artifacts and processing runs, inspect links between them, and review or validate the whole research history.
Why use it?
It makes research lineage traceable, so you can check how a result was produced and spot missing or inconsistent records.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is run = RunNode.create("analysis run", command="uv run python scripts/pipeline/stage_02_analysis.py").

Good fit Use it to record artifacts and processing runs, inspect links between them, and review or validate the whole research history.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/docxology/template
agentmods
npx agentmods add skills/docxology/template/provenance

Made for: Claude Code, Codex.

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 provenance-dag

README.md
[![agentmods](https://agentmods.dev/badge/skills/docxology/template/provenance.svg)](https://agentmods.dev/skills/docxology/template/provenance)
Your own site
<a href="https://agentmods.dev/skills/docxology/template/provenance"><img src="https://agentmods.dev/badge/skills/docxology/template/provenance.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,144 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.00103 $0.01144
Opus 5 $0.00051 $0.00572
Sonnet 5 $0.00021 $0.00229
Haiku 4.5 $0.00010 $0.00114

Measured 3d ago against content hash 2e0689645318, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

provenance-dag 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.

The scan reads SKILL.md. This mod also ships 8 executable files (__init__.py, __main__.py, cli.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

infrastructure/provenance/SKILL.md · 138 lines

How it starts

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

Provenance DAG

Content-addressed provenance DAG for tracking research artifact lineage. Every artifact node is identified by a SHA-256 content hash; edges record which pipeline stage produced each artifact from which inputs.

Quick Start

from infrastructure.provenance import ArtifactNode, EdgeRelation, Provenance, RunNode

store = Provenance.with_path("output/.provenance")

# Record that a run produced an artifact
run = RunNode.create("analysis run", command="uv run python scripts/pipeline/stage_02_analysis.py")
artifact = ArtifactNode.create("results.json", path="output/results.json")
store.record(run)
store.record(artifact)

# Link the artifact to the run that produced it
store.link(run.node_id, artifact.node_id, EdgeRelation.produced_by)

CLI

# Record an artifact node
uv run python -m infrastructure.provenance record-artifact "results.json" --path output/results.json

# List all recorded nodes (optionally filter by kind: artifact/run/source/claim)
uv run python -m infrastructure.provenance list --kind artifact

# Run the DAG-wide review pass (missing hashes, missing exit codes, etc.)
uv run python -m infrastructure.provenance review --json

# Run the DAG graph structural and acyclicity validation
uv run python -m infrastructure.provenance validate --json

There is no link or query CLI subcommand — those are library-only (Provenance.link() / Provenance.query()); the CLI exposes list, record-artifact, review, and validate.

Pipeline Orchestrator

# Record provenance for a named project and pipeline stage
uv run python scripts/pipeline/stage_09_provenance_record.py --project my_project --stage analysis

# Record with explicit input/output glob patterns and a custom store path
uv run python scripts/pipeline/stage_09_provenance_record.py \
    --project my_project \
    --stage render \
    --outputs "output/*.pdf" \
    --store-path output/.provenance/dag.json

There is no projects/{name}/manuscript/config.yaml provenance: block — config-driven provenance is not implemented; every run is parameterized via CLI flags on the stage script above.

Read the full file on GitHub · 138 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 138 lines · 103 tokens per session scan A 2e0689645318

Subscribe to this mod's changes

provenance-dag is a skill published in the GitHub repository docxology/template (19 stars, last pushed yesterday), licensed Apache-2.0. It adds 103 tokens to every session and 1,144 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

aerospace-engineering-technician

Use when a task needs the judgment of an Aerospace Engineering and Operations Technologist/Technician — verifying an installed fastener's preload against a drawing's torque callout via the T=K·D·F relationship, reducing strain-gauge data from a structural proof-load test into stress and checking it against an…

wonsukchoi/domain-experts · 169 tokens

agricultural-engineer

Use when a task needs the judgment of an agricultural engineer — sizing a center-pivot or drip irrigation system's peak capacity against crop water demand, computing lateral grain-bin wall pressure with Janssen's equation, sizing a waterway or tile-drainage system with Manning's equation and an NRCS design-storm…

wonsukchoi/domain-experts · 90 tokens

agricultural-sciences-professor

Use when a task needs the judgment of a tenure-track or tenured Agricultural Sciences faculty member at a land-grant university — deciding whether to submit a grant this cycle versus wait, allocating time across the teaching/research/extension appointment split, diagnosing a stalled graduate student or field trial, or…

wonsukchoi/domain-experts · 75 tokens

anthropologist-archeologist

Use when a task needs the judgment of an Anthropologist/Archeologist working in cultural resource management (CRM) — scoping a Section 106 Phase I identification survey, designing a shovel-test-pit sampling strategy, evaluating National Register of Historic Places eligibility under Criteria A-D, interpreting…

wonsukchoi/domain-experts · 106 tokens

automotive-engineering-technician

Use when a task needs the judgment of an Automotive Engineering Technician — setting up and instrumenting test equipment (strain-gauge bridges, thermocouples, load/torque sensors) to an engineer's written test plan, selecting DAQ sample rate and an SAE J211 CFC filter class for a vehicle test channel, verifying…

wonsukchoi/domain-experts · 207 tokens

calibration-technician

Use when a task needs the judgment of a Calibration Technologist/Technician — computing a Test Uncertainty Ratio (TUR) and deciding whether it meets the 4:1 target, building a measurement uncertainty budget (Type A/Type B, GUM-style) for a calibration, tracing a reference standard's chain of custody to NIST/SI…

wonsukchoi/domain-experts · 112 tokens