cat-patch

Create a git patch file from the last commit. Use when the user asks to create a patch, make a patch, generate a patch, or export a commit as a patch file.

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

When & Why to Use This Skill

The cat-patch skill automates the creation of Git patch files from the most recent commit. By streamlining the 'git format-patch' process through a simple natural language interface, it helps developers quickly export, share, and archive code changes without manual CLI execution.

Use Cases

  • Code Sharing: Quickly generate a patch file to share specific changes with team members via email or communication tools when direct repository access is limited.
  • Offline Code Reviews: Export the latest commit as a portable patch file for reviewers to examine in isolated environments.
  • Workflow Automation: Simplify the process of preparing patches for mailing-list-based development or legacy version control workflows.
  • Backup and Migration: Create a snapshot of the last commit to easily move specific changes between different local development environments.
namecat-patch
descriptionCreate a git patch file from the last commit. Use when the user asks to create a patch, make a patch, generate a patch, or export a commit as a patch file.

Create Patch from Last Commit

Instructions

When the user asks to create a patch:

  1. Run git format-patch -1 HEAD -o patches/ to create a patch file from the last commit
  2. Report the created patch filename to the user

Example Usage

User: "create a patch" User: "patch that commit" User: "make a patch file" User: "cat-patch"

Output

The patch file will be created in the patches/ directory with a name like: 0001-feat-description-of-commit.patch