Skip to content
Skillpedia
Analysis & spreadsheets14k · #11153

provenance

What it does

This skill traces the origin and history of data in a Semantica knowledge graph, including sources, changes and audit records. It is for people who need to show where information came from.

When to use it

  • ✓When you need to know where a piece of data originally came from.
  • ✓When you want an audit log of changes to entities since a given date.
  • ✓When an auditor or regulator asks for a formal record of data history.

Skill link

https://github.com/semantica-agi/semantica/blob/main/plugins/skills/provenance/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/semantica-agi/semantica/blob/main/plugins/skills/provenance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you show me the full lineage and sources for the customer record C-102, and list every change since January?”

5 new skills a week. 1 minute to read.

How it works

The agent looks up the chain of data that led to an item, all of its sources and its revision history, and can produce an audit log. Items can also be marked as replaced without deleting their history.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

/semantica:provenance

Lineage and audit trails. Usage: /semantica:provenance <task> [args]


lineage <entity_id> [--depth N]

import os
from semantica.provenance import ProvenanceManager

db_path = os.path.expanduser("~/.semantica/prov.db")   # storage_path is passed to
os.makedirs(os.path.dirname(db_path), exist_ok=True)   # sqlite3.connect() unexpanded
pm = ProvenanceManager(storage_path=db_path)   # SQLite, or omit for in-memory
chain = pm.lineage(entity_id, depth=3)
full  = pm.get_lineage(entity_id)          # complete ancestry
down  = pm.get_descendants(entity_id)      # what this entity influenced

sources <entity_id>

srcs = pm.get_all_sources(entity_id)       # every source that contributed
prov = pm.get_provenance(entity_id)        # the raw PROV entry
hist = pm.revision_history(entity_id)

audit [--since <iso-date>] [--format table|json]

log = pm.audit_log(since="2026-01-01", format="table")
between = pm.query_recorded_between(start, end)
stats = pm.get_statistics()

export [--format turtle|json-ld|xml]

W3C PROV-O export — this is the regulator-facing artifact.

rdf = pm.export_prov(format="turtle", base_uri="https://example.org/prov/")

invalidate <entity_id> <agent_id> [--reason ...]

Mark an entity superseded without deleting history.

pm.invalidate(entity_id, agent_id, reason="source retracted")

check [--strict]

report = pm.check(strict=False)   # integrity check over the provenance store
FAQ

What is W3C PROV-O?

It is a standard way of describing where data came from, and the skill can export records in that format.

Does it delete old data?

No. An item can be marked as superseded, which keeps its history in place.

Where are the records stored?

They can be stored in a local database file, or kept only in memory if no file is given.

Details

Original description by the author

Trace data lineage, source attribution, audit trails, and W3C PROV-O export in Semantica graphs. Uses ProvenanceManager.

repo: semantica-agi/semantica

Popularity

GitHub stars
14k
Ranking position
#11153
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills