# Audit a codebase for bugs, risks, and tech debt

A systematic review of a repository with prioritized findings and a remediation plan.

- Topic: Software Development
- Framework: RTF
- Level: Standard
- Tags: Coding, Analyze, Plan, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/audit-a-codebase-for-bugs-risks-and-tech-debt

## Prompt

```text
Audit this codebase.

**Scope:** [whole repo / specific modules]
**Language and framework:** [STACK]
**Code:** [paste files or point me to the repo structure and key files]
**Priorities:** [security / reliability / performance / maintainability]

Check for: bugs and logic errors, security vulnerabilities (OWASP Top 10, secrets, injection, auth), error handling, performance problems, concurrency issues, dead code, duplication, outdated or risky dependencies, test coverage gaps, and documentation gaps.

Return:
| # | Finding | File/line | Severity | Evidence | Fix |
Then a remediation roadmap: fix now / next sprint / later.

Report only issues you can see in the code; don't speculate about files you haven't seen.
```

## What to fill in

- whole repo / specific modules
- STACK
- paste files or point me to the repo structure and key files
- security / reliability / performance / maintainability

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
