audit_code_snippet
Analyze source files for circular dependencies, coupling/instability, and production anti-patterns, then return a health score and prioritized findings.
Instructions
Analyze one or more source files for circular module dependencies (Tarjan SCC), coupling/instability metrics (Ca/Ce/I), and 12 production reliability/security/SOLID anti-patterns (N+1 loops, missing HTTP timeouts, unbounded caches, check-then-act races, missing idempotency keys, SQL/command injection, God classes). Returns a 0-100 health score, prioritized findings, and Mermaid dependency graph.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"files": "<files>"
},
"name": "audit_code_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | List of files with relative paths and source text. | |
| maxFileLines | No | Optional LOC threshold for God File detection (default 500). |