Commit with User Prompts

VerifiedSafe

Creates git commits that include the user prompts from the conversation that led to the changes. Useful for preserving the context of why changes were made when committing. Automatically extracts relevant prompts and session metadata.

Sby Skills Guide Bot
DevelopmentIntermediate
506/2/2026
Claude Code
#git#commit#version-control#prompts#changes

Recommended for

Our review

Creates Git commits that include the user prompts that led to the changes, along with session metadata.

Strengths

  • Preserves decision context in Git history
  • Automates collection of user prompts and session information
  • Enhances traceability of AI-assisted changes

Limitations

  • Requires the 'uv' tool to be installed and configured in the project
  • Works only in an interactive session with prompt history
  • May produce long messages if many prompts are involved
When to use it

Use this skill when you want to record in Git the conversational context that led to the changes.

When not to use it

Avoid using it for quick or trivial commits where context is unnecessary.

Security analysis

Safe
Quality score85/100

The skill uses git commands and a custom session-info script to create commits with user prompts. No destructive, exfiltrating, or obfuscated actions; all operations are standard version control tasks within the workspace.

No concerns found

Examples

Commit with prompts
Commit these changes with the user prompts that led to them.
Save work to Git
Save my work to git, including the conversation context.

name: commit description: Commit with user prompts from this conversation. Use when user mentions committing, wants to commit changes, asks to save their work to git, or says "commit this". allowed-tools: Bash, Read

Commit with User Prompts

Create git commits that include the user prompts that led to the changes.

Instructions

  1. Extract User Prompts: Collect user messages from this conversation that led to the changes. Include them in chronological order.

  2. Analyze Changes:

    git status
    git diff --staged
    
  3. Get Session Info:

    uv run {baseDir}/ai-blame.py session-info
    
  4. Generate Commit Message:

    <brief summary of changes>
    
    User prompts:
    - "<first user prompt>"
    - "<second user prompt>" (context if prompt is ambiguous)
    
    AI-Session-ID: <from session-info>
    AI Agent: <from session-info>
    Model: <from session-info>
    
  5. Execute Commit:

    git add -A && git commit -m "$(cat <<'EOF'
    <your commit message here>
    EOF
    )"
    

Rules

  • Only include prompts that led to file changes (not /commit or meta-discussion)
  • Preserve exact wording, add (context) in parentheses if prompt is ambiguous
  • Summary line under 50 characters
  • Each prompt on a single line, no mid-sentence wrapping
Related skills