This skill analyzes git history to identify hotspots, temporal coupling, and recent contributors, delivering actionable risk-based insights for codebases.
npx playbooks add skill lis186/sourceatlas --skill history
> Constitution: [ANALYSIS_CONSTITUTION.md](../../../ANALYSIS_CONSTITUTION.md) v1.0
Analysis Scope: $ARGUMENTS (default: entire repository)
Goal: Extract actionable insights from git history
Time Limit: 5-10 minutes
Prerequisite: code-maat (will ask permission to install if missing)
--force flag present).sourceatlas/history.mdYou are analyzing git commit history to understand:
| Analysis Type | Insight | Business Value |
|---------------|---------|----------------|
| Hotspots | Complexity indicators | Refactoring priorities, technical debt |
| Coupling | Hidden dependencies | Architecture review targets |
| Contributors | Knowledge distribution | Bus factor risks, training needs |
| Risk | Aggregate assessment | Resource allocation decisions |
---
Execute these steps in order. See [workflow.md](workflow.md) for complete details.
Purpose: Ensure code-maat is installed and Java is available.
Check code-maat:
if [ -f "$HOME/.sourceatlas/bin/code-maat-1.0.4-standalone.jar" ]; then
export CODEMAAT_JAR="$HOME/.sourceatlas/bin/code-maat-1.0.4-standalone.jar"
fi
If not found, use AskUserQuestion:
./scripts/install-codemaat.sh→ See [workflow.md#step-0](workflow.md#step-0-check-prerequisites-30-seconds)
Purpose: Create code-maat compatible git log file.
Default: Last 12 months
git log --all --numstat --date=short \
--pretty=format:'--%h--%ad--%aN' \
--after="$(date -v-12m +%Y-%m-%d)" \
> /tmp/git-history.log
If scope specified: Filter to directory (e.g., "src/")
→ See [workflow.md#step-1](workflow.md#step-1-generate-git-log-1-minute)
Purpose: Identify frequently changed files.
Run code-maat revisions:
java -jar "$CODEMAAT_JAR" -l /tmp/git-history.log -c git2 -a revisions
Calculate complexity scores: LOC × Revisions
Identify top 10 hotspots sorted by complexity
→ See [workflow.md#step-2](workflow.md#step-2-hotspot-analysis-2-minutes)
Purpose: Find files that change together.
Run code-maat coupling:
java -jar "$CODEMAAT_JAR" -l /tmp/git-history.log -c git2 -a coupling
Filter significant couplings: degree ≥ 0.5
Categorize: Expected vs Suspicious
→ See [workflow.md#step-3](workflow.md#step-3-temporal-coupling-analysis-2-minutes)
Purpose: Map knowledge distribution across modules.
Run code-maat entity-ownership:
java -jar "$CODEMAAT_JAR" -l /tmp/git-history.log -c git2 -a entity-ownership
Generate knowledge map by area (src/api/, src/core/, etc.)
Identify bus factor risks: Single-contributor modules
→ See [workflow.md#step-4](workflow.md#step-4-recent-contributors-analysis-2-minutes)
Purpose: Combine all dimensions into actionable priorities.
Calculate composite risk: (Revisions × Coupling_Count) / Contributor_Count
Risk categories:
→ See [workflow.md#step-5](workflow.md#step-5-risk-assessment-1-minute)
---
Your analysis should follow this Markdown structure:
🗺️ SourceAtlas: History
───────────────────────────────
📜 [repo name] │ [N] months
**Analysis Period**: [start] → [end]
**Commits Analyzed**: [count]
**Files Analyzed**: [count]
## 1. Hotspots (Top 10)
[Table with Rank, File, Changes, LOC, Complexity Score]
[Insights paragraph]
## 2. Temporal Coupling (Significant Pairs)
[Table with File A, File B, Coupling, Co-changes]
[Expected vs Suspicious coupling analysis]
## 3. Recent Contributors (Knowledge Map)
[Per-area tables with Contributor, Commits, Last Active]
[Bus Factor Risks section]
## 4. Risk Summary
[Risk aggregation table]
[Priority Actions numbered list]
## 5. Recommendations
[Refactoring candidates, knowledge sharing, architecture review]
## Recommended Next
[Dynamic suggestions based on findings]
→ See [output-template.md](output-template.md) for complete specification and examples
---
Follow [ANALYSIS_CONSTITUTION.md](../../../ANALYSIS_CONSTITUTION.md):
---
After generating your analysis, execute verification steps:
Parse output for all quantifiable claims:
verification_summary:
checks_performed: [...]
confidence_level: "high" # high|medium|low
notes: [...]
→ See [verification-guide.md](verification-guide.md) for complete checklist
---
--force.sourceatlas/history.md (fixed path)→ See [reference.md#cache-behavior](reference.md#cache-behavior)
Complete Markdown report auto-saves after verification:
💾 Saved to .sourceatlas/history.md
→ See [reference.md#auto-save-behavior](reference.md#auto-save-behavior)
Based on findings, suggest:
/sourceatlas:impact "[hotspot]"/sourceatlas:flow "[entry point]"/sourceatlas:pattern "[pattern]"→ See [reference.md#handoffs](reference.md#handoffs)
~/.sourceatlas/bin/code-maat-1.0.4-standalone.jar./scripts/install-codemaat.sh→ See [reference.md#code-maat-installation](reference.md#code-maat-installation)
→ See [reference.md#interpretation-guidelines](reference.md#interpretation-guidelines)
---
Detailed documentation available in:
---
Start your output with:
🗺️ SourceAtlas: History
───────────────────────────────
📜 [repo name] │ [N] months
Then follow complete structure in [output-template.md](output-template.md).
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.