Grounded banner
Pinperepette Pinperepette

Grounded

Development community

Description

Claude Code hooks that enforce tool usage, prevent hallucinations and protect your codebase

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

grounded

**Make Claude use your codebase, not its imagination.**

Claude Code is getting worse.

Recent models:

  • hallucinate functions that don't exist
  • edit files they haven't read
  • get stuck in loops
  • ignore instructions after a few turns

Everyone using it has seen this.

`grounded` fixes it.


TL;DR

Claude doesn't fail because it's dumb.

It fails because nothing enforces correct behavior.

`grounded` enforces:

  • read before edit
  • real file verification (no hallucinations)
  • deterministic tool usage
  • loop prevention

Result:

→ Claude becomes reliable → even weaker models become usable


Before vs After

**Without grounded**

"parseToken() exists in src/auth.ts" ❌ it doesn't

edits wrong file ❌ based on hallucinated context

infinite grep loops ❌ stuck forever


**With grounded**

NOT FOUND: parseToken → forces correct search

must Read before Edit → uses real code

loops detected and stopped → suggests alternative


![grounded](./assets/grounded-banner.png)


Why this works

The problem isn't the model.

It's that we trust it too much.

LLMs are probabilistic. Your codebase is not.

`grounded` assumes the model is wrong — and verifies everything.


Works with weaker models

This doesn't make Claude smarter.

It makes it behave correctly.

When behavior is enforced:

  • reasoning matters less
  • correctness matters more

→ even smaller / local models become usable


Install

npm install -g @pinperepette/grounded
grounded install

Restart Claude Code. You're done.

grounded status     # verify installation
grounded uninstall  # remove all hooks

What it does

  • Pre-flight planning (forces research before action)
  • Truth layer (blocks hallucinated identifiers)
  • Edit guard (read-before-edit enforcement)
  • Loop detection with recovery suggestions
  • Anti-bypass (prevents ignoring NOT FOUND results)
  • Policy enforcement (repo-level rules)

Modes

  • `sa