Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

history

БесплатноБез исполняемых скриптовНе проверен

Smart temporal analysis using git history - Hotspots, Coupling, and Recent Contributors

lis186от lis186★ 49 звёзд на GitHub12 установок в других каталогах

Об этом скилле

SourceAtlas: Smart Temporal Analysis (Git History)

Constitution: ANALYSIS_CONSTITUTION.md v1.0

Context

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)

Quick Start

  1. Check cache (skip if --force flag present)
  2. Check code-maat installation (install if needed with permission)
  3. Generate git log (last 12 months, code-maat compatible)
  4. Run analyses: Hotspots, Coupling, Contributors
  5. Risk assessment combining all dimensions
  6. Generate report following output-template.md
  7. Verify output using verification-guide.md
  8. Auto-save to .sourceatlas/history.md

Your Task

You are analyzing git commit history to understand:

  1. Hotspots - Files changed most frequently (likely complex/risky)
  2. Temporal Coupling - Files that change together (hidden dependencies)
  3. Recent Contributors - Who has knowledge of which areas (bus factor)
  4. Risk Areas - Aggregate assessment for prioritization

What You'll Discover

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

Core Workflow

Execute these steps in order. See workflow.md for complete details.

Step 0: Check Prerequisites (30 seconds)

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:

  • "code-maat required for analysis. Install now? (requires Java 8+)"
  • If yes → run ./scripts/install-codemaat.sh
  • If no → show manual installation steps

→ See workflow.md#step-0

Step 1: Generate Git Log (1 minute)

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

Step 2: Hotspot Analysis (2 minutes)

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

Step 3: Temporal Coupling 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

Step 4: Recent Contributors 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

Step 5: Risk Assessment (1 minute)

Purpose: Combine all dimensions into actionable priorities.

Calculate composite risk: (Revisions × Coupling_Count) / Contributor_Count

Risk categories:

  • Bus Factor Risk
  • Complexity Risk
  • Coupling Risk
  • Testing Gap Risk

→ See workflow.md#step-5


Output Format

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
Полный SKILL.md на GitHub

Установить history в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Glob
Grep
Read
Write
AskUserQuestion

Вложенные файлы

output-template.mdreference.mdverification-guide.mdworkflow.md

FAQ

Что делает скилл history?

Smart temporal analysis using git history - Hotspots, Coupling, and Recent Contributors

Как установить скилл history?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл history запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить history с