context-grounding

context-grounding is a skill for Claude Code from a-ariff/ariff-claude-plugins. It costs 45 tokens per session (489 once invoked), scanned A, original, MIT.

A code-reading method that requires exact quotes from source files before making claims about their contents.

In plain words
What is it for?
Use it for code explanations, reviews, change proposals, bug investigations, and security assessments.
Why use it?
It reduces made-up explanations when working with large files or unfamiliar code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the context-grounding plugin — 1 skill shipped together

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.

agentmods
npx agentmods add skills/a-ariff/ariff-claude-plugins/context-grounding
Any agent
npx skills add a-ariff/ariff-claude-plugins --skill context-grounding
Clone the repo
git clone --depth 1 https://github.com/a-ariff/ariff-claude-plugins

Made for: Claude Code.

Or install context-grounding, the plugin that ships this one along with the rest of its 1 skill.

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 context-grounding

README.md
[![agentmods](https://agentmods.dev/badge/skills/a-ariff/ariff-claude-plugins/context-grounding.svg)](https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/context-grounding)
Your own site
<a href="https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/context-grounding"><img src="https://agentmods.dev/badge/skills/a-ariff/ariff-claude-plugins/context-grounding.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 489 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00045 $0.00489
Opus 5 $0.00023 $0.00244
Sonnet 5 $0.00009 $0.00098
Haiku 4.5 $0.00005 $0.00049

Measured 6d ago against content hash 1784ec526772, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

context-grounding 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 6d 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.

plugins/context-grounding/skills/context-grounding/SKILL.md · 70 lines

What it actually says

Context Grounding

Read first. Quote second. Claim third. Never skip a step.

The grounding technique

Before making any claim about code, follow this sequence:

Step 1: Read the source

Read the actual file. Don't work from memory.

Step 2: Extract the relevant quote

Pull the exact text that supports your claim. Include line numbers.

Step 3: Make your claim based on the quote

Now state what you believe, citing the quote as evidence.

Example

Wrong approach: "The auth middleware checks for JWT tokens and returns 401 if invalid." (No evidence. Could be hallucinated.)

Grounded approach: "Reading src/middleware/auth.ts:15-25, the middleware does:

const token = req.headers.authorization?.split(' ')[1];
if (!token) return res.status(401).json({ error: 'No token provided' });

So it extracts the Bearer token from the Authorization header and returns 401 if missing."

When to ground

Always ground when:

  • Answering questions about specific code behavior
  • Writing code reviews or change proposals
  • Explaining how something works
  • Describing bug causes
  • Making security assessments

Grounding for long documents

For files over 100 lines:

  1. Read the full file first to understand structure
  2. Identify the specific section relevant to the question
  3. Re-read that section carefully
  4. Extract the key lines as quotes
  5. Build your answer from those quotes

For files over 500 lines:

  1. Use Grep to find the relevant section
  2. Read just that section (use offset and limit)
  3. Extract quotes from what you read
  4. If you need more context, read surrounding sections
  5. Never make claims about sections you haven't read

The grounding test

Before sending a response, test each factual statement: "Could someone verify this by reading the file I'm referencing?"

If yes: the statement is grounded. If no: you need to add the file reference and relevant quote. If you don't have a file to reference: either find one or mark as unverified.

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. 6d ago First seen · 70 lines · 45 tokens per session scan A 1784ec526772

Subscribe to this mod's changes

context-grounding is a skill published in the GitHub repository a-ariff/ariff-claude-plugins (14 stars, last pushed 5mo ago), licensed MIT. It adds 45 tokens to every session and 489 once invoked, about $0.0002 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-30.