model-provenance — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited model-provenance (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Given a model name, produce a local, verified, self-contained archive of its actual code and papers, then register a memory so all future work on that model reads the real source instead of guessing.
is about building the grounded reference archive first.
Always archive to the global root `~/.claude/model-provenance/<model-slug>/`, never inside the current project. The archive is a machine-wide source of truth shared by every project (the memory in step 7 points other repos at this absolute path), so it must not live under any one project's working dir and must not be committed to a project's git history. Do not ask for or accept a per-project location; if the user wants a copy in their project, symlink it after the fact. Expand ~ to the real $HOME in every path you write down. Slugify the exact variant: DINOv3 → dinov3, SAM 2 → sam2.
~/.claude/model-provenance/<model-slug>/
├── code/ # full git clones — canonical repo first, key community repos
├── key_code/ # extracted train loop, model def, inference; + MANIFEST.md
├── papers/ # <slug>.pdf + <slug>.metadata.json (title/authors/abstract/bibtex)
├── SOURCES.md # provenance manifest: every repo+paper, commit pin, WHY canonical
└── notes.md # synthesis: architecture, training recipe, hyperparams, how to runReuse what's already there. Before doing any network work, check whether ~/.claude/model-provenance/<slug>/ already exists. If it does, treat the existing archive as the starting point and only fill gaps — do not re-clone, re-extract, or re-download artifacts that are already present and valid. Each step below states its own skip condition. If the user explicitly asks to refresh, delete the relevant subdir(s) first, then re-run those steps.
Safety: this skill archives code; it never executes cloned repos, installs their dependencies, or runs their scripts. Reading and copying only.
Track these as todos. Steps 1–2 are high-judgment (do them inline / with an agent); steps 3–6 are mechanical; steps 7–8 are required, not optional polish.
ls -la ~/.claude/model-provenance/<slug>/ 2>/dev/null && \
cat ~/.claude/model-provenance/<slug>/SOURCES.md 2>/dev/nullIf the archive already exists and SOURCES.md covers the canonical repo + the papers the user wants, this skill is mostly done: report what's there, run the step 8 verification, and only re-enter the steps below for whatever is missing or stale. A fresh archive starts at step 1.
Confirm the exact model variant with the user if ambiguous (DINOv3 vs DINOv2). Fan out searches across web, GitHub, Hugging Face, and arXiv. See references/discovery.md for the exact queries and APIs. Collect a candidate list of repos and papers — do not commit to one yet.
Do not trust the top GitHub result. Score candidates with the verification rubric in references/discovery.md (author-org match, paper→repo link, HF paper page link, HF card, fork check). For non-obvious cases, dispatch a subagent to cross-check author affiliations against repo ownership and report which repo is official with evidence. Decide:
Create the folder layout, then clone into code/ and pin the commit:
ROOT=~/.claude/model-provenance/<slug>
mkdir -p "$ROOT"/{code,key_code,papers}
# skip if already cloned (idempotent re-runs)
[ -d "$ROOT/code/<repo>" ] || git -C "$ROOT/code" clone --depth 1 <canonical-repo-url>
# record the exact commit for reproducibility
git -C "$ROOT/code/<repo>" rev-parse HEADUse --depth 1 for speed unless the user wants full history. If the repo dir is already present, keep it (note its pinned commit) rather than re-cloning.
scripts/ paths below are relative to this skill's directory (the base directory announced when the skill loads), not the project. For each cloned repo, pull the high-signal train/inference/model/config files:
scripts/extract_key_code.py "$ROOT/code/<repo>" --out "$ROOT/key_code"Skip a repo whose files are already under key_code/ with a current MANIFEST.md unless the clone changed. This writes key_code/MANIFEST.md (including the source commit). Skim it; if the training loop or model def is missing (unusual layout), locate it by hand and copy it in. Config-heavy repos are capped at 50 files per category (--max-per-category); overflow is listed in the manifest but not copied.
For each paper (primary + method-defining predecessors — see discovery.md):
scripts/fetch_paper.py <arxiv-id-or-url> --out "$ROOT/papers"Accepts an arXiv id (2304.07193), an /abs/ or /pdf/ URL, or a direct PDF URL (--name <slug> to set the filename). Writes the PDF + a metadata sidecar with bibtex. Skip any paper whose .pdf + .metadata.json already exist in papers/ and pass the step 8 %PDF check.
canonical|community label, and the one-line evidence for why it's canonical. For every paper: title, arXiv id, local filename.
key_code/ and the paper abstracts and synthesize:architecture overview, the training recipe (objective, losses, key hyperparameters, data), and a concrete "how to run inference" section with cited file references (key_code/...:line). This is the doc future-you reads first. Keep claims grounded in the archived files — cite, don't invent.
So future sessions ground coding in the real source, write a memory file (see the memory instructions in the system prompt) and index it in MEMORY.md:
type: reference, name model-src-<slug>. If this memory already exists,update it in place rather than creating a duplicate.
~, e.g./home/<user>/.claude/model-provenance/<slug>) and an explicit rule:
Before writing or reviewing any code involving `<model>`, you MUST read `<abs-path>/notes.md` and the relevant files under `<abs-path>/key_code/` first. Ground all APIs, layer names, and the training recipe in that archived source — do not rely on memory for this model.
[[model-src-...]] (e.g. DINOv3 → [[model-src-dinov2]]).MEMORY.md:- [<model> source archive](model-src-<slug>.md) — MUST read before coding <model>
This is what makes the archive binding: the pointer loads every session, and the memory's recall makes reading the real code mandatory rather than optional.
Run these checks; fix anything that fails rather than reporting around it:
papers/*.pdf starts with %PDF (head -c4) and has a matching.metadata.json sidecar. If a PDF fails the check (HTML error page), delete it and re-fetch from an alternate source (arXiv /pdf/ URL, the paper's project page); if it still fails, remove the junk file and record the miss in SOURCES.md instead;
key_code/ contains at least a model definition plus a train orinference file, and MANIFEST.md's source commit matches the pin in SOURCES.md;
SOURCES.md has a pinned commit and one-line canonical evidence for everyrepo in code/;
MEMORY.md contains its pointer line.State where the archive lives, the canonical repo + pinned commit, what was extracted, the papers saved, and that the mandatory-read memory is registered. Flag anything uncertain (e.g. "could not find official training code; archived the most-trusted community impl").
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.