Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
让AI互相「找茬」— Multi-model AI code assistant for VS Code with hallucination prevention. Generate + Review + Rule Check pipeline. Fork it, hack it, make it yours!
Jump to setup instructionsGitHub checked 843h ago - refresh overdue
🌍 English | 中文 | 日本語 | Deutsch | Français | Español | Português | 한국어 | Русский | العربية | Italiano | Türkçe | हिन्दी | ภาษาไทย | Tiếng Việt
Let AIs find each other's mistakes. — Multi-model AI code assistant for VS Code with hallucination prevention.
Real dev scene: me coding in the trenches, AIs reviewing from the sidelines
Fork it, hack it, make it yours! Contributions welcome!
AI Guard uses a three-stage pipeline to generate safer, more reliable AI-assisted code:
By using different models for generation and review, AI Guard catches hallucinations and errors that a single model might miss.
.ai-guard/rules/Ctrl+Shift+G (Cmd+Shift+G on Mac) to run the full pipeline| Command | Description |
|---|---|
AI Guard: Generate Code | Generate code from a prompt |
AI Guard: Review Selection | Review selected code |
AI Guard: Run Full Pipeline | Generate + Review + Rule Check |
AI Guard: Show Review Diff | Display diff between generated and reviewed code |
AI Guard: Configure Models | Open model configuration panel |
AI Guard supports any OpenAI-compatible API endpoint. Configure via VS Code settings:
{
"aiGuard.productionModel.endpoint": "https://api.openai.com/v1",
"aiGuard.productionModel.model": "gpt-4o",
"aiGuard.productionModel.apiKey": "your-key",
"aiGuard.reviewModel.endpoint": "https://api.openai.com/v1",
"aiGuard.reviewModel.model": "claude-sonnet-4-20250514",
"aiGuard.reviewModel.apiKey": "your-key"
}
| Setting | Default | Description |
|---|---|---|
aiGuard.rules.enableBuiltIn | true | Enable built-in rules |
aiGuard.rules.enableEslint | true | Use ESLint for static analysis |
aiGuard.rules.customRulesPath | .ai-guard/rules | Custom rules directory |
aiGuard.rules.enableImportValidation | false | (Legacy) Check if imports exist |
aiGuard.rules.enableSyntaxCheck | false | (Legacy) Validate syntax |
aiGuard.rules.enableSecurityPatterns | false | (Legacy) Detect security issues |
| Setting | Default | Description |
|---|---|---|
aiGuard.pipeline.autoReview | true | Auto-run review after generation |
aiGuard.pipeline.autoRuleCheck | true | Auto-run rules after generation |
aiGuard.pipeline.showDiffOnIssues | true | Show diff when issues found |
aiGuard.pipeline.stageOrder | ["ruleCheck", "review"] | Order of post-generation stages |
aiGuard.pipeline.skipReviewOnError | true | Skip AI review when rule check finds errors (saves tokens) |
You can configure multiple review agents to run in parallel. When set, this overrides the single reviewModel:
{
"aiGuard.reviewAgents": [
{
"name": "Claude",
"endpoint": "https://api.anthropic.com/v1",
"model": "claude-sonnet-4-20250514",
"apiKey": "your-key"
},
{
"name": "DeepSeek",
"endpoint": "https://api.deepseek.com/v1",
"model": "deepseek-chat",
"apiKey": "your-key"
}
]
}
## Custom Rules
Create `.js` files in `.ai-guard/rules/`:
```javascript
module.exports = {
id: 'my-rule',
name: 'My Custom Rule',
description: 'What this rule checks',
async check(context) {
const issues = [];
// Analyze context.code, context.language, etc.
return { issues };
}
};
npm install
npm run build # Build extension
npm run watch # Watch mode
npm run package # Package as .vsix
src/
├── extension.ts # Entry point
├── config/ # Settings management
├── models/ # AI model providers (OpenAI-compatible)
├── pipeline/ # Three-stage pipeline engine
│ ├── generate-stage # Stage 1: Code generation
│ ├── review-stage # Stage 2: AI review
│ └── rule-check-stage # Stage 3: Rule validation
├── rules/ # Hallucination detection rules
│ ├── built-in/ # Import, syntax, security checks
│ └── custom/ # Custom rule loader
├── diff/ # Diff visualization
└── ui/ # Sidebar, status bar, settings panel
See CONTRIBUTING.md for guidelines.
GitHub checked 232h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.