This is a submission for the GitHub Copilot CLI Challenge
What I Built
RepoDoctor - Your Repository's AI Doctor π©Ί
RepoDoctor is a Copilot-first CLI tool that revolutionizes how developers analyze and maintain their codebases. Instead of relying on rigid, hardcoded rules like traditional static analysis tools, RepoDoctor acts as an intelligent orchestrator that delegates all analysis logic to GitHub Copilot CLI.
Think of it as having an AI-powered code doctor that:
- π 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's 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 configuration 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 their code quality.
Project Links
- GitHub Repository: https://github.com/k1lgor/RepoDoctor
- PyPI Package: https://pypi.org/project/repodoc/
- Documentation: https://github.com/k1lgor/RepoDoctor/blob/main/README.md
Demo
Quick Installation & Usage
# Install from PyPI
pip install repodoc
# Install from uv
uv install repodoc
# Use repodoc without installation
uv tool run repodoc
# Analyze repository bloat
repodoc diet
# Generate onboarding guide
repodoc tour
# Run full health scan
repodoc scan
# Generate beautiful report
repodoc report
My Experience with GitHub Copilot CLI
Building RepoDoctor was a transformative experience that fundamentally changed how I approach software development. GitHub Copilot CLI wasn't just a tool I usedβit became the core architecture of my entire application.
The Copilot-First Architecture
Instead of building traditional static analysis with hardcoded rules, I had a radical idea: What if the AI itself is the analysis engine?
This led to RepoDoctor's unique architecture:
- Prompt Templates - Each analysis type (diet, tour, docker, etc.) has a carefully crafted prompt
- Workflow Orchestration - RepoDoctor manages file discovery, data collection, and output formatting
- AI Delegation - All actual analysis logic is delegated to GitHub Copilot CLI
- Schema Validation - Pydantic schemas ensure the AI returns structured, reliable data
How I Used GitHub Copilot CLI
1. Prompt Engineering as Code
I created a sophisticated prompt template system that provides 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
2. Iterative Development with Copilot CLI
During development, Copilot CLI helped me:
Code Generation:
- Generated boilerplate for CLI commands with Typer
- Created Pydantic schemas for each analysis type
- Built async orchestration code for subprocess management
Debugging:
# When tests failed, I asked Copilot:
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?"
3. 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
This would have taken hours to write manually, but Copilot CLI generates it in seconds with context-aware understanding of the codebase.
Leveraging Agent Skills
One of my secret weapons during development was my 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 GitHub Copilot CLI through complex workflows.
These skills transformed GitHub Copilot CLI from a general assistant into a team of specialized experts, each bringing deep domain knowledge to different aspects of the project. It's like having a senior developer, tech writer, QA engineer, and DevOps specialist all working together!
Virtual Company is open source: https://github.com/k1lgor/virtual-company
Impact on My Development Experience
Before GitHub Copilot CLI:
- β Spent hours writing static analysis rules
- β Struggled with complex regex patterns
- β Wrote boilerplate code manually
- β Context-switched between docs and coding
With GitHub Copilot CLI + Virtual Company Skills:
- β 10x faster development - Instant code generation and debugging
- β Expert-level guidance - Each skill provides specialized domain knowledge
- β Better architecture - Copilot with tech-lead skill suggested async patterns I wouldn't have considered
- β Fewer bugs - AI-reviewed code with bug-hunter skill before I even ran it
- β More creativity - Spent time on features, not implementation details
- β Continuous learning - Copilot taught me new Python patterns and best practices
- β Comprehensive testing - Test-genius skill helped achieve 48 passing tests with proper mocking
The Meta Experience
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 (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 hardcode it
Try RepoDoctor Today!
uv install repodoc
cd your-project
repodoc scan
GitHub: https://github.com/k1lgor/RepoDoctor
PyPI: https://pypi.org/project/repodoc/
Built with β€οΈ and π€ by @k1lgor using GitHub Copilot CLI





Top comments (0)