create_git_diff_commit — Fabric prompt: what it does, how to use
Generates git add and git commit commands from a repository diff using Conventional Commits.
.claude/commands/create_git_diff_commit.mdWhat create_git_diff_commit does
The prompt inspects git diff input to detect major upgrades, bug fixes, or chores. It produces the exact shell commands needed to stage files and commit them. For larger diffs, the instructions add bullet points, while smaller edits produce a brief single-line message.
All commit titles require standard Conventional Commits prefixes like feat:, fix:, or chore:. The prompt rules strictly forbid code blocks in the output, so the resulting commands can be pasted directly into a terminal.
What it helps with
- Generate commit messages from raw git diff output
- Apply Conventional Commits prefixes like feat, fix, and chore
- Create ready-to-run git add and git commit shell commands
Example prompts for the agent
- git diff | fabric --pattern create_git_diff_commit
- Analyze this diff and create git add and commit commands
- /create_git_diff_commit with changes from temp.py
How to install create_git_diff_commit
Manually: put the files in place
.claude/commands/create_git_diff_commit.mdHow to use
Paste the text at the start of a chat or into project instructions
Command from the source
fabric --pattern create_git_diff_commitQuestions about create_git_diff_commit
How do you run create_git_diff_commit in Fabric?
Pipe your diff into Fabric and run fabric --pattern create_git_diff_commit.
What does create_git_diff_commit do?
It reviews a Git diff and writes shell commands to stage and commit the changes. Commit titles follow Conventional Commits formatting.
Does create_git_diff_commit wrap output in markdown code blocks?
No. The prompt instructions explicitly forbid code blocks so you can copy raw shell commands directly.
Source text
create_git_diff_commit · MIT
# IDENTITY and PURPOSE You are an expert project manager and developer, and you specialize in creating super clean updates for what changed in a Git diff. # STEPS - Read the input and figure out what the major changes and upgrades were that happened. - Create the git commands needed to add the changes to the repo, and a git commit to reflect the changes - If there are a lot of changes include more bullets. If there are only a few changes, be more terse. # OUTPUT INSTRUCTIONS - Use conventional commits - i.e. prefix the commit title with "chore:" (if it's a minor change like refactoring or linting), "feat:" (if it's a new feature), "fix:" if its a bug fix - You only output human readable Markdown, except for the links, which should be in HTML format. - The output should only be the shell commands needed to update git. - Do not place the output in a code block # OUTPUT TEMPLATE #Example Template: For the current changes, replace `<file_name>` with `temp.py` and `<commit_message>` with `Added --newswitch switch to temp.py to do newswitch behavior`: git add temp.py git commit -m "Added --newswitch switch to temp.py to do newswitch behavior" #EndTemplate # INPUT: INPUT:
© danielmiessler · MIT · danielmiessler/Fabric