grounded-generate

grounded-generate is a skill for Claude Code from uqeu/estelle-cli. It costs 0 tokens per session (973 once invoked), scanned A, original, Apache-2.0.

A code-generation method that creates several candidate solutions, tests them, and keeps a solution that survives the checks. It also verifies that referenced third-party packages and repository symbols are real.

In plain words
What is it for?
Use it when generating functions, scripts, or fixes that will run, especially when outside libraries are involved. It filters candidates through the real test suite and code checks.
Why use it?
A single generated answer may invent an API, import a package that does not exist, or fail on the actual codebase. Comparing candidates against executable tests reduces those errors.

Skill for Claude Code

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

Part of the estelle plugin — 25 skills, 4 agents, 9 hooks shipped together

Good fit Use it when generating functions, scripts, or fixes that will run, especially when outside libraries are involved. It filters candidates through the real test suite and code checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uqeu/estelle-cli/grounded-generate
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 uqeu/estelle-cli --skill grounded-generate
Clone the repo
git clone --depth 1 https://github.com/uqeu/estelle-cli

Made for: Claude Code.

Or install estelle, the plugin that ships this one along with the rest of its 25 skills, 4 agents, 9 hooks.

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 grounded-generate

README.md
[![agentmods](https://agentmods.dev/badge/skills/uqeu/estelle-cli/grounded-generate/github.svg)](https://agentmods.dev/skills/uqeu/estelle-cli/grounded-generate)
Your own site
<a href="https://agentmods.dev/skills/uqeu/estelle-cli/grounded-generate"><img src="https://agentmods.dev/badge/skills/uqeu/estelle-cli/grounded-generate/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 grounded-generate

Your own site · 80×15
<a href="https://agentmods.dev/skills/uqeu/estelle-cli/grounded-generate"><img src="https://agentmods.dev/badge/skills/uqeu/estelle-cli/grounded-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 973 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.00000 $0.00973
Opus 5.5 $0.00000 $0.00389
Sonnet 5.5 $0.00000 $0.00195
Haiku 4.5 $0.00000 $0.00097

Measured 1mo ago against content hash e818bbf71758, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

grounded-generate 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 1mo 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.

estelle-plugin/skills/grounded-generate/SKILL.md · 51 lines

How it starts

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

grounded-generate

Estelle's anti-hallucination generator — dead center of the thesis. Where CI checks one finished output, this samples K candidate solutions and K self-tests, executes them against each other, keeps only the survivors, and selects by consensus — then proves every imported package is real. It's built from generate_candidates / self_consistency (agent/candidates.py), propose_tests (agent/testgen.py), the real-suite filter run_and_repair_suite / parse_suite_output, the reproducible patch critic (agent/critic.py), and the two grounding gates — repo-scoped (GroundingReport.is_grounded) and library-scoped third_party_violations (agent/third_party.py). Grounded in CodeT's dual-execution consensus (2207.10397), the AlphaCodium flow (2401.08500), and the package-hallucination / slopsquatting work (2406.10279).

When to run

When generating code you'll actually run — a function, a script, a fix — where a single greedy sample might invent an API or import a package that doesn't exist. Reach for it especially when the answer pulls in third-party libraries: a hallucinated package name is the exact supply-chain surface attackers pre-register (slopsquatting), so an unverified import is a security risk, not just a bug.

Procedure

  1. Sample K candidate solutions. generate_candidates(ask, prompt, K) (agent/candidates.py), varying temperature for real diversity and routing the work through route() (serve/model_router.py). One greedy sample is a guess; K gives consensus something to measure.
  2. Sample K self-tests. propose_tests / build_testgen_prompt (agent/testgen.py) writes tests for the ADDED code (added_code), grounded against real repo symbols so the tests themselves can't invent helpers.
  3. Execute the K×K grid. Run each candidate solution against each self-test in a sandbox; parse_suite_output decides a pair "agrees" only when the pytest summary is truly green (no failed/error) — a clean import or partial run never counts.
  4. Execution-filter both sides. Drop every candidate that passes no test and every test no candidate passes — a bad test is as misleading as a bad solution, so CodeT filters both. Only mutually-passing survivors move forward; if nothing survives, the request is unanswerable as posed, not silently answered.
  5. Select by dual-execution consensus. The candidate that agrees with the most tests and clusters with the most peers wins: majority / self_consistency for convergent answers, with select_best breaking ties toward the grounded candidate (fewest ungrounded APIs). Consensus over execution, not an unverified judge's opinion.
  6. Gate the repo APIs. Run the deterministic grounding gate (GroundingReport.is_grounded) on the winner — every repo-scoped symbol it references must actually be defined in this codebase; a hallucinated repo API is rejected outright.
  7. Verify every imported package exists (anti-slopsquatting). Run third_party_violations (agent/third_party.py) over the allowlisted, actually-installed libraries: a requests.fetch() that isn't a real method, or an import of a package that isn't installed, is flagged. Never ship an answer that imports a nonexistent package — that is the slopsquatting attack, not a typo.
  8. Record the catch and gate. Any hallucination caught → learn_from_grounding / ExperienceStore.record (agent/reflect.py) so the next similar ask recalls the lesson, then let CI run the build and tests before it's called done.

Read the full file on GitHub · 51 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. 1mo ago Changed e818bbf71758
  2. 2mo ago First seen · 51 lines · 0 tokens per session scan A 4a95d8554cb1

Subscribe to this mod's changes

grounded-generate is a skill published in the GitHub repository uqeu/estelle-cli (0 stars, last pushed 26d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 973 tokens. 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-09-12.

Related

grounded-generate compared with skills from other repositories

grounded-generate next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grounded-generateuqeu/estelle-cliSkill026d agoApache-2.0A0Claude Code
cocosearch-review-prVioletCranberry/coco-searchSkill373d agoMITA68Claude Code
find-simplificationsQwenLM/qwen-codeSkill31ktodayApache-2.0C103Claude Code, Codex
aoe-sandbox-boundaryagent-of-empires/agent-of-empiresSkill5.2ktodayMITA85Claude Code, Codex
swarm-pr-reviewZaxbyHub/opencode-swarmSkill549todayMITA91Claude Code
code-reviewjrswab/axeSkill914yesterdayApache-2.0A0Claude Code, Codex
wishautomagik-si/genieSkill353yesterdayApache-2.0A47Codex