citation-grounding-pl

citation-grounding-pl is a skill for Claude Code from matematicsolutions/awesome-matematic-skills-pl. It costs 321 tokens per session (7,103 once invoked), scanned A, original, MIT.

A rule-based verifier for Polish legal citations that checks whether references and quoted passages appear in their source documents. It uses several levels of checking, including whether the source exists, whether the text matches, and whether the passage supports the stated use.

In plain words
What is it for?
Use it to verify citations from judgments, statutes, contracts, or legal letters after extracting them from the document.
Why use it?
Language models can produce realistic but nonexistent quotations, attach real case numbers to the wrong case, or paraphrase a ruling inaccurately. Mechanical source matching helps expose these problems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the fundament-weryfikacyjny plugin — 11 skills shipped together

Good fit Use it to verify citations from judgments, statutes, contracts, or legal letters after extracting them from the document.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl
Install

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.

Any agent
npx skills add matematicsolutions/awesome-matematic-skills-pl --skill citation-grounding-pl
Clone the repo
git clone --depth 1 https://github.com/matematicsolutions/awesome-matematic-skills-pl

Made for: Claude Code.

Or install fundament-weryfikacyjny, the plugin that ships this one along with the rest of its 11 skills.

Wrote 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.

agentmods badge for citation-grounding-pl

README.md
[![agentmods](https://agentmods.dev/badge/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl/github.svg)](https://agentmods.dev/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl)
Your own site
<a href="https://agentmods.dev/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl"><img src="https://agentmods.dev/badge/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl/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.

agentmods 80×15 button for citation-grounding-pl

Your own site · 80×15
<a href="https://agentmods.dev/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl"><img src="https://agentmods.dev/badge/skills/matematicsolutions/awesome-matematic-skills-pl/citation-grounding-pl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 321 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00321 $0.07103
Opus 5.5 $0.00128 $0.02841
Sonnet 5.5 $0.00064 $0.01421
Haiku 4.5 $0.00032 $0.00710

Measured 17d ago against content hash 256cd3d3ec0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

citation-grounding-pl 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 17d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ground-citations.mjs, scripts/test-grounding.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

fundament-weryfikacyjny/skills/citation-grounding-pl/SKILL.md · 339 lines

How it starts

The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Citation Grounding PL - mechaniczny weryfikator cytatu (gradient)

Filozofia

Cytat niezweryfikowany mechanicznie = cytat zmyślony, dopóki nie udowodnisz inaczej.

Model językowy potrafi wygenerować fragment wyroku, który brzmi idealnie - sygnatura, ton, słownictwo sądu - a którego w orzeczeniu nigdy nie było. Dla opinii prawnej cytującej nieistniejący fragment SN to katastrofa zawodowa i ryzyko odpowiedzialności (art. 6 Prawa o adwokaturze, należyta staranność).

Zasada: weryfikacja jest mechaniczna, nie semantyczna. Nie pytamy modelu „czy ten cytat pasuje". Robimy string-match znormalizowanego cytatu wobec znormalizowanego źródła. Match albo go nie ma. Odwrotny ciężar dowodu - to cytat musi się znaleźć w źródle.

Co nowego w v2 - gradient weryfikacji

v1 sprawdzał tylko jedną rzecz: czy dosłowny cytat istnieje w źródle. To zostawiało dwie ślepe plamy, które v2 zamyka:

  1. Zmyślona sygnatura. v1 mówił „BRAK ŹRÓDŁA" = luka do uzupełnienia. v2 traktuje nierozwiązaną lub rozbieżną kotwicę jako sygnał możliwego fałszerstwa. v2.1 dokłada guard STRONY: sygnatura może być realna, ale doczepiona do INNEJ sprawy - gdy nazwy stron zadeklarowane rozjeżdżają się ze stronami rozwiązanego źródła (Jaccard tokenów nośnych < 0.30), to 🔴 blokada („prawdziwy cytat, fałszywa teza" już na poziomie kotwicy, nie dopiero w treści).
  2. Prawdziwy cytat, fałszywa teza (problem Stanford „false-under-true"). Cytat może być dosłownie obecny (FRAGMENT zielony), a otaczające twierdzenie - „SN uznał, że…" - przekręca to, co sąd faktycznie orzekł. v1 wprost zwalniał parafrazy z weryfikacji. To była największa luka. v2 wciąga parafrazy w zakres na poziomie TREŚĆ.

Trzy poziomy (adaptacja Existence/Content/Paragraph z biblioteki Jeanne Sulzer, CC BY 4.0):

Poziom Co potwierdza Stosuj do
ISTNIENIE Kotwica - sygnatura/CELEX, data, organ - jest realna i zgadza się z deklaracją „wyrok z 12.03.2019, II CSK…", „por. II CSK 123/19"
TREŚĆ Źródło CO DO ISTOTY zawiera to, co twierdzi output „SN przyjął, że…", parafraza holdingu
FRAGMENT Cytowany akapit/zdanie istnieje dosłownie w źródle każdy cytat w cudzysłowie, każdy pinpoint akapitu

Read the full file on GitHub · 339 lines

Changes

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.

  1. 17d ago Changed · -9 tokens per session 256cd3d3ec0f
  2. 21d ago Changed · +32 lines cfa6334b0d77
  3. 1mo ago Changed · +3 lines a3f059e8d54a
  4. 1mo ago Changed · +21 lines de8fb26676b0
  5. 1mo ago First seen · 283 lines · 330 tokens per session scan A 760547d5a5e8

Subscribe to this mod's changes

citation-grounding-pl is a skill published in the GitHub repository matematicsolutions/awesome-matematic-skills-pl (8 stars, last pushed 8d ago), licensed MIT. It adds 321 tokens to every session and 7,103 once invoked, about $0.0013 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-31.

Related

Other skills, from other repositories

mqc-timeline-master

Turn raw case materials into a faithful, court-ready case timeline (SVG + PNG + PPTX + VSDX + drawio, plus a traceability index in Word). Use this whenever the user hands over litigation materials — a judgment, complaint, defence, evidence list, contract, bank or Alipay statement, WeChat screenshots, scanned exhibits…

zeweihan/aiworkdeck · 269 tokens

mqc-litigation-visual-redraw

Redraw a litigation diagram into a restrained, court-ready presentation graphic (SVG + PNG) WITHOUT changing any text or legal meaning. Use this whenever the user supplies a case timeline, a legal process flowchart, OR a party/relationship diagram and wants it cleaned up, beautified, redrawn, made professional…

zeweihan/aiworkdeck · 257 tokens

universal-standards

LegalAnt operating protocol — HITL gates, citation completeness, hallucination defence, Indian law default, data security, and mandatory disclaimer. Applies to every agent on every matter.

ishwarjha/legalant · 41 tokens

niw-package-review

Reviews an assembled EB-2 NIW petition package before filing, as a skeptical adjudicator would. Reads the actual exhibits, recommendation letters and petition draft, tests each Dhanasar prong against the preponderance standard on documented evidence only, quotes the specific petition passages that overclaim, and…

thepaperscompany/niw-skills · 161 tokens

niw-rfe-response

Works a USCIS Request for Evidence or Notice of Intent to Deny on an EB-2 NIW petition, from reading the notice through to a drafted response. Reads the printed deadline rather than computing one, crosswalks each contested issue against the record as actually filed, stops for the petitioner to correct what it found…

thepaperscompany/niw-skills · 0 tokens

indian-law-defaults

Indian statute and regulatory hierarchy defaults. All agents assume Indian jurisdiction unless overridden. Auto-triggers FEMA for foreign counterparties and SEBI LODR for listed entities.

ishwarjha/legalant · 39 tokens