From AI Code Generation to AI System Investigation The article introduces AI DB Investigator, a tool designed to help AI systems analyze database problems through a structured, step-by-step investigation process rather than relying on random answer generation. It emphasizes that database issues like slow queries or broken schemas require disciplined diagnosis, as problems often have hidden root causes that manifest gradually. The project aims to shift AI from merely generating code to acting as a careful technical investigator, encoding engineering judgment into a repeatable workflow. AI is very good at generating answers. But when it comes to database problems, raw answers are not enough. A slow query, a missing index, a suspicious schema, a broken relation, or an unclear data model usually cannot be solved by guessing. These problems require investigation. That is why I released AI DB Investigator. GitHub repo: https://github.com/miller-28/skill-ai-db-investigator AI DB Investigator is a skill designed to help AI analyze databases in a more structured way. Instead of asking an AI model a broad question like: Why is my database slow? The goal is to guide the model into a more disciplined investigation flow. A good database investigation usually requires several steps: AI DB Investigator is built around that idea. Not magic. Not guessing. A structured investigation process. I have spent many years working with production systems, especially around backend architecture, PostgreSQL, Redis, APIs, and distributed flows. One thing becomes clear after enough production experience: Database problems are rarely isolated. A performance issue may look like a slow query, but the real cause may be: The database does not fail loudly at first. It whispers. Then it slows down. Then it becomes the center of the fire. So I wanted a skill that helps AI behave less like a random answer generator and more like a careful technical investigator. The core idea is simple: AI should not only answer database questions. It should investigate them. That means the AI should slow down and ask the right technical questions before jumping to conclusions. For example: OFFSET pagination?This is the difference between generic AI assistance and operational AI assistance. AI DB Investigator can help with: It is especially useful when the problem is not yet clearly defined. Sometimes the real value is not the final answer. Sometimes the value is forcing the investigation into the right shape. A lot of AI development today focuses on generation: That is useful. But production work is not only generation. Production work is also diagnosis. A senior engineer spends a lot of time asking: That mindset is hard to capture with a generic prompt. A skill gives the AI a repeatable operating pattern. That is the direction I find interesting: not only using AI to write code faster, but teaching AI how to approach technical systems with discipline. This is not meant to be a huge framework. It is intentionally focused. The purpose is to encode a specific kind of engineering judgment into a reusable form. For me, this is part of a larger shift: Developers are moving from writing every line manually to designing, directing, and refining intelligent workflows. The developer becomes less of a typist and more of an orchestrator. But orchestration only works when the AI has structure. Without structure, AI improvises. With structure, AI can investigate. The project is available here: https://github.com/miller-28/skill-ai-db-investigator Feedback, ideas, issues, and suggestions are welcome. Especially around: Database work rewards patience. The best answers usually come after the right questions. AI DB Investigator is my attempt to give AI a better path through that process. Not just to answer. To investigate.