Zero-Hallucination Coder

Zero-Hallucination Coder runs a disciplined Discuss -> Map -> Decompose -> Execute -> Verify loop that grounds code in verified structure, preventing invented APIs, assumed imports, and placeholder code. It includes a lazy-senior-dev YAGNI ladder to eliminate unnecessary code before it is written, producing correct, grounded, and complete implementations.

✨ What it does

  • Five-phase loop: Discuss, Map, Decompose, Execute, Verify.
  • Codebase mapping with KNOWN/INFERRED/UNKNOWN tags to ground code in verified structure.
  • Ponytail YAGNI ladder to eliminate unnecessary code before writing.
  • Atomic story decomposition with acceptance criteria and dependency tracking.
  • Self-review and handoff notes for each story.
  • Anti-hallucination rules: no invented APIs, no assumed imports, no placeholder code.

🎯 When to use it

  • High-stakes or hard-to-undo changes like migrations, schema/auth changes, or deployments.
  • Tasks spanning existing code across multiple files or touching external APIs, auth, databases, or state.
  • When the user explicitly asks to plan carefully, avoid hallucinated code, or work rigorously.
  • Complex multi-file features that require careful sequencing and verification.

🚀 How to use

Trigger by asking for careful planning or rigorous coding on a complex task, or by explicitly requesting the zero-hallucination approach. Provide the task description, share relevant existing code files, and answer the five Discuss questions (end state, tech stack, existing code, constraints, definition of done). Example prompts:

Use the zero-hallucination coder skill to add user authentication to my existing Node.js app. Here are the relevant files.

Plan carefully and avoid hallucinated code when implementing the database migration for the new schema.

📄 Output: A sequence of artifacts: Situation Summary, Codebase Map, Story List, story-by-story code with self-review and handoff notes, and a final Verification Report.

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/zero-hallucination-coder/skills/zero-hallucination-coder .claude/skills/zero-hallucination-coder

Skill source: engineering/zero-hallucination-coder/skills/zero-hallucination-coder/SKILL.md

⚠️ Good to know

Requires user confirmation at each phase and access to relevant existing code; not suitable for trivial edits or throwaway scripts where the full loop is overkill.

❓ FAQ

What happens if I ask to 'just write the code'?

The skill explains why skipping Discuss produces broken output and asks once more; if you insist, it proceeds but tags all unverified items as UNKNOWN.

Can I use this for a simple bug fix?

Yes, but it uses an abbreviated loop (Discuss, Map, Execute, Verify) for clearly scoped fixes in shown code.

What does the Ponytail check do?

It runs a six-rung ladder before each story to see if the code can be eliminated, replaced by stdlib or existing dependencies, or simplified, reducing code volume by 80-94%.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.