Skip to content

Instantly share code, notes, and snippets.

@drpancake
Created September 4, 2025 06:10
Show Gist options
  • Select an option

  • Save drpancake/472350992d7e4086fe845a1d6d7742e8 to your computer and use it in GitHub Desktop.

Select an option

Save drpancake/472350992d7e4086fe845a1d6d7742e8 to your computer and use it in GitHub Desktop.
cl() {
local PFX=${CCS_PFX:-"🤖 "}
claude -p --verbose --output-format stream-json "$@" \
| jq -r --arg pfx "$PFX" '
select(.type=="assistant")
| .message.content[]?
| select(.type=="text")
| ($pfx + .text)
'
}
commit-staged() { cl "git commit only the staged files (with a one-line but descriptive commit message)"; }
commit() { git add --all && commit-staged; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment