codestory-grounding

codestory-grounding is a skill for Claude Code, Codex from TheGreenCedar/CodeStory. It costs 44 tokens per session (1,427 once invoked), scanned A, original, Apache-2.0.

A skill that uses CodeStory to ground an AI agent in a local code repository before it makes claims, plans edits, selects tests, or reviews changes. CodeStory provides a repository map and broad code search.

In plain words
What is it for?
Use it when planning or reviewing repository changes, choosing tests, understanding architecture, or assessing the impact of an edit.
Why use it?
It helps the agent base its advice and changes on evidence from the actual repository instead of rediscovering or guessing about the codebase.

Skill for Claude CodeCodex

Part of the codestory plugin — 1 skill, 1 MCP server 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/thegreencedar/codestory/codestory-grounding
Any agent
npx skills add TheGreenCedar/CodeStory --skill codestory-grounding
Clone the repo
git clone --depth 1 https://github.com/TheGreenCedar/CodeStory

Made for: Claude Code, Codex.

Or install codestory, the plugin that ships this one along with the rest of its 1 skill, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/thegreencedar/codestory/codestory-grounding.svg)](https://agentmods.dev/skills/thegreencedar/codestory/codestory-grounding)
Your own site
<a href="https://agentmods.dev/skills/thegreencedar/codestory/codestory-grounding"><img src="https://agentmods.dev/badge/skills/thegreencedar/codestory/codestory-grounding.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,427 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 $0.00044 $0.01427
Opus 5 $0.00022 $0.00714
Sonnet 5 $0.00009 $0.00285
Haiku 4.5 $0.00004 $0.00143

Measured 3d ago against content hash 3f2cf1908125, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codestory-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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/setup.ps1, scripts/setup.sh), 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.

plugins/codestory/skills/codestory-grounding/SKILL.md · 121 lines

How it starts

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

CodeStory Grounding

CodeStory keeps a local repository map and broad-search index so agents can reach useful evidence without rediscovering the same code every turn.

The target is always the repository being grounded. Pass its exact absolute root as project on every CodeStory call. Never rely on a global active workspace.

Direct Tool Loop

Call the tool that matches the task. Do not call status first.

Using this skill does not require an MCP call when the requested work is fully local to an already named evidence surface—for example, inspecting or editing the content of assets/desk.svg. Inspect that surface directly. Naming a path does not make the evidence surface complete when the task asks about ownership, dependencies, runtime behavior, architecture, change impact, or another claim whose evidence extends beyond the file. For those tasks, select the narrowest CodeStory tool that can add evidence; do not call broad ground as a pre-edit ceremony.

  1. Resolve the target repository root.
  2. Call the intended tool with project=<absolute-root>.
  3. If the result says state=preparing or state=updating and includes retry_after_ms, wait for that delay and retry the same tool with the same arguments. The delay tracks observed preparation progress, so honor the reported value instead of a fixed poll interval. Do not poll status or ask the user to set up CodeStory.
  4. Preserve cited anchors in source claims. Read focused source only for the remaining evidence gaps.

CodeStory prepares its local repository map and shared per-user retrieval server automatically. status and the project-bound codestory://status{?project} resource are optional diagnostics for a failed or unexpectedly slow request, not prerequisites for normal grounding.

If CodeStory tools are hidden and deferred discovery is available, search only for the intended tool, for example codestory mcp packet, then call it directly. If the plugin MCP is unavailable, use ordinary source inspection and report the visibility gap. Do not substitute CLI diagnostics for a live plugin result unless the user explicitly asks.

Read the full file on GitHub · 121 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. 3d ago First seen · 121 lines · 44 tokens per session scan A 3f2cf1908125

Subscribe to this mod's changes

codestory-grounding is a skill published in the GitHub repository TheGreenCedar/CodeStory (37 stars, last pushed 4d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,427 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.

Related

Other skills, from other repositories

adding-a-language

How a new language enters Kivgraph's graph - the two routes and why one of them is almost always wrong, the four decisions that cannot be migrated later, the branches that decide what your language is without asking, and the gates that fail closed. Use when adding or extending language support, when touching…

Luqueee/kivgraph · 90 tokens

running-tests

Cómo se ejecutan y se escriben los tests de Kivgraph - las tres suites, el tag ladybug que no se invoca a mano, qué se salta y por qué, y el smoke test del binario. Usar al correr tests, al añadirlos, ante un fallo de enlazado library 'lbug' not found, ante un SKIP inesperado, o antes de cerrar una tarea.

Luqueee/kivgraph · 94 tokens

publishing-releases

Cómo y sobre todo cuándo se publica una release de Kivgraph - la versión sólo sube, los tres sitios donde vive, qué verifica CI, y la lista de cambios que NO merecen release. Usar al proponer o preparar una release, al tocar internal/version/version.go, al crear un tag vX.Y.Z, o cuando alguien pida "saca una versión".

Luqueee/kivgraph · 85 tokens

kivgraph

Use Kivgraph's local MCP server to search symbols, read their source, and follow references, dependencies, cross-repository consumers and graph status in the indexed code graph.

Luqueee/kivgraph · 39 tokens

opening-pull-requests

Open or update a Kivgraph pull request, wait for CI and CodeRabbit, verify review findings against the current code, apply valid feedback, and repeat until the latest head is review-ready. Use when the user asks to open, create, prepare, or finish a PR, or asks what CodeRabbit says about one.

Luqueee/kivgraph · 71 tokens

wikipedia-glossary

Enrich an Open Mind project's glossary with standard term definitions from Wikipedia. For each already-extracted term, look up its authoritative Wikipedia definition, tidy it, and write it back to the glossary as a separate, attributed field; terms with no confident match keep their verbatim in-project definition. Use…

HelloThisWorld/open-mind · 91 tokens