Anti-Hallucination

•

Detects hallucinated symbols, typos, and non-existent code elements in AI-generated output via AST and regex analysis, ensuring code quality and accuracy.

Anti-Hallucination is a specialized server designed to bolster the reliability of AI coding assistants like Claude Code and Codex. It rigorously analyzes code through AST-based symbol extraction and regex, identifying hallucinated function names, incorrect imports, invalid API routes, and other inconsistencies. Additionally, it features a Token Compressor Engine to significantly reduce the context window usage for AI, and includes an environment detection tool to prevent cross-platform command errors, all delivered as a focused, high-performance solution for AI safety in development.

主な機能

01Automatic post-write hook for continuous hallucination checks after every code edit.
02Environment detection provides anti-error rules for cross-platform command compatibility.
03AST-based symbol extraction for functions, classes, variables, exports, API routes, and HTML pages across multiple languages.
040 GitHub stars
05Fuzzy matching symbol registry detects hallucinated names, typos, unknown symbols, and invalid import paths/API routes.
06Native Token Compressor Engine optimizes shell command outputs to drastically reduce AI context window usage.

ユースケース

01Optimizing the context window for AI coding assistants by compressing verbose shell command outputs like `git status` or `ls`.
02Verifying the accuracy and existence of symbols and imports in AI-generated code snippets or full files.
03Preventing AI-generated commands from failing due to operating system or shell incompatibilities in diverse development environments.