commit

stared's avatarfrom stared

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".

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

This Claude skill streamlines the Git version control workflow by automatically generating commit messages that include the original user prompts. By mapping natural language instructions directly to code changes, it enhances documentation clarity, provides historical context for AI-assisted development, and ensures seamless traceability within the repository.

Use Cases

  • Contextual Version Control: Automatically document the 'why' behind code changes by embedding the specific user requests into the Git history.
  • AI-Assisted Code Reviews: Provide reviewers with the original intent and prompt context, making it easier to evaluate AI-generated modifications.
  • Development Audit Trails: Maintain detailed records of AI session IDs and model information for debugging and tracking the evolution of a codebase.
namecommit
descriptionCommit 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-toolsBash, 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