Real-time anti-pattern detection for AI coding. Prevents overengineering and costly mistakes. Integrates with Claude for collaborative reasoning. Ideal for operations teams using AI tools.
git clone https://github.com/kesslerio/vibe-check-mcp.gitVibe Check MCP stops you from building expensive mistakes into your codebase by providing real-time anti-pattern detection integrated with Claude. It works like having a team of senior engineers watching over your shoulder, catching decisions before they waste days of development—such as building custom solutions when official APIs exist or getting stuck in error-correction loops. The tool detects infrastructure-without-implementation, symptom-driven development, complexity escalation, and documentation neglect with 87.5% accuracy. It's designed for developers and operations teams using AI coding tools who want to maintain code quality and avoid the common traps of over-reliance on AI suggestions without senior-level review.
[{"step":"Install the vibe-check-mcp tool in your Claude environment. Follow the official documentation to ensure it’s properly configured and has access to your codebase.","tip":"Use the tool’s `--help` flag to explore available options, such as focusing on specific concerns (e.g., security, performance) or enabling verbose mode for detailed explanations."},{"step":"Prepare the code snippet you want to analyze. Highlight the portion of code that feels risky or overengineered, or paste the entire file if unsure. Ensure the snippet is syntactically valid to avoid false positives.","tip":"For large files, focus on the most complex or recently modified sections. The tool works best with focused, self-contained snippets rather than entire repositories."},{"step":"Run the vibe-check by pasting the prompt template into Claude and replacing the placeholders (e.g., [CODE_SNIPPET], [SPECIFIC_CONCERN]). Use the tool’s real-time feedback to iteratively refine the code.","tip":"If the tool flags issues, address them one at a time. Start with critical problems (e.g., security vulnerabilities) before tackling stylistic or structural concerns."},{"step":"Review the tool’s suggestions and implement the recommended changes. Use the provided refactored code as a starting point, but adapt it to fit your project’s conventions.","tip":"After refactoring, rerun the vibe-check to confirm the issues are resolved. This iterative process helps catch edge cases or new anti-patterns introduced during refactoring."},{"step":"Integrate the vibe-check into your CI/CD pipeline or pre-commit hooks to automate anti-pattern detection. Configure it to run on pull requests or before merges to catch issues early.","tip":"Start with a conservative configuration (e.g., only flag critical issues) and gradually expand the scope as the team becomes comfortable with the tool."}]
Prevent building custom authentication systems when established services like Auth0 exist
Catch overengineered solutions and suggest simpler existing approaches mid-development
Stop doom-loop error oscillation where AI fixes create new problems
Validate AI-generated code for security gaps before deployment
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/kesslerio/vibe-check-mcpCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Perform a vibe-check on the following [CODE_SNIPPET] using the vibe-check-mcp tool. Identify any anti-patterns, overengineering risks, or potential pitfalls. Focus on [SPECIFIC_CONCERN: e.g., scalability, maintainability, security, or performance]. Provide actionable feedback to simplify or correct the code. If no issues are found, confirm the code is clean and efficient. [CODE_SNIPPET]: ```[PASTE_CODE_HERE]```
Here’s the vibe-check analysis for the provided code snippet:
**Code Snippet Analyzed:**
```python
class UserManager:
def __init__(self):
self.users = {}
self.cache = LRUCache(maxsize=1000)
self.logger = Logger("user_manager.log")
self.metrics = MetricsCollector()
self.db_connection = DatabaseConnection("postgres://localhost:5432/users")
def get_user(self, user_id):
if user_id in self.users:
self.metrics.increment("cache_hit")
return self.users[user_id]
user = self.db_connection.query(f"SELECT * FROM users WHERE id = {user_id}")
self.users[user_id] = user
self.cache.put(user_id, user)
self.logger.log(f"Fetched user {user_id} from DB")
return user
```
**Anti-Patterns Detected:**
1. **Overengineering:** The `UserManager` class combines caching, logging, metrics, and database operations into a single class. This violates the Single Responsibility Principle (SRP) and makes the class harder to test and maintain. Consider splitting this into separate classes (e.g., `UserCache`, `UserLogger`, `UserMetrics`).
2. **Security Risk:** The `get_user` method directly interpolates `user_id` into an SQL query, which is vulnerable to SQL injection. Replace with parameterized queries: `self.db_connection.query("SELECT * FROM users WHERE id = %s", (user_id,))`.
3. **Performance Concern:** The `users` dictionary and `cache` are redundant. The `LRUCache` already handles eviction and retrieval, so the `users` dict is unnecessary. Remove it to simplify state management.
4. **Logging Overhead:** Logging every database fetch may create excessive log volume in production. Consider reducing the log level or sampling logs for high-traffic scenarios.
**Suggested Refactor:**
```python
class UserCache:
def __init__(self, maxsize=1000):
self.cache = LRUCache(maxsize=maxsize)
def get(self, user_id):
return self.cache.get(user_id)
class UserRepository:
def __init__(self):
self.db_connection = DatabaseConnection("postgres://localhost:5432/users")
def get_user(self, user_id):
return self.db_connection.query("SELECT * FROM users WHERE id = %s", (user_id,))
class UserService:
def __init__(self, cache: UserCache, repository: UserRepository):
self.cache = cache
self.repository = repository
def get_user(self, user_id):
user = self.cache.get(user_id)
if user:
return user
return self.repository.get_user(user_id)
```
**Next Steps:**
- Split the `UserManager` into smaller, focused classes.
- Replace SQL string interpolation with parameterized queries.
- Test the refactored code to ensure performance and correctness.IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan