"Code -> audit -> amend -> audit again -> pass." Blind Auditor is a mandatory code auditing system built on the MCP (Model Context Protocol). It uses a unique "Thinking Isolation" mechanism to force AI Agents to enter an independent "audit phase" and self-review their code before outputting the final result. Traditional AI coding is often "generate and output," which allows errors and biases to sl
Add this skill
npx mdskills install Sim-xia/blind-auditorInnovative self-auditing MCP server that forces AI agents to review code against configurable rules before output
"Code -> audit -> amend -> audit again -> pass."
Blind Auditor is a mandatory code auditing system built on the MCP (Model Context Protocol). It uses a unique "Thinking Isolation" mechanism to force AI Agents to enter an independent "audit phase" and self-review their code before outputting the final result.
Traditional AI coding is often "generate and output," which allows errors and biases to slip through. Blind Auditor introduces a middle layer:
rules.json.rules.json) into the generation process, which is more effective than simple Prompts.This project requires Python 3.10+ and uv.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Enter project directory
cd blind-auditor
# Install dependencies (automatically creates virtual environment)
uv sync
rules.json)Create or edit rules.json in the project root. This is the auditor's "Rulebook".
{
"project_name": "MyCoreProject",
"strict_mode": true,
"max_retries": 3,
"rules": [
{
"id": "SEC-001",
"severity": "CRITICAL",
"description": "Strictly prohibit hardcoding any API Keys, passwords, or sensitive Tokens.",
"weight": 50
},
{
"id": "PERF-001",
"severity": "WARNING",
"description": "Avoid database queries or IO operations inside loops.",
"weight": 15
},
{
"id": "STYLE-001",
"severity": "PREFERENCE",
"description": "Use snake_case for variable names.",
"weight": 5
}
]
}
Configuration Fields:
severity:
CRITICAL: Fatal error. If found, the audit fails immediately. Usually carries a high penalty.WARNING: Warning. Moderate penalty; accumulation can lead to failure.PREFERENCE: Style preference. Low penalty.weight: The penalty points deducted when this rule is violated (Total score: 100).To ensure the Agent knows it must use this tool, add the following instruction to your .cursorrules or IDE System Prompt settings:
# Blind Auditor Protocol
**CRITICAL INSTRUCTION**:
You are integrated with the **Blind Auditor MCP**.
Whenever you generate code for a user request, you **MUST NOT** output the code block directly to the user.
**Execution Protocol**:
1. **Draft**: Generate the code internally in your thought process.
2. **Submit**: Call the `submit_draft` tool with your code and language.
3. **Obey**: The tool will return a strict "Audit Instruction". You MUST follow it exactly to audit your own code.
4. **Finalize**: Only when the tool returns "โ
AUDIT PASSED" can you display the final code to the user.
**Prohibited**:
- Do NOT output code blocks before passing the audit.
- Do NOT skip the audit step for "simple" changes.
Add the following to your MCP client configuration file (e.g., claude_desktop_config.json or IDE settings):
Note: Replace /path/to/your/blind-auditor with the actual absolute path where you cloned this repository.
{
"mcpServers": {
"blind-auditor": {
"command": "uv",
"args": ["run", "--directory", "/path/to/your/blind-auditor", "blind-auditor"]
}
}
}
submit_draftSubmit a code draft.
code (content), language (programming language)submit_audit_resultSubmit your audit conclusion.
Input:
passed (bool): Whether you believe it passed.issues (list): List of issues found.score (int): Score from 0-100.Behavior:
subgraph Isolation ["Thinking Isolation"] Agent -->|3. Self-Review| Agent Agent -->|4. submit_audit_result| MCP end
MCP -->|5. Verdict| Decision{"Passed?"}
Decision -->|No - Issues Found| Retry["Retry Count +1"] Retry -->|Limit Not Reached| Fix["Agent Fixes Code"] Fix -->|Resubmit| Agent
Decision -->|Yes - Score >= 80| Final["โ Output Final Code"]
Retry -->|Limit Reached| Force["โ ๏ธ Force Output - With Warning"]
## โ Troubleshooting
**Q: The Agent always outputs code directly without calling tools.**
A: Check if the System Prompt is configured correctly. You must explicitly tell the Agent "Do NOT output code directly". You can also manually remind it in the chat: "Please audit via Blind Auditor first".
**Q: Why does it fail even if I give the code 100 points?**
A: Check if any `CRITICAL` rules in `rules.json` were triggered. Current logic mainly relies on the `score` passed by the Agent, but if `passed` is `True` while `score < 80`, the system will force a rejection.
**Q: Which programming languages are supported?**
A: Theoretically, all languages are supported. Blind Auditor itself does not parse code syntax but relies on the Agent's understanding to match descriptions in `rules.json`.
---
## ๐ ๏ธ Development Guide
```bash
# Run server
uv run blind-auditor
# Or run directly with Python module
uv run python -m src.main
# Debug mode (output to stderr)
# View print statements in src/main.py
MIT License
Install via CLI
npx mdskills install Sim-xia/blind-auditorBlind Auditor - MCP Server is a free, open-source AI agent skill. "Code -> audit -> amend -> audit again -> pass." Blind Auditor is a mandatory code auditing system built on the MCP (Model Context Protocol). It uses a unique "Thinking Isolation" mechanism to force AI Agents to enter an independent "audit phase" and self-review their code before outputting the final result. Traditional AI coding is often "generate and output," which allows errors and biases to sl
Install Blind Auditor - MCP Server with a single command:
npx mdskills install Sim-xia/blind-auditorThis downloads the skill files into your project and your AI agent picks them up automatically.
Blind Auditor - MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.