zero-hallucination-coder
Skill này làm gì
Skill này hướng dẫn AI qua một quy trình cẩn thận cho công việc code có nhiều rủi ro, như thay đổi đăng nhập, cơ sở dữ liệu hoặc migration. Skill dành cho lập trình viên muốn ít hàm bịa đặt và ít bước bị bỏ qua.
Khi nào nên dùng
- ✓Khi một tác vụ code có rủi ro cao hoặc khó hoàn tác, như migration cơ sở dữ liệu hay thay đổi xác thực.
- ✓Khi một thay đổi trải dài nhiều file hiện có và chạm đến API bên ngoài.
- ✓Khi bạn yêu cầu AI lập kế hoạch cẩn thận và tránh code bịa đặt.
Liên kết skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/zero-hallucination-coder/skills/zero-hallucination-coder/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Lên kế hoạch migration cơ sở dữ liệu này cẩn thận và đảm bảo mọi hàm bạn dùng thật sự có trong phiên bản thư viện của chúng tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đi qua một loạt giai đoạn: thảo luận mục tiêu, lập bản đồ code hiện có, chia công việc thành các bước, thực hiện thay đổi và xác minh từng import và API trước khi chuyển sang bước tiếp theo.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Zero-Hallucination Coder
A disciplined, senior engineering partner. The goal is code that is correct, grounded, and complete — with zero invented APIs, zero skipped steps, and zero hallucinated behavior.
When to invoke (opt-in discipline)
This is a deliberate, opt-in pipeline, not the default for every edit. Reach for it when:
- The task is high-stakes or hard to undo (migrations, schema/auth changes, deployments).
- It spans existing code across multiple files, or touches external APIs, auth, databases, or state.
- The user explicitly asks to "plan carefully," "avoid hallucinated code," or "do this rigorously."
For a typo, a reformat, a docstring, or a throwaway script, skip the loop — the ceremony costs more than it saves. Anti-hallucination Rules 1-7 (below) still apply everywhere, but the five-phase loop is reserved for work that earns it.
Credits & Inspiration
This skill is a synthesis of four open-source projects. Their ideas power every phase of the loop below.
| Project | Author | What It Contributes |
|---|---|---|
| Ralph | @snarktank | PRD-driven atomic coding loop — implement one story at a time in fresh context, commit only when quality checks pass |
| GSD Core | @open-gsd | Context-engineering discipline — Discuss → Plan → Execute → Verify → Ship phase loop, structured memory files, preventing context rot |
| Graphify | @safishamsi | Knowledge-graph codebase reasoning — explicit KNOWN/INFERRED/UNKNOWN relationship tagging, grounded in real structure not guesses |
| Ponytail | @DietrichGebert | Lazy senior dev hierarchy — before writing any code, check if it needs to exist at all, producing 80–94% less code |
Each project also ships its own native tooling (autonomous runners, AST graph builders, lifecycle hooks). This skill bakes their discipline into one loop; install the originals separately only if you want their standalone tooling.
Before Starting
Check for context first: If project-context.md exists in the workspace, read it before asking questions. Use that context and only ask for gaps.
Modes
- Build from scratch — no existing codebase. Run all five phases.
- Extend existing code — the relevant files must be shared before Phase 2 (Map) can run. Request only the files that matter, not the whole repo.
- Debug or refactor — abbreviated loop: Discuss → Map (read broken code) → Execute (targeted fix) → Verify.
The Five-Phase Loop
Every session under this skill runs all five phases in order. Skipping phases is the primary cause of hallucinated, broken, or incomplete code.
Phase 1: DISCUSS
Goal: Capture what is actually being built before any planning happens.
Ask and fully resolve:
- What is the end state? Describe the working thing, not the steps to get there.
- What tech stack, language, and major libraries are in use? (Do NOT assume.)
- Does existing code exist that this touches? If yes, share it.
- What are the hard constraints? (Must run on X, must use Y, must not break Z.)
- What does "done" look like — how will we know this works?
Rules:
- Ask all five questions in a single message and wait for answers.
- Do not start planning until questions 1, 2, and 5 are answered.
- If the user says "just write the code", explain briefly why skipping Discuss produces broken output and ask once more. If they insist, proceed with explicit UNKNOWN tags everywhere.
Output: A one-paragraph Situation Summary the user confirms before moving forward.
Phase 2: MAP
Goal: Build a codebase map before writing a single line of code. (Graphify principle)
For existing code:
CODEBASE MAP
============
[KNOWN] UserService.ts → calls → AuthService.authenticate()
[KNOWN] AuthService.ts → imports → jwt library (v9.x, user confirmed)
[INFERRED] UserController.ts → probably calls → UserService (assumed from naming)
[UNKNOWN] Database connection layer → HOW auth tokens are stored → NOT VERIFIED
UNKNOWN FLAGS — must resolve before coding:
- Token storage mechanism: ask user or request db/config file
For greenfield projects: sketch the proposed architecture as a dependency map with the same t
Câu hỏi thường gặp
Tôi có nên dùng nó cho chỉnh sửa nhỏ không?
Không, skill nói rằng sửa lỗi chính tả hay định dạng lại nhỏ không cần quy trình đầy đủ vì nó thêm bước phụ.
Nó kiểm tra những gì?
Nó kiểm tra mọi import và API được dùng trong code có tồn tại trước khi thay đổi được coi là xong.
Nó có làm AI chậm hơn không?
Có, nó thêm bước lập kế hoạch và kiểm tra, đó là lý do nó chỉ dành cho công việc rủi ro.
Chi tiết
Mô tả gốc của tác giả
Use before high-stakes or multi-file coding (auth, databases, migrations), or when asked to plan carefully and avoid invented APIs. Runs discuss, map, decompose, execute and verify, checking every import and API exists. Not for trivial edits.
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9616
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-launcher-orchestrator
29kGiúp agent của bạn lên kế hoạch, xây dựng, kiểm thử và lên lịch một Claude managed agent trong tài khoản riêng, từng bước một, bắt đầu từ một mục tiêu rõ ràng.
grade-iterate
29kCho phép agent của bạn chấm kết quả một managed AI agent theo bảng tiêu chí và cải thiện qua số vòng cố định, nên không bao giờ lặp vô tận.
interview
29kCho phép agent của bạn phỏng vấn bạn về ý tưởng agent AI và biến câu trả lời thành một kế hoạch xây dựng đơn giản trước khi khởi chạy bất cứ điều gì.
run-without-you
29kGiúp agent của bạn thiết lập một managed AI agent chạy theo lịch hoặc khi có sự kiện xảy ra, với thời gian cron được kiểm tra trước khi khởi chạy.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.