šŸ„ RepoDoctor - AI-Powered Repository Health Analysis with GitHub Copilot CLI

Published: (February 12, 2026 at 03:17 PM EST)
6 min read
Source: Dev.to

Source: Dev.to

RepoDoctor – A Copilot‑First CLI for Codebase Health

RepoDoctor is a Copilot‑first CLI tool that revolutionizes how developers analyze and maintain their codebases. Instead of relying on rigid, hard‑coded rules like traditional static‑analysis tools, RepoDoctor acts as an intelligent orchestrator that delegates all analysis logic to the GitHub Copilot CLI.

Think of it as an AI‑powered ā€œcode doctorā€ that can:

EmojiCapability
šŸ”Diagnoses bloat – identifies large files, build artifacts, and missing hygiene files
šŸŒŽCreates onboarding guides – generates comprehensive TOUR.md files for new contributors
🐳Audits Dockerfiles – provides security and optimization recommendations
šŸ’€Detects dead code – finds unused code with confidence levels
šŸ”¬Performs health scans – multi‑module analysis with overall health scoring
šŸ“‹Generates reports – beautiful Markdown reports from scan results

What makes RepoDoctor special?

Traditional tools like ESLint, Pylint, or SonarQube use static rules that can’t understand context. They tell you what is wrong but not why or how to fix it in your specific situation.

RepoDoctor is different because:

  • āœ… Contextual AI Analysis – understands your tech stack, project structure, and patterns
  • āœ… Actionable Recommendations – not just ā€œthis is bad,ā€ but ā€œhere’s how to improve itā€
  • āœ… Zero Configuration – no complex rule files or config needed
  • āœ… Extensible Prompts – easy to add new analysis types with prompt templates
  • āœ… Human‑Readable Output – generates documentation, not just error lists

Why it matters to me

As a developer I’ve spent countless hours:

  • Onboarding new team members who struggle to understand large codebases
  • Debugging performance issues caused by bloated repositories
  • Reviewing PRs with potential security issues in Docker configurations
  • Hunting for dead code that clutters the codebase

RepoDoctor solves these pain points by leveraging AI to provide intelligent, context‑aware analysis that actually helps developers improve code quality.

GitHub Repository:
PyPI Package:
Documentation:


Demo

(Insert demo GIF or screenshot here)


Installation

# From PyPI
pip install repodoc

# From uv
uv install repodoc

# Run without installing
uv tool run repodoc

Basic Commands

CommandDescription
repodoc dietAnalyze repository bloat
repodoc tourGenerate onboarding guide
repodoc scanRun full health scan
repodoc reportGenerate beautiful report

Architecture – AI as the Analysis Engine

Building RepoDoctor was a transformative experience that fundamentally changed how I approach software development. The GitHub Copilot CLI became the core architecture of the entire application.

Core Concepts

  1. Prompt Templates – each analysis type (diet, tour, docker, etc.) has a carefully crafted prompt.
  2. Workflow Orchestration – RepoDoctor manages file discovery, data collection, and output formatting.
  3. AI Delegation – all actual analysis logic is delegated to the Copilot CLI.
  4. Schema Validation – Pydantic schemas ensure the AI returns structured, reliable data.

Prompt Engineering as Code

The prompt‑template system supplies Copilot CLI with:

  • Context – file listings, directory structure, key metrics
  • Instructions – clear objectives and output‑format requirements
  • Constraints – what to focus on, what to ignore
  • Examples – sample outputs to guide the AI

Iterative Development with Copilot CLI

During development Copilot CLI helped with:

Code Generation

# Boilerplate for Typer commands
# Pydantic schemas for each analysis type
# Async orchestration for subprocess management

Debugging

copilot "Why is this pytest fixture not mocking shutil.which correctly?"
copilot "How do I handle UTF-8 encoding on Windows for subprocess output?"

Architecture Decisions

copilot "Should I use sync or async for subprocess calls to GitHub Copilot CLI?"
copilot "What's the best way to cache analysis results for the report command?"

AI‑Powered Documentation Generation

The tour command is my favorite feature—it uses Copilot CLI to generate comprehensive onboarding guides by analyzing:

  • Project structure
  • Code patterns
  • Tech stack
  • Dependencies
  • Common workflows

What would take hours to write manually is produced in seconds with context‑aware understanding of the codebase.


Virtual Company – A Collection of Specialized Agent Skills

One of my secret weapons was the Virtual Company project—a collection of 27 specialized agent skills that enhance AI agents with domain‑specific expertise. These skills act as expert personas that guide Copilot CLI through complex workflows, turning it into a team of specialized experts (senior developer, tech writer, QA engineer, DevOps specialist, etc.).

Virtual Company (open source):

Before Copilot CLI + Virtual Company

āŒIssue
Spent hours writing static analysis rules
Struggled with complex regex patterns
Wrote boilerplate code manually
Context‑switched between docs and coding

After Copilot CLI + Virtual Company

āœ…Benefit
10Ɨ faster development – instant code generation & debugging
Expert‑level guidance – each skill provides specialized domain knowledge
Better architecture – async patterns suggested by the tech‑lead skill
Fewer bugs – AI‑reviewed code with the bug‑hunter skill before running
More creativity – time spent on features, not implementation details
Continuous learning – Copilot taught new Python patterns & best practices
Comprehensive testing – test‑genius skill helped achieve 48 passing tests

Happy coding with RepoDoctor – let AI keep your repository healthy!

r mocking

The most mind‑bending part? I built a tool powered by GitHub Copilot CLI, while using GitHub Copilot CLI to build it. 🤯

It was like:

  • Using Copilot CLI to debug Copilot CLI integration
  • Asking Copilot to generate prompts for Copilot
  • Having Copilot help me test code that invokes Copilot

This recursive AI‑assisted development felt like a glimpse into the future of software engineering.


Key Takeaways

  • AI‑First Architecture is Real – RepoDoctor proves you can build production tools with AI as the core logic engine.
  • Prompt Engineering Matters – The quality of your prompts directly impacts output quality.
  • Specialized Skills Amplify AI – Using domain‑specific agent skills (e.g., Virtual Company) accelerates development exponentially.
  • Copilot CLI for Everything – From code generation to debugging to documentation.
  • Ship Faster, Iterate Smarter – Copilot CLI enabled rapid prototyping and validation.
  • The Future is AI‑Native – Tools will increasingly delegate intelligence to AI rather than hard‑code it.

Quick Start

uv install repodoc
cd your-project
repodoc scan

  • GitHub:
  • PyPI:

Built with ā¤ļø and šŸ¤– by @k1lgor using GitHub Copilot CLI.

0 views
Back to Blog

Related posts

Read more Ā»

Cast Your Bread Upon the Waters

!Cover image for Cast Your Bread Upon the Watershttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-t...