basemind-git-history
Skill125 starsChanged 48 days agoMITView on GitHub
Explore git history without shelling out to git — recent commits, commits touching a path, per-line and per-symbol blame, structural diffs across revisions, churn ranking, and a symbol's history over time. Reach for it whenever the user asks "what changed recently", "who last touched this", "when did this symbol change", "what's the diff between these revs", or "where's the churn".
In this repository10 other files it gives its agents.
- llms.txtllms.txt
- basemind-cliSkill
- basemind-code-searchSkill
- basemind-commsSkill
- basemind-doctorSkill
- basemind-documentsSkill
- basemind-multi-agent-roomSkill
- basemind-scanSkill
- basemindSkill
- basemind-statsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 89
When older commits remain the page returns next_cursor, and says truncated_reason: "span_limit" when it is short or empty: follow the …
- Very specific: line 127
All paths are repository-relative with forward-slash separators.
- Very specific: line 139
When several definitions in the file share the name, symbol is an error listing each with its lines: add line (any line inside the one you …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:b0950be911f013ca357e4427590c291b08d620ffc3e80c32ffd0a834df433b7c
Source-Hash: blake3:607e3840e47d250c023513008342b4e723eff1841b0530d2a109acaf0dc5dbc6
Schema-Version: v1
-->basemind-git-history — git history over the index
basemind indexes git history and resolves blame and diffs at symbol resolution, backed by a
gix history index. Three tools cover it: git_log, git_blame and git_diff. They return
commits, authors, paths, and line/symbol attributions, structured and capped, for a fraction of
the cost of parsing git log / git blame output.
The tools are always loaded: call them directly, no tool search needed. Prefer them over shelling
out to git log, git blame, git status or git diff. Drop to raw git only when no tool covers
the question (staging, rebasing, anything that mutates history).
Tool routing
| Question | MCP call | CLI |
| "What changed recently?" | git_log {} | basemind git log |
| "Which commits touched file F?" | git_log {"path":"src/store.rs","limit":5} | basemind git log --path src/store.rs --limit 5 |
| "Which commits touched a directory?" | git_log {"path":"src/mcp/"} | basemind git log --path src/mcp/ |
| "Which commit mentions X?" | git_log {"query":"fix race"} | basemind git log --query "fix race" |
| "What did this author commit?" | git_log {"author":"ada"} | basemind git log --author ada |
| "When did symbol X change?" | git_log {"path":"src/store.rs","symbol":"open"} | basemind git log --path src/store.rs --symbol open |
| "Show one commit in full" | git_log {"rev":"HEAD~1"} | basemind git log --rev HEAD~1 |
| "Who wrote this file's lines?" | git_blame {"path":"src/store.rs"} | basemind git blame src/store.rs |
| "Who wrote these lines?" | git_blame {"path":"src/store.rs","line":120,"end_line":160} | basemind git blame src/store.rs --line 120 --end-line 160 |
| "Who wrote this symbol?" | git_blame {"path":"src/store.rs","symbol":"open"} | basemind git blame src/store.rs --symbol open |
| "What's dirty in the working tree?" | git_diff {} | basemind git diff |
| "What did I change in file F?" | git_diff {"path":"src/store.rs"} | basemind git diff src/store.rs |
| "Diff a file between revisions?" | git_diff {"path":"src/store.rs","from":"HEAD~1","to":"HEAD"} | basemind git diff src/store.rs --from HEAD~1 --to HEAD |
| "What symbols were added or removed?" | git_diff {"path":"src/store.rs","from":"HEAD~5","structural":true} | basemind git diff src/store.rs --from HEAD~5 --structural |
| "What's HEAD / branch?" | index_status {} | basemind status |
| "Where's the churn?" | CLI only | basemind git churn |
| "Commits whose changed paths match a regex?" | CLI only | basemind git by-path <regex> |
The CLI also keeps shorthands: git recent, git touching <path>, git search <query>,
git show <rev>, git symbol-history <path> <name>, git blame-symbol <path> <name>,
git status, git diff-outline <path>.
Examples
git_log {"limit":5}
→ {"commits":["612df7e3a1c4 chore(release): v0.15.0",
"1779b9902d5e fix(git-history,serve): address code-review findings", …],
"files":{"612df7e3a1c4":{"Cargo.toml":"modified",…},…}, …}
git_blame {"path":"src/scanner.rs","symbol":"process_file"}
→ per-line authorship of that function's span
git_diff {"path":"src/mcp/tools.rs","from":"HEAD~5","structural":true}
→ the symbols in `added` and `removed`, and the count of `common` onesNotes
- The git tools require
basemind serveto be running inside a git repository. Outside one they answer with an error result saying so. - History queries are indexed: commits touching a path resolve in tens of microseconds vs a live
walk. The index auto-builds on first use and is a fraction of the size of
.git. - A
git_loglist commit is the string"<sha12> <summary>"(the sha's first 12 hex digits, which every tool taking a revision resolves), with no author or time. A search byauthorwrites"<sha12> <author>: <summary>", sinceauthormatches part of a name or email and may select several people. A symbol's history writes[introduced]or[removed]after the sha, and[modified]only when a changed commit's summary itself starts with[. A list carries no date:revgives a commit's time. The recent list (no arguments) and a directory list put the files in a top-levelfiles: {"<sha>": {"<path>": "<change>"}}, where a merge lists only what it changed against every parent.revshows one commit with its fullsha,author,author_email, time, messagebodyandfiles. git_logwith no arguments is a recency window; usequeryorauthorto find a commit arbitrarily far back.symbolneedspath.limitdefaults to 20 and caps at 100, andlimit: 0is refused. Apaththat no commit reachable from HEAD touches and that is not on disk is an error, for a file and for a directory.git_logwithpath+symbolreads one window of the commits touching the file per page. When older commits remain the page returnsnext_cursor, and saystruncated_reason: "span_limit"when it is short or empty: follow the cursor until it is absent to reach every change back to the introduction. A symbol the working tree no longer defines still has its history read. A name no commit inspected so far defines either is named inunmatched(with the names the file does define) on each empty page, and is an error on the last page.git_logwith a directorypath(one ending in/) pages the same way, 200 commits per page: an empty page withtruncated_reason: "span_limit"and anext_cursoris not the end of the history, andunmatchedsays when nothing has touched the directory so far and it is not on disk.- A
git_logcursor is refused when the git-history index came up (or stopped answering) since it was issued: the two order commits differently. Restart withoutcursor. git_logwithrevholds the commit's file list tomax_tokensand then setsbudgeted, withomittedcounting the files left out.git_blame:lineandend_lineare 1-based and inclusive, andend_linedefaults toline.revblames at a revision other than HEAD. Asymbolis located in the file as it is atrev, not in the working tree, so its lines (and alinepassed to pick one of several) are that revision's; a symbol that exists only uncommitted is "no symbol ... at HEAD".limitdefaults to 100 hunks, counted after merging, and the list is trimmed tomax_tokens(default 6000), then setsbudgeted.hunksis["<line>[-<end_line>] <sha12>[ <source_path>]", ...], adjacent hunks of one commit merged;source_path, the rest of the row (it may hold spaces), names the file the lines came from when they moved there from another; the line they had there is not given (git_log {rev}andcode_readat that path read the old code).commitsmaps each sha to{author, time, summary}once (timeis unix seconds). A symbol blame also carries the symbol'sline/end_line.git_diff:pathalone is that file's working-tree diff against HEAD;fromdefaults to HEAD andtoto the working tree. The response hasfrom,to(a sha, or"working tree") andhunks, pluspresent_at_from: falsefor a file added sincefromorpresent_at_to: falsefor one deleted byto. A diff is cut at 200 hunks or 128 KiB of hunk text and then setstruncated,truncated_reason(hunk_caporbyte_cap) andomitted(the hunks left out); it has no cursor, so narrow it with a closerfrom/to. A structural diff comparesfromagainst the indexed working tree, takes noto, and returnsadded,removedandcommon, the count of unchanged symbols.git_diff {}lists at most 200 paths per status list, in path order, and leaves an empty list out. A cut status setstruncated,truncated_reason: "path_cap"andomitted; pass a directorypath(one ending in/) for the status under that directory. That narrowed status lists every untracked file on its own and itsis_cleanis about the directory only. A directory that is not on disk and has no changed path under it is an error; so is a directory given without the trailing slash.- All paths are repository-relative with forward-slash separators. Page with
next_cursor->cursor. A cursor continues only the call that returned it (same arguments apart fromlimitandmax_tokens); on another query, or after HEAD moved, the call is an error: repeat it withoutcursor. A shallow clone setstruncatedwithtruncated_reason: "shallow_clone": absence is then inconclusive. Every cut uses the same words:next_cursoralone when a page ended atlimit,budgetedwhen the token budget trimmed it, andtruncated+truncated_reasonfor a cut the caller did not ask for, withomittedcounting the items left out where known. queryis matched against the commit message andauthoragainst the author name and email, each on its own field:{"query":"review","author":"alice"}is commits by alice that mention a review. A search answered before the git-history index is ready covers only the subjects and authors of the newest 10,000 commits and says so:truncatedwithtruncated_reason: "unindexed_scan"; retry shortly.- When several definitions in the file share the name,
symbolis an error listing each with its lines: addline(any line inside the one you mean). - A binary file reports
binary: trueand no hunks, a file over 4 MiBtoo_large: true. A path that leaves the repository is refused. - An argument a tool does not take is rejected with a did-you-mean and the accepted list.
For code structure see basemind-code-search; for document search see basemind-documents; for
agent coordination see basemind-comms.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

