Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

commit-archaeologist

/commit-archaeologist

Odtwarza, dlaczego kod istnieje, na podstawie lokalnej historii git: commit wprowadzający, późniejsze zmiany i prawdopodobny zamiar.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/archaeologist.py

Co robi i kiedy

Odtwarza, dlaczego kod istnieje, na podstawie lokalnej historii git: commit wprowadzający, późniejsze zmiany i prawdopodobny zamiar.

Wyzwalacze z opisu

why does this code existwho wrote this function and whyexplain the history of this function
Oryginalny opis (EN)

Reconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite, refactor, or risky edit. Runs entirely locally.

Jak działa

  1. When to use
  2. When not to use
  3. Gather the target
  4. Run the dig
  5. Read the JSON
  6. Write the report
  7. Evidence rules
  8. Follow-ups
  9. Files
Sekcje z nagłówków SKILL.md, w oryginale · 119 linii, 756 słów
Podgląd SKILL.md
---
name: commit-archaeologist
description: >-
  Reconstructs why code exists from local git history, including the introducing
  commit, later changes, current authors, repeated companion files, and likely
  intent. Use when the user asks "why does this code exist", "who wrote this
  function and why", or to "explain the history of this function" before a
  rewrite, refactor, or risky edit. Runs entirely locally.
license: Apache-2.0
metadata:
  author: "Matt Van Horn"
  version: "1.0.0"
  source: "https://github.com/Shubhamsaboo/awesome-llm-apps"
---

# Commit Archaeologist

`git blame` names the last person to touch a line. This skill reconstructs the
reason the line exists. It traces a file or current line range through local git
history, identifies its origin and later edits, finds files that repeatedly
changed beside it, and extracts intent clues from commit messages.

Everything runs locally. No network calls, API keys, or repository writes.

## When to use

- The user asks why a block, function, or file exists
- The user wants to know who introduced code and what changed afterward
- A rewrite or refactor needs historical constraints and change risks
- A workaround, temporary branch, or surprising design choice needs context

## When not to use

- The user only wants raw blame output or a commit list
- The task is to squash, delete, or rewrite git history
- The repository is remote and has not been cloned locally
- The question is about project-wide architecture rather than one file or region

## Gather the target

Get the repository path and tracked file path. Use a line range when the user
names a current block or function. If either path is missing, ask only for the
missing value. Do not scan sibling repositories.

Paths should be relative to the repository and use forward slashes. Line ranges
use inclusive current line numbers such as `40-72`.

## Run the dig

From this skill directory:

```bash
python3 scripts/archaeologist.py /path/to/repo src/cache.py --lines 40-72 --json
```

For the complete history of a file, omit `--lines`:

```bash
python3 scripts/archaeologist.py /path/to/repo src/cache.py --json
```

The script is read-only. With a range it uses git line-log; without one it uses
file history with rename following. It also reads current authorship with blame.
If it rejects a path or range, report that error and ask for a corrected target.

Before interpreting the JSON, read
`references/reading-git-history.md`. Its confidence rules prevent blame
ownership, correlation, and commit-message hints from becoming false certainty.

## Read the JSON

- `region`: normalized repository, current and historical paths, mode, range,
  and co-change threshold
- `introduced_by`: oldest commit in the selected history
- `timeline`: commits ordered oldest to newest, with category, changed files,
  and detected renames
- `co_changed`: files present beside the target in enough selected commits
- `authors`: current blamed lines and historical commit counts, kept separate
- `intent_signals`: issue references, reverts, workarounds, temporary markers,
  and unfinished-work markers found in commit messages

An empty signal list means the messages do not say why. It does not mean the
change had no reason.

## Write the report

Turn the JSON into a short "why this code exists" report:

1. **Bottom line.** One or two sentences with the most likely explanation and
   a confidence label: high, medium, or low.
2. **Origin.** Introducing hash, date, author, subject, and the neighboring
   files that make the initial purpose clearer.
3. **Timeline.** Oldest to newest. Group mechanical edits when they do not
   change the story, but preserve reverts, fixes, and workarounds.
4. **Companion files.** Explain repeated co-changes as a coupling clue. Do not
   treat a one-off file in `changed_files` as a dependency.
5. **Intent evidence.** Quote short commit subjects or signal words. Label any
   conclusion beyond those facts as an inference.
6. **Change risk.** Name the constraints, companion files, and unresolved
   temporary choices worth checking before an edit.

Keep hashes short in prose, but preserve enough characters to identify them.
Do not dump the full JSON unless the user asks.

## Evidence rules

- Current blame ownership is not proof of original authorship.
- The oldest selected commit is the region's introduction, not always the
  file's first commit.
- Repeated co-change suggests coupling; it does not prove a dependency.
- Commit categories are message heuristics, not verified issue types.
- "Temporary" and "workaround" are strong intent clues, but only the message
  author or linked discussion can confirm whether the constraint still applies.
- If the history is thin or messages are vague, say "the history shows" and
  "likely" instead of inventing a design rationale.

## Follow-ups

End by offering one relevant follow-up, such as:

- "Want me to assess whether this looks deliberate or accidental?"
- "Want me to map what could break if this region changes?"

For a deliberate-choice question, weigh repeated edits, issue references,
reverts, and explicit constraint words. For a change-risk question, inspect the
repeated co-change files and the last behavior-changing commits before proposing
edits. Do not modify code until the user asks.

## Files

- `scripts/archaeologist.py`: offline git history walker and JSON report builder
- `references/reading-git-history.md`: interpretation and confidence guide
Pliki w paczce (4)
  • README.md 2 KB
  • SKILL.md 5 KB
  • references/reading-git-history.md 4 KB
  • scripts/archaeologist.py 13 KB

Wersje

W bazie nie ma innych skilli o nazwie commit-archaeologist.

Migawka bazy z 13.11.2026 · wersja paczki c73e0beea4b1 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100archaeologist
    Wyjaśnia, dlaczego dany kod istnieje i jaka jest jego historia, łącząc historię gita, pamięć i lekturę kodu, wyłącznie w trybie do odczytu.
  • 90git-commit-push
    Zapisuje commit i wypycha bieżące zmiany do repozytorium, sprawdzając wcześniej, co trafi do historii.
  • 100commit
    Pisze komunikat commita i tworzy git commit dla bieżących zmian.
  • 86commit
    Tworzy commit w gicie dla bieżącego zadania, gdy użytkownik o to poprosi.
  • 81commit
    Zapisuje bieżące zmiany z repozytorium git jako commit, po przejrzeniu tego, co się zmieniło.
  • 100git-commit
    Zatwierdza przygotowane zmiany commitem z komunikatem w formacie conventional commit.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.