grounded-citations

Ground answers and documents in numbered, verifiable source citations via a persistent ledger.

Updated Dec 7, 2025
One-click install
npx skills add https://github.com/harlanljones/dotfiles --skill grounded-citations-harlanljones
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grounded-citations
Source: https://github.com/harlanljones/dotfiles/tree/main/dot_hermes/skills/research/grounded-citations
Command: npx skills add https://github.com/harlanljones/dotfiles --skill grounded-citations-harlanljones

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? AI-generated answers and reports often contain hallucinated or unverifiable citations because URLs are reconstructed from memory. This Skill eliminates that risk by assigning each retrieved source a stable numeric id in a persistent ledger, so the model only ever emits integers it was handed and the URL mapping is rendered mechanically. ## Core Features & Use Cases - Citation Ledger: Register URLs at retrieval time with sources.py add or ingest; ids are idempotent, URL-normalized, and stable across multi-turn and multi-agent work. - Inline Numbered Citations: Write Perplexity-style [n] markers per sentence, then render the Sources block in markdown, plain, footnotes, bibtex, or evidence styles. - Fact-Checking Mode: Attach verbatim quotes validated against fetched page text, flag unsourced claims with [unverified], and gate drafts with verify --evidence --min-coverage. - Use Case: While writing a market research report from web searches, Reddit threads, and RSS feeds, register every URL as it arrives, cite each claim inline, then run verify before delivery to catch unknown ids or thinly cited prose. ## Quick Start Ask the agent to research a topic across the web and deliver an answer where every factual claim carries an inline numbered citation and a rendered Sources list verified against the citation ledger.

Frequently Asked Questions about grounded-citations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add verifiable citations to AI-generated answers?▼

Register each retrieved URL with sources.py add at fetch time to receive a stable numeric id, then place that id in brackets after each supported sentence. Render the Sources block with sources.py render so the id-to-URL mapping is generated mechanically, never retyped.

How do I fact-check an AI-written research report?▼

Attach verbatim quotes to each source with sources.py quote, which rejects any text not literally present in the fetched page. Then run sources.py verify with --evidence and --min-coverage to fail drafts whose cited sources lack evidence or whose prose is too thinly cited.

What citation formats does the ledger support for documents?▼

The render command supports markdown, plain, footnotes, bibtex, and evidence styles. Footnotes suit LaTeX and Word documents, bibtex exports @misc entries for academic pipelines, and the evidence style prints each source's verbatim quotes beneath its URL.

Does the citation ledger work with multiple parallel agents?▼

Yes, parallel subagents can share one ledger by passing --ledger or setting HERMES_CITATION_LEDGER so ids stay consistent across merged outputs. The script uses a cross-process lockfile to prevent concurrent add calls from assigning duplicate ids.

When should inline citations be skipped?▼

Skip citations when retrieval is incidental, such as quick syntax lookups mid-coding, casual conversation, or creative writing. Claims from the model's own knowledge get no citation, or an explicit [unverified] marker in fact-checking mode.