Agent skill

Grounded Citations

by NousResearch in NousResearch/hermes-agent

Attaches a numbered, URL-backed citation to every outside fact in an answer or document, rejecting quotes that aren't real.

MITAuto-check passedResearch & Science

Install Grounded Citations

skills CLI
$ npx skills add NousResearch/hermes-agent --skill grounded-citations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NousResearch/hermes-agent grounded-citations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NousResearch/hermes-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/research/grounded-citations .claude/skills/grounded-citations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
grounded-citations
GitHub stars
252k
Token cost
~3.1k tokens
SKILL.md length
1,619 words
Files
5 (incl. scripts, references)
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

Attaches a numbered, URL-backed citation to every outside fact in an answer or document, rejecting quotes that aren't real.

  • Writing a research summary or comparison that cites outside sources
  • SKILL.md covers When to Use, Prerequisites, How to Run and Quick Reference, plus 5 more sections
  • Runs Python scripts from its folder; calls python and gh
  • Producing a report, brief, or deck that quotes or paraphrases fetched pages

What it does

A ledger script, not the model's memory, owns every citation number here: each URL added gets a stable, idempotent id, so the same page always returns the same number across many search and extract rounds. The skill covers chat answers and written deliverables such as markdown, PDF, Word documents, and slides, and feeds a separate arxiv skill for conference-paper BibTeX work rather than replacing it.

For higher-stakes writing the same ledger doubles as a fact-checking chain: a cited claim needs a verbatim quote that actually appears on the fetched page, a claim drawn from the model's own knowledge gets flagged as unverified, and a verification step fails any draft whose cited sources carry no supporting evidence.

When your agent uses it

  • Writing a research summary or comparison that cites outside sources
  • Producing a report, brief, or deck that quotes or paraphrases fetched pages
  • Checking that a draft's citations are backed by real evidence

Example prompts

  • “Summarize the current state of serverless cold starts with numbered citations.”
  • “Add a sources list to this brief and verify each quote against its page.”
  • “Flag any claim in this draft that isn't backed by a fetched source.”

Requirements

  • Python 3 (stdlib only) to run the ledger script
  • A retrieval tool such as web search, web fetch, or a browser

What it can do on your machine

Read from SKILL.md and the folder at commit 14ec243. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Grounded Citations loads about 3.1k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 19 tokens; SKILL.md has 1,619 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from NousResearch/hermes-agent at commit 14ec243, republished under its MIT licence (© NousResearch). 1,619 words, ~3,147 tokens.

Download SKILL.mdSave it as .claude/skills/grounded-citations/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
grounded-citations
description
Ground answers and documents in cited, verifiable sources.
version
1.2.0
author
Hermes Agent + Teknium
license
MIT
platforms
linux, macos, windows

Grounded Citations

Every claim taken from an outside source gets an inline numbered citation and a Sources: list, Perplexity-style. A ledger script owns the url → [n] mapping so the numbers and URLs come from retrieval, never from memory — the model only ever emits small integers it was handed.

For high-stakes work the same ledger doubles as a fact-checking chain: verbatim quotes are attached to each source (rejected unless they literally appear in the fetched page text), claims from model knowledge are flagged [unverified], and verify --evidence fails any draft whose cited sources carry no evidence.

This skill covers answers in chat, written documents (markdown, PDF, docx, slides), and research reports. It does not cover academic BibTeX pipelines — for conference papers use the arxiv skill, which this skill feeds (see references/citation-formats.md).

When to Use

Use whenever an answer or artifact rests on information you fetched rather than knew:

  • Research, comparisons, news summaries, "what is the current state of X"
  • Any deliverable you write to disk that quotes, paraphrases, or reports outside facts — reports, briefs, docs, decks, wiki pages
  • Fact-finding where the user will want to check your work
  • Multi-source synthesis where conflicting sources must be attributed

Skip inline citations when the retrieval is incidental to another task — a quick syntax/version lookup mid-coding, casual conversation, creative writing. Mention a URL only if the user would plausibly want the link.

Prerequisites

None beyond the standard toolset. scripts/sources.py is stdlib-only Python 3. Retrieval comes from whatever is configured: web_search, web_extract, browser_navigate, or terminal (curl, CLIs).

Ledger location: $HERMES_HOME/cache/citations/ledger.json (profile-aware). Override per task with --ledger <path> or HERMES_CITATION_LEDGER.

How to Run

bash
S=~/.hermes/skills/research/grounded-citations/scripts/sources.py

python "$S" reset                                  # start a clean ledger
python "$S" add https://example.com/a --title "A"  # prints: [1]
python "$S" add https://example.com/b --title "B"  # prints: [2]
python "$S" list                                   # ledger table
python "$S" render                                 # Sources: block
python "$S" verify draft.md                        # catch bad citations

add is idempotent and URL-normalized: the same page always returns the same id within a ledger, so ids stay stable across many search/extract rounds.

Quick Reference

ActionCommand
Fresh ledger for a new tasksources.py reset
Register a source, get its idsources.py add <url> [--title T]
Register several at oncesources.py add <url1> <url2> ...
Register from JSON tool outputsources.py ingest results.json
Attach verbatim evidence to a sourcesources.py quote <id> --text "exact wording" --from page.txt
Show ledgersources.py list [--json]
Render the Sources blocksources.py render [--style markdown|plain|footnotes|bibtex|evidence] [--only 1,3]
Render only what a draft citessources.py render --cited-in draft.md
Rewrite a draft's Sources block in placesources.py render --replace-in draft.md
Check a draft's citationssources.py verify draft.md [--strict] [--min-coverage 0.6] [--evidence]

Procedure

① Reset the ledger at the start of a task that will produce a grounded answer or document. Skip the reset when continuing work whose ids are already in a draft — reusing the ledger keeps the numbering stable.

② Register every source at retrieval time. After each web_search / web_extract / browser_navigate / fetch, pass the URLs to sources.py add (or pipe the raw JSON through sources.py ingest). Do this before writing prose. Registering later, from memory, is the failure mode this skill exists to prevent.

③ Write cite-while-drafting. Place the bracketed id(s) immediately after each sentence the source supports:

Ice floats because it is less dense than liquid water.[1][2]
  • No space before the bracket; each id in its own brackets.
  • Max 3 ids per sentence. Cite per sentence, not one dump at the end.
  • Only ids the ledger returned. Never invent an id or a URL.
  • Claims from your own knowledge get no citation.
  • Conflicting sources: present both readings, each with its own id.
  • Quote exact figures, dates, and names as the source states them; flag gaps explicitly ("no source found for X") instead of smoothing them over.

④ Append the Sources block with sources.py render --cited-in <draft> so the id → URL mapping is generated mechanically from the ledger, not retyped. For non-markdown targets pick the matching --style and follow references/citation-formats.md for placement (footnotes in docx, endnotes in PDF/LaTeX, a Sources slide in decks, per-page source lists in wiki output).

⑤ Verify before delivering — sources.py verify <draft> exits non-zero on unknown ids, on a Sources block that disagrees with the ledger, or (with --min-coverage) on prose that is too thinly cited. Fix and re-run.

⑥ Chat answers follow the same steps with the draft in your reply: register sources, cite inline, end with the rendered Sources: list. For a short answer you may render the block from sources.py render --only <ids> instead of writing to a file.

Multi-Platform Sweeps

"What are people saying about X" / "research X across the web" is not one web_search. Fan out across source types, collect in parallel, then synthesise with every claim attributed to the platform it came from:

Source typeRouteWhat it adds
Open webweb_search → web_extractofficial docs, articles, announcements
Community discussionreddit-reading (search, thread)real user experience, complaints, workarounds
Blogs / releases / changelogsrss-feeds (read, discover)dated primary posts, version history
Videoyoutube-contentwalkthroughs, demos, talks
Codeterminal with gh search repos / gh search issuesimplementations, open bugs
X/Twitterxurl (needs API access)announcements, developer chatter

The reddit-reading and rss-feeds skills are optional. If absent, install with hermes skills install official/social-media/reddit-reading or hermes skills install official/research/rss-feeds before using them.

Register every URL from every route in the ledger as it arrives (step ②). Keep opinion and measurement apart: a Reddit thread is evidence that users report something, not that it is true; pair it with a primary source or label it as sentiment. Report per-platform coverage gaps ("Reddit search returned nothing newer than March") rather than silently narrowing to what worked.

Show full SKILL.md (741 more words)Show less

Fact-Checking Mode

For work where the reader must be able to check the chain — medical, legal, financial, safety, disputed claims, or when the user asks for fact-checking — upgrade from citations to evidence:

① Attach a verbatim quote per source. After extracting a page, save its text to a file and attach the sentence(s) that carry each claim:

bash
python "$S" quote 1 --text "Ice is about 9% less dense than liquid water." --from page1.txt

The quote is rejected unless it appears verbatim in the evidence text (insensitive to whitespace, case, and markdown markup — inline links like _[ERAP1](https://…)_ in extracted text match the plain prose a reader sees), so a paraphrase or misremembered figure cannot masquerade as evidence. Copy-paste from the fetched text; never retype. Quote the sentence as the reader sees it — the matcher sees through the extractor's markup for you, so you don't have to reproduce link syntax or escaped asterisks in your quote.

② Flag model-knowledge claims with [unverified]. A load-bearing claim you could not source gets an explicit marker instead of a citation:

The refactor likely predates the 2.0 release.[unverified]

verify --min-coverage counts [unverified] sentences as covered — the goal is declared provenance for every claim, not a citation on every sentence. If a key claim can be checked, check it; [unverified] is for what genuinely cannot be, and a fact-check deliverable dominated by [unverified] markers should say so in its summary.

③ Cross-check disputed facts against a second independent source. When two sources disagree, cite both readings with their own ids and quotes, and say which you weight and why. One source is reporting; two independent sources are corroboration.

④ Verify with the evidence gate and render the evidence block:

bash
python "$S" verify report.md --evidence --min-coverage 0.5
python "$S" render --style evidence --replace-in report.md

--evidence fails the draft if any cited source has no attached quote. The evidence render style prints each source's quotes beneath its URL, so the deliverable shows claim → source → exact supporting text with nothing taken on faith. Use --replace-in <draft> to rewrite an existing Sources block in place (idempotent — safe to re-run after attaching more quotes); --cited-in prints to stdout instead. Both emit the heading ## Sources (--style plain emits Sources:).

What --min-coverage counts. Coverage is sentences with declared provenance / prose sentences. A prose sentence is a non-empty line fragment of 4+ words after the Sources block, headings (#), table rows (|), and fenced code are dropped; blockquote markers are stripped. Provenance is declared by either a [n] citation or an [unverified] marker, so a sentence carrying both counts once. Run verify without a threshold first and read the info: stats: line to see the counts before picking a number.

Pitfalls

  • Registering after writing. The ledger must be populated from tool output, not reconstructed from the draft — that reintroduces exactly the hallucinated -URL risk the numbering removes.
  • Renumbering mid-task. Never hand-edit ids in a draft. Ids are ledger identities; if a draft cites [4], [4] must stay that source. Run reset only between tasks.
  • Retyping URLs into the Sources block. Always render. A hand-typed URL is an unverified claim.
  • Citing a search snippet as if you read the page. A web_search description supports only what it literally says. Cite the extracted page when the claim needs the body — web_extract it first.
  • Over-citing. Three ids on a sentence is the ceiling; a citation on every clause makes text unreadable and hides which source carries the load.
  • Citing the ledger in code/config artifacts. Source comments belong in prose deliverables and doc headers, not inside generated code.
  • Parallel subagents. Each subagent has its own working directory; point them all at one ledger with --ledger (or HERMES_CITATION_LEDGER) if their outputs get merged, otherwise their ids will collide.
  • Quoting from a snippet instead of the page. Evidence quotes must come from the extracted page text, not a search-result description — web_extract first, save the text, then quote --from that file.
  • Paraphrasing into quote --text. The verbatim check will reject it; the fix is to find the actual sentence, not to reword until something matches.
  • Using [unverified] as an escape hatch. It marks the rare claim that genuinely cannot be sourced; if most sentences carry it, the task needed more retrieval, not more markers.
  • Hand-editing the Sources block. Use render --replace-in <draft>; slicing the file yourself risks a stale or duplicated block that verify then flags.

Verification

bash
python "$S" verify report.md --strict --min-coverage 0.5

Green means: every [n] in the draft exists in the ledger, the Sources block lists exactly the cited ids with the ledger's URLs, and the cited share of source-bearing sentences meets the threshold. Read the warnings even when the exit code is 0 — uncited registered sources usually mean a claim lost its attribution during editing.

© NousResearch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/research/grounded-citations of NousResearch/hermes-agent.

  • SKILL.md
  • references/citation-formats.md
  • references/grounding-rationale.md
  • scripts/_hermes_home.py
  • scripts/sources.py

Open the folder on GitHubat commit 14ec243

Compare with similar skills

Grounded Citations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Grounded Citations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Grounded Citations this skillNousResearch/hermes-agent252k—~3.1kAutomated safety check: PassMIT
Fact Checkelvisun/newsjack1.5k—~5.6kAutomated safety check: PassMIT
Citation Verification GuideGalaxy-Dawn/claude-scholar5.7k2 repos~1.9kAutomated safety check: PassMIT
Article Fact Checkerdigoal/blog8.6k—~939Automated safety check: PassGPL-2.0
Citation VerificationLight0305/Light-skills640—~3.4kAutomated safety check: PassMIT
Reference VerifierYuan1z0825/nature-skills47k2 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Fact Check

    elvisun/newsjack

    Extract factual claims from PR copy, verify each claim independently, attach concrete citations, and warn when certainty is low.

    1.5k GitHub stars~5.6k tokensUpdated 2 days ago
    Research & ScienceAuto-check passed
  • Citation Verification Guide

    Galaxy-Dawn/claude-scholar

    Reference guidance for checking every citation in academic writing against canonical sources such as DOI, arXiv, CrossRef and Semantic Scholar, to catch fake or wrong references.

    5.7k GitHub starsUsed in 2 repos~1.9k tokens
    Research & ScienceAuto-check passed
  • 三层审查模型,逐段逐句验证文章真伪、证据链与逻辑结构。Use when the user asks to fact-check, verify, audit, or evaluate the credibility of an article, essay, report, opinion piece, social-media post, or any written claim —…

    8.6k GitHub stars~939 tokensUpdated today
    Research & ScienceAuto-check passed
  • Citation Verification

    Light0305/Light-skills

    Verifies that every reference in a manuscript is real, correctly identified and actually supports its claim, and produces a citation registry for typesetting.

    640 GitHub stars~3.4k tokensUpdated 3 mo ago
    Research & ScienceAuto-check passed
  • Reference Verifier

    Yuan1z0825/nature-skills

    Cross-checks each academic reference against several sources field by field, flags conflicts such as year, DOI, author order and page errors, and outputs a structured report.

    47k GitHub starsUsed in 2 repos~1.4k tokens
    Research & ScienceAuto-check passed
  • Research

    zhongkaifu/TensorSharp

    A skill your agent uses for web searches and current information lookups, finding sources, fact-checking, researching questions, comparing sources, or summarising web pages.

    559 GitHub stars~2.3k tokensUpdated today
    Research & ScienceAuto-check: warnings

More from NousResearch/hermes-agent

All 31 skills in this repo
  • AI Presenter Video

    NousResearch/hermes-agent

    Produces a presenter-led video from a topic or script plus one authorized presenter image, with captions, lip-sync checks and acceptance reports.

    252k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Word DOCX Toolkit

    NousResearch/hermes-agent

    Creates, reads, edits and templates Word .docx files with python-docx scripts, including tracked changes, comments, tables of contents and health checks.

    252k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • PDF

    NousResearch/hermes-agent

    PDF files: create, read, merge, fill, OCR, edit text. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Scrollcraft

    NousResearch/hermes-agent

    Premium scroll-driven landing pages; scroll = timeline. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • XLSX

    NousResearch/hermes-agent

    Create, read, edit Excel .xlsx workbooks and CSVs. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Powerpoint

    NousResearch/hermes-agent

    Create, read, edit .pptx decks with python-pptx. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~2.7k tokensUpdated today
    Auto-check passed

Questions about Grounded Citations

What does Grounded Citations do?

Attaches a numbered, URL-backed citation to every outside fact in an answer or document, rejecting quotes that aren't real. A ledger script, not the model's memory, owns every citation number here: each URL added gets a stable, idempotent id, so the same page always returns the same number across many search and extract rounds. The skill covers chat answers and written deliverables such as markdown, PDF, Word documents, and slides, and feeds a separate arxiv skill for conference-paper BibTeX work rather than replacing it.

When should I use Grounded Citations?

Grounded Citations fits situations like: writing a research summary or comparison that cites outside sources; producing a report, brief, or deck that quotes or paraphrases fetched pages; checking that a draft's citations are backed by real evidence.

How do I install Grounded Citations in Claude Code?

Run `npx skills add NousResearch/hermes-agent --skill grounded-citations -a claude-code`. Or copy the skill folder (skills/research/grounded-citations in NousResearch/hermes-agent) into .claude/skills/grounded-citations in your project. Claude Code loads it when a task matches its description.

How do I install Grounded Citations in Codex?

Run `npx skills add NousResearch/hermes-agent --skill grounded-citations -a codex`. Or copy the skill folder (skills/research/grounded-citations in NousResearch/hermes-agent) into .agents/skills/grounded-citations in your project. Codex loads it when a task matches its description.

Can I use Grounded Citations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NousResearch/hermes-agent --skill grounded-citations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/grounded-citations, .gemini/skills/grounded-citations, .github/skills/grounded-citations and .opencode/skills/grounded-citations in your project.

What does Grounded Citations need to run?

Going by SKILL.md and its folder, Grounded Citations needs Python for the scripts in its folder and the command-line tools its instructions call (python and gh). Our summary lists: Python 3 (stdlib only) to run the ledger script; A retrieval tool such as web search, web fetch, or a browser.

Does Grounded Citations access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Grounded Citations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Grounded Citations use?

Grounded Citations is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Grounded Citations use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Grounded Citations?

Skills that share tags, products or a category with Grounded Citations: Fact Check (elvisun/newsjack, 1.5k stars), Citation Verification Guide (Galaxy-Dawn/claude-scholar, 5.7k stars), Article Fact Checker (digoal/blog, 8.6k stars) and Citation Verification (Light0305/Light-skills, 640 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Grounded Citations?

NousResearch (a GitHub organization) maintains it in NousResearch/hermes-agent, which has 252,110 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 9, 2026.

Source: NousResearch/hermes-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.