citation-grounding-pl

citation-grounding-pl is a skill for Claude Code from matematicsolutions/awesome-matematic-skills-pl. It costs 330 tokens per session (5,808 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 330 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,808 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.00330 $0.05808
Opus 5 $0.00165 $0.02904
Sonnet 5 $0.00066 $0.01162
Haiku 4.5 $0.00033 $0.00581

Measured 12d ago against content hash 760547d5a5e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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 · 283 lines

How it starts

The opening of the file, as written. The whole thing — 283 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 · 283 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d 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 (6 stars, last pushed 19d ago), licensed MIT. It adds 330 tokens to every session and 5,808 once invoked, about $0.0016 per session on Opus 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

e-signature

Use when wiring an e-signature flow with DocuSign or Dropbox Sign — picking the SES/AES/QES legal tier, sending a PDF or template for signature, embedded signing, verifying signing webhooks, retrieving the signed PDF plus audit trail. NOT drafting contract text (that is contracts), NOT extracting fields from PDFs…

ericrisco/rsc-harness · 77 tokens

runtime-admissibility-review

Determines whether a specific AI-agent action, output, recommendation, or proposed commitment remains admissible for execution or institutional reliance under current authority, delegated scope, evidence, facts, policy, risk, escalation, and revocation conditions. Use this Skill before an enterprise or regulated AI…

lawve-ai/awesome-legal-skills · 90 tokens

agent-authority-charter-builder-arkadiy-miteiko

Creates an Agent Authority Charter for enterprise or regulated AI agents before deployment. Use this Skill when a user needs to define what an AI agent is allowed to do, who delegated authority to it, what actions are permitted or prohibited, when human approval is required, what evidence must be preserved, and how…

lawve-ai/awesome-legal-skills · 85 tokens

metago-compliance

A pre-task checklist for checking legal, ethical, and security concerns before acting. It covers privacy, copyright, permissions, sensitive data, system safety, and regional compliance requirements.

metago-ai/metagolifeform · 62 tokens

metago-thought-19-negentropy-engine

A framework for assessing whether a system has a positive or negative effect on social order, information clarity, trust, fairness, and innovation. It uses changes in these areas to discuss social responsibility and ethical risk.

metago-ai/metagolifeform · 58 tokens

metago-security-engineer

Security Engineer - specializes in security audit, penetration testing, vulnerability management, compliance checking, security design review, supply chain security, and incident response.

metago-ai/metagolifeform · 34 tokens