Repo Analysis Skill
Analyze local repositories to find the best match for a work item based on context.
Process
- •List sibling repos: Find all directories with
.gitin REPOS_BASE_DIR - •For each repo:
- •Pull latest from origin master/main
- •Read README.md and CLAUDE.md if they exist
- •Extract keywords and project descriptions
- •Score against context: Compare repo descriptions against:
- •Work item title
- •Work item description/body
- •PR URL hints (if any)
- •Project name from ADO
- •Output ranked list: Show repos sorted by confidence score
Usage
code
/repo-analysis <work-item-context>
Example:
code
/repo-analysis "Fix video player buffering issue - relates to player SDK"
Output Format
code
Repo Analysis Results: 1. video-player-sdk (95% match) - Keywords: video, player, SDK, streaming - Reason: Title mentions "player SDK" 2. media-services (60% match) - Keywords: media, transcoding, delivery - Reason: Related to video infrastructure 3. web-frontend (30% match) - Keywords: React, UI, components - Reason: May embed player
Implementation Steps
When invoked:
- •Read REPOS_BASE_DIR from environment or use default
../ - •List all directories, check for
.gitsubdirectory - •For each git repo:
- •
git fetch origin(update refs) - •Read
README.mdfirst 500 lines - •Read
CLAUDE.mdif exists - •Extract: project name, description, key technologies
- •
- •Build keyword index per repo
- •Parse work item context for keywords
- •Score each repo (keyword overlap + description similarity)
- •Return top 5 matches with confidence scores