feat: add commit-helper tool to optimize AI commit context

Replaces verbose git command invocations in commit commands with a smart
TypeScript helper that:
- Filters out lockfiles, binary files, and generated content from diffs
- Truncates large diffs intelligently by preserving complete file changes
- Provides structured summaries with file type distribution and change stats
- Shows previews of new files being added

Also adds Fish shell VSCode extension and enables Claude Code panel preference.
This commit is contained in:
2025-12-27 17:01:31 -06:00
parent 8b77454d2b
commit 17b1be33a9
6 changed files with 446 additions and 21 deletions
+2 -9
View File
@@ -1,18 +1,11 @@
---
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git show:*), Bash(git commit:*)
allowed-tools: Bash(git commit:*)
description: Amend the most recent commit (with staged changes and/or message reword)
---
## Context
**Current staged changes:**
!`git diff --cached --stat`
**Files in most recent commit:**
!`git show --stat --pretty=format: HEAD | grep -v '^$'`
**Recent commit history (for style reference):**
!`git log --oneline -5`
!`commit-helper --amend`
## Your task
+2 -8
View File
@@ -1,17 +1,11 @@
---
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git commit:*)
allowed-tools: Bash(git commit:*)
description: Commit currently staged changes with an appropriate message
---
## Context
- Current git status:
!`git status`
- Current git diff line count: !`git diff --cached | wc -l`
- Current git diff (staged changes only):
!`if [ $(git diff --cached | wc -l) -lt 200 ]; then git diff --cached; else git diff --cached --stat; fi`
- Recent commits:
!`git log --oneline -10`
!`commit-helper --staged`
## Your task