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.
npx skills add LegalQuants/lq-skills --skill text-provenancegit clone --depth 1 https://github.com/LegalQuants/lq-skillsWrote 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.
[](https://agentmods.dev/skills/legalquants/lq-skills/text-provenance)<a href="https://agentmods.dev/skills/legalquants/lq-skills/text-provenance"><img src="https://agentmods.dev/badge/skills/legalquants/lq-skills/text-provenance/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/legalquants/lq-skills/text-provenance"><img src="https://agentmods.dev/badge/skills/legalquants/lq-skills/text-provenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.00826 |
| Opus 5.5 | $0.00016 | $0.00330 |
| Sonnet 5.5 | $0.00008 | $0.00165 |
| Haiku 4.5 | $0.00004 | $0.00083 |
Grade A, and why
text-provenance 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
text-provenance
When to Use
- RAG citation highlighting — show which source document a generated text came from
- Contract playbook matching — find which standard clause a contract clause derives from
- Plagiarism detection
- Source attribution for AI-generated legal text
- Any text provenance task where you need to trace text back to its origin
How It Works
Core Approach
Lightweight text similarity metrics — no embeddings or API calls at runtime. Fast, deterministic string matching that works in-browser or server-side.
Comparison Methods
- Surface similarity — character-level comparison
- N-gram overlap — phrase-level matching
- Fingerprint matching — exact phrase detection
Usage
import { findProvenance } from 'text-provenance';
const sources = await findProvenance(
"the quick brown fox jumps over the lazy dog",
corpusDocuments
);
// Returns ranked list of potential sources with confidence scores
Edge Cases
Works where embeddings fail:
- Short text snippets
- Exact phrase matching
- High-precision attribution tasks
- Privacy-sensitive contexts (no data leaves the machine)
Audience and Work Shape
Audience: developers and lawyers building RAG-citation, contract-derivation, or plagiarism-detection workflows. The output is a candidate ranking, not a finding.
Work shape: Pattern-Matched Review. Lexical similarity is the matching function; the user decides what counts as a match.
Scope and Legal Use
This skill provides legal support, not legal advice. The output is a ranked list of candidate sources with similarity scores — never an attribution conclusion, never a plagiarism finding, never a contract-derivation determination of legal effect.
Privilege and confidentiality. Runs client-side with no network calls. No text leaves the user's machine unless the calling application chooses to transmit it. Skill itself does not create new privilege exposure.
Accountability. A qualified lawyer must review and accept any output before relying on it for an attribution, plagiarism, or contract-derivation decision. The similarity score is a signal, not a verdict.
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.
- 2mo ago First seen · 94 lines · 40 tokens per session scan A df06a98add23
text-provenance is a skill published in the GitHub repository LegalQuants/lq-skills (65 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 826 once invoked, about $0.0002 per session on Opus 5.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-30.
text-provenance compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| text-provenanceLegalQuants/lq-skills | Skill | 65 | 4mo ago | Apache-2.0 | A | 40 | Claude Code, Codex |
| retrievalsipyourdrink-ltd/bernstein | Skill | 1.2k | yesterday | Apache-2.0 | A | 18 | Claude Code, Codex |
| embeddingsruvnet/ruflo | Skill | 81k | yesterday | MIT | A | 62 | Claude Code |
| agent-platform-rag-engine-managementgoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 85 | Claude Code, Codex |
| llm-app-patternsdavila7/claude-code-templates | Skill | 33k | yesterday | MIT | A | 54 | Claude Code, Codex |
| 9router-embeddingsdecolua/9router | Skill | 32k | 9d ago | MIT | A | 66 | Claude Code, Codex |
| embedding-strategiesforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 2d ago | Apache-2.0 | A | 37 | Claude Code, Codex |