Repository navigation
feat(mods): add mods/ and the git-aware-file-explorer Claude Code mod #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MRSchexnayder
wants to merge
61
commits into
main
Choose a base branch
from
feat/git-aware-file-explorer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,914
−6
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
b0a0ea3
feat(mods): add git-aware-file-explorer Claude Code mod
MRSchexnayder 53dafeb
feat(mods): branch bar, line totals, tinted diff and scrolling in git…
MRSchexnayder 1320663
chore(mods): add author to git-aware-file-explorer manifest
MRSchexnayder 98b4d87
docs(mods): add a top-level Mods section with the git-aware-file-expl…
MRSchexnayder 94b4592
fix(mods): filter files outside a git repository in git-aware-file-ex…
MRSchexnayder b42a57e
fix(mods): keep ignored entries in git-aware-file-explorer filters
MRSchexnayder a6d046d
fix(mods): mark git-aware-file-explorer line totals as a minimum when…
MRSchexnayder a7e4024
fix(mods): stop git-aware-file-explorer diff scrolling at the last line
MRSchexnayder 148505c
fix(scripts): check mod documentation coverage in validate_artifact_sync
MRSchexnayder ba338ea
fix(mods): say when a git-aware-file-explorer search stopped at the w…
MRSchexnayder 312ed7c
fix(mods): diff an unborn branch against the empty tree in git-aware-…
MRSchexnayder 558d0ed
fix(mods): run one git-aware-file-explorer scan at a time
MRSchexnayder e527df7
fix(mods): keep the git-aware-file-explorer panel window within the file
MRSchexnayder fd50853
docs(mods): say where git-aware-file-explorer's tsconfig base comes from
MRSchexnayder 4443b57
fix(mods): redraw git-aware-file-explorer when an edit keeps the line…
MRSchexnayder 2c2d081
fix(mods): read the open diff once per scan in git-aware-file-explorer
MRSchexnayder c6c824e
fix(mods): mark git-aware-file-explorer counts when git output is cut
MRSchexnayder 1532259
docs(mods): say what git-aware-file-explorer's settle does
MRSchexnayder a7079b1
fix(scripts): report mod folders without a plugin manifest
MRSchexnayder f098dc5
fix(scripts): check mod docs coverage when no mods remain
MRSchexnayder 27f71c8
fix(mods): say when a git-aware-file-explorer filter searched a cut f…
MRSchexnayder e8aaa25
fix(mods): show a deleted-then-recreated path as one change in git-aw…
MRSchexnayder 8f164d4
fix(mods): mark git-aware-file-explorer's added total when a new file…
MRSchexnayder 87b4c25
fix(mods): mark a recreated file too large to diff in git-aware-file-…
MRSchexnayder 0a132fa
fix(mods): never walk into a linked folder in git-aware-file-explorer
MRSchexnayder 7be2176
fix(mods): show an unreadable file as unreadable in git-aware-file-ex…
MRSchexnayder c348f93
fix(mods): mark a cut list of ignored files in git-aware-file-explorer
MRSchexnayder f293efc
fix(mods): keep a scrolled tree reachable with a file open in git-awa…
MRSchexnayder 6a771ca
fix(mods): open a diff of millions of lines in git-aware-file-explorer
MRSchexnayder 05938ca
fix(mods): count a recreated file with a quoted name once in git-awar…
MRSchexnayder 3c554ea
fix(mods): say a filter does not search inside ignored folders in git…
MRSchexnayder 0ee75d4
fix(scripts): count a mod as listed only from a table row
MRSchexnayder ccd9121
perf(mods): list a filter's files once per scan in git-aware-file-exp…
MRSchexnayder 0c9455c
fix(mods): say when a filter could not read a folder in git-aware-fil…
MRSchexnayder be30d3d
fix(mods): mark the added total when a new file can't be stat'd in gi…
MRSchexnayder c81fa4e
fix(mods): show a failed git status as unavailable in git-aware-file-…
MRSchexnayder 8c571b1
fix(mods): show why git could not read the workspace in git-aware-fil…
MRSchexnayder 5f96d2e
fix(mods): mark a diff git could not make in git-aware-file-explorer
MRSchexnayder d7a238f
fix(mods): rescan after a PowerShell call in git-aware-file-explorer
MRSchexnayder 3c7e878
fix(mods): let the wheel reach the tree with a file open in git-aware…
MRSchexnayder 06cf44d
fix(mods): move the side last clicked with the wheel in git-aware-fil…
MRSchexnayder 86227dc
fix(mods): keep two rows of wheel room in git-aware-file-explorer
MRSchexnayder a061f9b
fix(mods): smooth file explorer scrolling
MRSchexnayder 2b3bf57
fix(mods): mark both totals as floors when a recreated file can't be …
MRSchexnayder 9b7f10a
fix(mods): count a new symbolic link as one added line in git-aware-f…
MRSchexnayder 965f258
fix(mods): show a no-index diff error that exits 1 in git-aware-file-…
MRSchexnayder 23c4001
fix(mods): don't strike through a recreated file in git-aware-file-ex…
MRSchexnayder 4e439c0
fix(mods): show git's error for a recreated file it can't diff in git…
MRSchexnayder 95f190a
fix(mods): reopen a file edited while closed fresh in git-aware-file-…
MRSchexnayder c99b8ea
fix(mods): mark a folder it can't list as unreadable in git-aware-fil…
MRSchexnayder b43461b
fix(mods): find files added outside git while a filter is on in git-a…
MRSchexnayder cf3af77
fix(mods): rescan the tree when HEAD moves in git-aware-file-explorer
MRSchexnayder 0ecfecc
fix(mods): retry a preview it couldn't read in git-aware-file-explorer
MRSchexnayder 2fe86f2
fix(mods): read an unstaged rename's original path in git-aware-file-…
MRSchexnayder a0b79f0
fix(mods): pass file names to git literally in git-aware-file-explorer
MRSchexnayder 328edbb
fix(mods): open a changed submodule's diff by its name in git-aware-f…
MRSchexnayder 186e6ed
fix(mods): drop a rename record cut off at 4 MiB in git-aware-file-ex…
MRSchexnayder 4253eb3
fix(mods): list a folder it couldn't list again in git-aware-file-exp…
MRSchexnayder 1b1eabc
fix(mods): honor binary attributes for new files in git-aware-file-ex…
MRSchexnayder e14d8ad
fix(mods): say when the workspace root can't be listed in git-aware-f…
MRSchexnayder b18488a
fix(mods): retry a diff git couldn't make in git-aware-file-explorer
MRSchexnayder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Git-Aware File Explorer | ||
|
|
||
| A Files pane for Claude Code that knows about git. It joins the workspace file browser and the | ||
| list of changes into one pane: the tree marks what changed, and selecting a file shows its diff | ||
| in a panel beside the tree. | ||
|
|
||
| - **Mod name:** `git-aware-file-explorer` | ||
| - **Client:** Claude Code (desktop app and terminal) | ||
| - **Source:** [mods/claude/git-aware-file-explorer](https://github.com/CowboyLogic/ai-dev/tree/main/mods/claude/git-aware-file-explorer) | ||
|
|
||
| --- | ||
|
|
||
| ## What it does | ||
|
|
||
| - **Branch bar.** The current branch, the lines added and deleted across all changes, and a count of | ||
| changed files. The count is a toggle that narrows the tree to changed files only. New files count | ||
| as added lines; past 200 new files, or for a new file over 512 KB or one that cannot be read, the | ||
| added total is marked as a minimum (`+1234+`). When git's output passes 4 MB it is cut, or git cannot read a changed file, and the counts drawn from it are marked the same way. | ||
| - **Git-aware tree.** Files and folders with icons, a status letter on each changed file, and a mark | ||
| on every folder that holds a change. Ignored files are dimmed and deleted files struck through. | ||
| A filter box narrows the tree by name; it does not search inside ignored folders, and says so. | ||
| Outside git, searches stop after discovering 20,000 files and folders and report that limit. | ||
| - **Diff panel.** Selecting a changed file shows its diff against `HEAD`, with added and deleted lines | ||
| tinted and the file's own line counts in the header. Selecting an unchanged file shows a preview. | ||
| Smaller previews show the full file; larger previews use fixed sections retained across scrolls. | ||
| The branch bar, filter, tree and file content share one native scrollbar and move together. | ||
| Selecting a file brings the pane back to the top to show its header and first lines. | ||
|
MRSchexnayder marked this conversation as resolved.
|
||
| - **Stays current.** The pane rescans the workspace every few seconds and after each tool call that | ||
| can change files. Between changes, scrolling reuses the prepared tree and open file: it does not | ||
| run git, list folders or reread the file. Diff counts are prepared when the diff is loaded. | ||
|
|
||
| ## Where it applies | ||
|
|
||
| Use it in a git repository when you want to watch an agent's changes land file by file without | ||
| switching between the Files and Changes views. Outside a repository it works as a plain file browser. | ||
|
|
||
| The pane opens at the start of each session. `/git-files` reopens it after it is closed. | ||
|
|
||
| > [!NOTE] | ||
| > The header and both columns scroll together in this version. Native scrolling avoids the desktop | ||
| > movement and snap back caused by trying to keep a mod's header fixed. Platform support for fixed | ||
| > headers and independent scrolling is tracked in [Anthropic issue #99449](https://github.com/anthropics/claude-code/issues/99449). | ||
|
|
||
| --- | ||
|
|
||
| ## Install | ||
|
|
||
| Load the mod's folder as described in [Installing a Claude Code mod](index.md#installing-a-claude-code-mod), | ||
| with `<mod-name>` set to `git-aware-file-explorer`. | ||
|
|
||
| ### Verify installation | ||
|
|
||
| Start a session in a git repository. The **Files** pane opens with the branch bar at the top. If it | ||
| does not, run `/git-files`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Mods | ||
|
|
||
| Mods change an AI client's own interface: panes, panels, status lines, and slash commands that | ||
| the client does not ship with. Where a skill teaches an agent how to do a task, a mod changes | ||
| what you see and use while working with that agent. | ||
|
|
||
| All mod files live at the root of the repository under | ||
| [`mods/`](https://github.com/CowboyLogic/ai-dev/tree/main/mods), in one folder per client. | ||
|
|
||
| --- | ||
|
|
||
| ## Claude Code | ||
|
|
||
| Claude Code mods are plugins built on function hooks: a `plugin.json` manifest and a TypeScript | ||
| hooks module that draws into the client's surfaces. They live under | ||
| [`mods/claude/`](https://github.com/CowboyLogic/ai-dev/tree/main/mods/claude). | ||
|
|
||
| | Mod | What it does | | ||
| |---|---| | ||
| | [Git-Aware File Explorer](git-aware-file-explorer.md) | A Files pane that marks changed files in the tree and shows a file's diff beside it | | ||
|
|
||
| ### Installing a Claude Code mod | ||
|
|
||
| Clone the repository, then load the mod's folder into Claude Code. | ||
|
|
||
| ```bash | ||
| git clone https://github.com/CowboyLogic/ai-dev.git | ||
| ``` | ||
|
|
||
| For a terminal session, pass the folder on the command line. The mod loads for that session only. | ||
|
|
||
| ```bash | ||
| claude --plugin-dir /path/to/ai-dev/mods/claude/<mod-name> | ||
| ``` | ||
|
|
||
| For every session, including those the desktop app starts, name the folder in the `env` block of | ||
| `~/.claude/settings.json`. Separate several folders with `:` (`;` on Windows). | ||
|
|
||
| ```json | ||
| { | ||
| "env": { | ||
| "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/ai-dev/mods/claude/<mod-name>" | ||
|
MRSchexnayder marked this conversation as resolved.
|
||
| } | ||
| } | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The repository has no plugin marketplace yet, so `/plugin install` does not work for these mods. | ||
| > Loading the folder also means a `git pull` updates the mod. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
mods/claude/git-aware-file-explorer/.claude-plugin/plugin.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "git-aware-file-explorer", | ||
| "version": "0.1.0", | ||
| "description": "A git-aware Files pane: browse the workspace, see changed files highlighted, and view a file's diff in a panel beside the tree.", | ||
| "author": { | ||
| "name": "Cowboy Logic", | ||
| "email": "my.cowboy.logic@gmail.com" | ||
| }, | ||
| "types": "./types/index.d.ts" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "modules": ["./register.tsx"] } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.