- Home
- Skills
- Code Quality & Review
- Codebase Doctor
Works with the AI Agents you already use
Codebase Doctor
Read-only, evidence-linked codebase diagnosis with a prioritized fix plan. Never touches your files.
$9.99
Codebase Doctor
Example session with this skill installed
I just inherited this Express/TypeScript repo. I'm worried about auth bypasses and tech debt in the /services folder. Give me a diagnostic report.
- Read your context and instructions
- Compiled the codebase doctor
I have completed a read-only audit of the /services directory. I focused on authentication middleware integration and service-layer coupling.
Codebase Diagnosis Report
Executive Summary
The codebase follows a standard service pattern but suffers from inconsistent authorization enforcement at the service boundary. High-risk findings include a check-then-act race condition in the subscription logic and leaked internal error messages.
Prioritized Findings
| ID | Finding | Impact | Confidence | Evidence |
|---|---|---|---|---|
| SEC-01 | Missing Auth Guard | High | High | services/UserService.ts:42 - updateProfile lacks session validation. |
| REL-01 | Race Condition | Med | High | services/PaymentService.ts:110 - Quota checked before insert without DB lock. |
| PERF-01 | N+1 Query Risk | Med | Med | services/OrderService.ts:15 - Map function executes DB calls in a loop. |
| MAINT-01 | Circular Dependency | Low | High | services/AuthService.ts <-> services/EmailService.ts |
Architecture & Maintainability
The project uses a flat service structure. While easy to navigate, AuthService is becoming a "God Object" with 1,500+ LOC, making unit testing difficult. Dependency direction is generally correct, but several services directly import Express.Request, tightly coupling business logic to the web framework.
Staged Remediation Plan
Critical: Add middleware validation to UserService.ts and wrap the PaymentService quota check in a database transaction.
2. High: Refactor OrderService to use a single JOIN query for batch data retrieval.
3. Medium: Extract email templates from EmailService to decouple it from AuthService triggers.
Next steps
- Would you like a detailed implementation plan for the SEC-01 auth fix?
- Shall I perform a deeper trace on the
/controllersfolder to see if validation is handled there instead?
Connects securely to your tools. The creator never sees your data.
About this skill
Inheriting a legacy codebase or preparing a project for handover is high-risk. This skill provides a read-only, evidence-backed diagnostic report that identifies bugs, security holes, and architectural debt without ever touching your source files.
What it does
- Vulnerability detection identifies authorization flaws, injection points, and unsafe secret handling with cited line numbers.
- Reliability auditing flags race conditions, improper error propagation, and unhandled state transitions in complex workflows.
- Performance profiling finds algorithmic bottlenecks, repeated I/O patterns, and unbounded data risks.
- Architecture mapping analyzes module coupling, dependency directions, and maintainability hurdles in inherited repositories.
- Remediation planning delivers a prioritized list of fixes ranked by impact and likelihood.
How it works
- Scope the audit by defining the directory or specific technical concern.
- Map the repository structure, entry points, and dependency manifests.
- Trace data flow and control logic through validation and persistence layers.
- Assess findings against edge cases like empty inputs, Unicode look-alikes, and concurrency limits.
- Generate a report linking every finding to file paths and stable symbols.
Frameworks & tools
Works with any language or framework. Uses standard file-reading tools and read-only shell commands like git, grep, and rg. It can inspect node_modules, site-packages, or vendor directories to verify library behavior.
Why this beats prompting it yourself
Generic prompts often result in "hallucinated" bugs or vague stylistic advice. This skill enforces a strict evidence-check workflow that requires cited line numbers and confidence ratings, ensuring you only spend time on defensible issues.
Use cases
- Audit an inherited codebase to map technical debt and high-risk modules.
- Perform a pre-handover health check before delivering a project to a client.
- Debug flaky production issues by tracing cross-system lifecycles and race conditions.
- Sanity check security boundaries on new features before they hit code review.
Known limitations
Does not execute code, run tests, or perform dynamic analysis. Cannot access network resources or provide exhaustive security certifications. Findings are based on static inspection and inference.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Read-only static analysis only. Cannot run tests, benchmarks, or migrations. Does not provide legal or formal security certification. Requires file-system access.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 16 days ago
- Software
Git