Add staged change summarizer prompt.

This commit is contained in:
Jay
2026-04-15 13:47:58 -04:00
parent d002c19889
commit 12b6ac1a62
2 changed files with 214 additions and 0 deletions

24
prompts/summarize_staged Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
SYSTEM_PROMPT_FILE="$SCRIPT_DIR/coder.md"
PROMPT="Summarize the changes made in this diff, given the diff and the after state."
MODEL="gemini-3-flash-preview"
FALLBACK="claude-sonnet-4.6"
context() {
code2prompt $(git diff --name-only --cached | sed 's/.*/-i "&"/') .
}
diff() {
git diff --cached
}
aicli \
-m "$MODEL" \
-b "$FALLBACK" \
-sf "$SYSTEM_PROMPT_FILE" \
-p "$PROMPT" \
-p "DIFF:\n\n$(diff)" \
-p "AFTER CODE:\n\n$(context)" |
glow -p