riekelt avatar

Grounding Before Coding Skill

Installs
29.1k
Repo stars
6
Security scans passed
3/3
Repo updated
Sep 11, 2026

TL;DR

grounding-before-coding is a skill that makes an agent map the real code and data, quote evidence and reproduce bugs before it writes a fix or a first line of a change.

Install if

Developers whose agent fixes bugs or changes code from assumptions, especially in unfamiliar code or with intermittent errors after a deploy.

Skip if

Anyone who wants a style guide or a full read of the whole codebase; it maps only what the change touches plus one ring around it.

npx skills add https://github.com/riekelt/principal-engineer --skill grounding-before-coding
On this page
  1. What grounding-before-coding covers
  2. grounding-before-coding by the numbers
  3. What does the Grounding Before Coding skill produce?
  4. What files ship with grounding-before-coding?
  5. Which skills are related to grounding-before-coding?
  6. How does grounding-before-coding compare?
  7. Grounding Before Coding skill FAQ
  8. More in this repo

What grounding-before-coding covers

  • Quotes a file and line, a query result or a command output for each load-bearing claim
  • Requires reproducing a bug before any change is made
  • Finds every route into shared code so the fix covers sibling paths
  • Produces a map of touchpoints, current behavior and invariants not to break

grounding-before-coding by the numbers

All-time installs29,121 (29.1k)skills.sh registry
Repo stars★ 6GitHub
Security audit3 / 3 scanners passedskills.sh audit
Repo last updatedSeptember 11, 2026GitHub
Repositoryriekelt/principal-engineer ↗

Data as of Nov 29, 2026 (Skillselion catalog sync)

What can the grounding-before-coding skill do in Claude Code?

Capabilities
evidence quoting · bug reproduction · invariant mapping
Use cases
debugging · code review · research
From the docs

What grounding-before-coding says it does

Before writing a spec, a fix, or a first line: map the real code and data.
SKILL.md
For bugs: see the failure happen before changing anything.
SKILL.md
Not re-grounding what this session already established: ground once, cite it after.
SKILL.md

What does the Grounding Before Coding skill produce?

The agent returns a grounded map with quoted evidence, reproduced failures and named invariants before any edit.

  • A map of touchpoints, quoted current behavior and invariants

What files ship with grounding-before-coding?

SKILL.mdMarkdownGitHub ↗

Grounding before coding

REQUIRED BACKGROUND: the principal-engineering skill.

Overview

Before writing a spec, a fix, or a first line: map the real code and data. Quote file:line and run the query behind every number you rely on.

The discipline

  1. Read the implementations, not the names. A method called validate that does not validate is the default assumption. Verify what a thing does before building on what it is called.
  2. Quote your evidence. Every load-bearing claim in your plan gets a file:line, an exact query result, or a command output. When you cannot back a claim, say so out loud instead of assuming it.
  3. Never guess conventions. How this repo names things, wires dependencies, handles errors, or runs tests is discoverable in minutes.
  4. Trust code, not status. A document's or ticket's self-reported state is not evidence of execution state; adjudicate with the code and the history (git log -S <symbol>, grep the tree) before building on it.
  5. Reproduce before fixing. For bugs: see the failure happen before changing anything.
  6. Fix where the callers converge. A bug report names one symptom on one path; before editing, find every route into the code you are about to touch. When the defect lives in something shared, the guard belongs in the shared place: it is the smaller diff AND the fix that covers the sibling paths the ticket never mentioned. Patching only the reported path repairs the report, not the bug.
  7. Map the invariants a change must not break. The output of grounding is a map: the touchpoints, the current behavior (quoted), and those invariants. Tests named after old bugs, guards with explanatory comments, and constants encoding hard-won thresholds mark earlier incidents.

Limits of grounding

  • Not reading everything: map what the change touches plus one ring around it, at the depth the risk demands.
  • Not a substitute for asking: when the code cannot answer an intent question (why is this threshold 7?), the history or the owner can. An unanswerable question becomes a named assumption, never a silent one.
  • Not re-grounding what this session already established: ground once, cite it after.

Common mistakes

  • Theorizing from the framework's documentation about what the project's code does. The project forked, wrapped, or misused the framework; the tree tells you which.
  • Grounding the happy path only. The invariants live in the error paths and the edge-case guards.
  • Trusting a prior session's summary of the code over the code. Open the files the summary names before building on it.
  • Skipping grounding because the task "looks like" a previous one. The signal that pattern-matches a known case may have a different cause; check that the evidence supports this case.

Which skills are related to grounding-before-coding?

How does grounding-before-coding compare?

Compared with a plain debugging checklist, it ties every plan claim to quoted evidence and fixes shared code where callers converge.

Grounding Before Coding skill FAQ

Who is the Grounding Before Coding skill for?

Developers whose agent fixes bugs or changes code from assumptions, especially in unfamiliar code or with intermittent errors after a deploy. Skip if: Anyone who wants a style guide or a full read of the whole codebase; it maps only what the change touches plus one ring around it.

When should I use grounding-before-coding?

Starting any non-trivial change, investigating a bug, working in unfamiliar code, or doing pure investigation such as "figure out why" before a change is planned.

What does grounding before coding do?

It makes the agent map the real code and data before a change. Each load-bearing claim gets a file and line, an exact query result or a command output, and unbacked claims are stated as such.

Does it need another skill installed?

The doc names the principal-engineering skill as required background, so load that skill alongside this one.

Does the agent have to read the whole repo?

No. It maps what the change touches plus one ring around it, at the depth the risk demands, and it does not re-ground what the session already established.

Is Grounding Before Coding safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Add a grounding-before-coding badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Get the embed code
Debuggingtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.