Install
openclaw skills install @43622283/li-vibe-codebase-auditComprehensive automated and multi-model AI security audits for AI-generated codebases, checking vulnerabilities, secrets, dependency risks, and config issues.
openclaw skills install @43622283/li-vibe-codebase-auditComprehensive security auditing for AI-generated codebases - Automated vulnerability scanning and multi-model AI consensus auditing.
Supports OpenCode, Hermes, OpenClaw, and other agentic AI systems with standardized MCP tool interface.
This skill provides comprehensive security auditing capabilities for "vibe coded" projects (AI-generated code) through multiple approaches:
Use Cases:
vibe_audit_scan - Automated Pattern ScannerDescription: Fast local security scan using pattern matching and static analysis.
Parameters:
project_path (string, required): Path to the project directory to auditoutput_format (string, optional): Report format - "json", "markdown", or "console" (default: "json")severity_threshold (number, optional): Minimum severity to report (1-5, default: 3)Returns:
{
"risk_score": 0-100,
"risk_level": "SAFE|LOW|MEDIUM|HIGH|CRITICAL",
"total_findings": number,
"findings_by_severity": {
"critical": number,
"high": number,
"medium": number,
"low": number
},
"detailed_findings": [...]
}
Risk Score Calculation:
Example Usage:
# In OpenCode/Hermes/OpenClaw
result = vibe_audit_scan(
project_path="/path/to/project",
output_format="markdown",
severity_threshold=3
)
vibe_audit_multi_model - AI Consensus AuditorDescription: Multi-model AI audit using Claude, GPT-4, and Gemini via OpenRouter API.
Parameters:
project_path (string, required): Path to the project directory to auditmodels (array of strings, optional): AI models to use - default: ["claude", "gpt4", "gemini"]openrouter_api_key (string, optional): OpenRouter API key (or use env var OPENROUTER_API_KEY)consensus_mode (string, optional): How to determine consensus - "conservative" (max score) or "average" (default: "conservative")Returns:
{
"consensus_risk_score": 0-100,
"consensus_risk_level": "SAFE|LOW|MEDIUM|HIGH|CRITICAL",
"private_data_found": boolean,
"publish_safe": "YES|NO|WITH_FIXES",
"model_results": {
"claude": {...},
"gpt4": {...},
"gemini": {...}
},
"all_findings": [...]
}
Prerequisites:
OPENROUTER_API_KEY environment variable)Example Usage:
result = vibe_audit_multi_model(
project_path="/path/to/project",
models=["claude", "gpt4"],
consensus_mode="conservative"
)
vibe_audit_full - Complete Security WorkflowDescription: Automated scan followed by multi-model consensus audit.
Parameters:
project_path (string, required): Path to the project directory to auditauto_fix_suggestions (boolean, optional): Generate fix suggestions for findings (default: true)Returns: Combined results from both audit methods plus actionable recommendations.
Workflow:
| Risk Level | Score Range | Action Required |
|---|---|---|
| ✅ SAFE | 0-19 | Safe to publish |
| 🟡 LOW | 1-19 | Minor issues, review recommended |
| 🟠 MEDIUM | 20-49 | Review and fix issues before publishing |
| 🔴 HIGH | 50-79 | Significant issues, fixes required |
| ⛔ CRITICAL | 80-100 | DO NOT PUBLISH - severe security risks |
{
"tools": ["vibe_audit_scan", "vibe_audit_multi_model", "vibe_audit_full"],
"context": "security_audit",
"auto_invoke": "pre_publish"
}
skill: li_vibe_codebase-audit
capabilities:
- static_analysis
- multi_model_consensus
- security_patterns
triggers:
- pre_commit
- pre_publish
from skills import VibeCodebaseAudit
audit = VibeCodebaseAudit()
result = audit.scan("/project/path", mode="full")
All tools follow the MCP (Model Context Protocol) specification:
vibe_audit_scan(project_path=".")
Review findings. If risk_score > 20, investigate flagged issues.
vibe_audit_multi_model(project_path=".")
Get AI consensus on publish-readiness.
Once all audits pass, publish with confidence.
Structured data for programmatic use and CI/CD integration.
Human-readable report for documentation and review.
Colored terminal output for interactive use.
# Required for multi-model audit
export OPENROUTER_API_KEY="sk-or-v1-..."
# Optional: customize behavior
export VIBE_AUDIT_VERBOSE=true
export VIBE_AUDIT_MAX_FILE_SIZE=1000000 # 1MB default
Add project-specific security patterns:
{
"custom_patterns": {
"MyAPI Key": "my_api_key_pattern_here",
"Internal Token": "internal_token_regex"
}
}
Default ignored directories:
.git/, node_modules/, __pycache__/.DS_Store, venv/, .venv/dist/, build/# GitHub Actions example
- name: Security Audit
run: |
vibe_audit_scan project_path="." output_format="json"
if [ $(jq '.risk_score' audit-report.json) -gt 50 ]; then
echo "Risk score too high!"
exit 1
fi
projects = ["~/project1", "~/project2", "~/project3"]
for project in projects:
result = vibe_audit_full(project_path=project)
print(f"{project}: {result['risk_level']}")
# Only report HIGH and CRITICAL issues
result = vibe_audit_scan(
project_path=".",
severity_threshold=4 # 4=HIGH, 5=CRITICAL
)
| Agent | Integration Type | Features |
|---|---|---|
| OpenCode | Native skill | All tools, auto-discovery |
| Hermes | Plugin | Static analysis, consensus |
| OpenClaw | Module | Full API, custom workflows |
| Generic MCP | Protocol | Standard MCP interface |
| Claude | Tool calling | Via OpenRouter integration |
| GPT-4 | Tool calling | Via OpenRouter integration |
| Gemini | Tool calling | Via OpenRouter integration |
# Quick check before publishing
result = vibe_audit_scan(project_path=".")
if result['risk_score'] > 20:
print("⚠️ Issues found - review before publishing")
for finding in result['detailed_findings']:
print(f"- {finding['severity']}: {finding['issue']}")
else:
print("✅ Safe to publish")
# Block deployment if critical issues found
- vibe_audit_scan(project_path=".")
- condition: result.risk_level != "CRITICAL"
then: deploy()
else: alert_team()
# Get consensus from multiple AI models
result = vibe_audit_multi_model(
project_path=".",
models=["claude", "gpt4", "gemini"],
consensus_mode="conservative"
)
if result['publish_safe'] == "YES":
publish()
elif result['publish_safe'] == "WITH_FIXES":
apply_fixes(result['required_fixes'])
re_audit()
else:
halt_publish()
The 2023 Tea dating app incident (database credentials leaked in public repo) would have been prevented:
vibe_audit_scan would flag database credentials immediatelyDeveloper uses AI to generate code that references their Obsidian notes:
vibe_audit_scan detects /Users/name/obsidian/vault pathsAI-generated code includes hardcoded API key:
sk-or-v1-... patternIssue: "No files found to scan"
Issue: "OPENROUTER_API_KEY not set"
Issue: "Risk score seems too high"
Issue: "Models disagree on risk level"
MIT License - Use freely for personal and commercial projects.
Future enhancements:
Ship with confidence. Audit with rigor. Vibe in peace. 🚀
| Tool | Speed | Accuracy | Best For |
|---|---|---|---|
vibe_audit_scan | Fast (seconds) | Pattern-based | Quick checks, CI/CD |
vibe_audit_multi_model | Slower (minutes) | AI-powered | Pre-publish validation |
vibe_audit_full | Comprehensive | Both methods | Complete workflow |
Choose based on your needs:
vibe_audit_scanvibe_audit_multi_modelvibe_audit_full