generating-patches

Solid

Generates git patch files from codebase modifications for local application. Use when user mentions patch, diff, export changes, bring changes back, apply locally, or after editing uploaded codebases.

Code & Development 134 stars 7 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Generating Patches Generate portable git patch files from codebase modifications, enabling users to apply Claude's edits to their local repositories. ## When to Use Activate after modifying files in an uploaded codebase when the user needs to transfer changes back to their local environment. Typical workflow: user uploads zip → Claude edits files → this skill exports changes as a patch. ## Prerequisites Verify git is available and the working directory is a git repository (or can be initialized as one): ```bash git status 2>/dev/null || git init ``` If working with an uploaded codebase that lacks git history, initialize and create a baseline commit before making edits: ```bash git init git add -A git commit -m "Baseline: original uploaded state" ``` ## Generating the Patch After completing edits, generate a unified diff: ```bash # For uncommitted changes (working tree modifications) git diff > /mnt/user-data/outputs/changes.patch # If changes are staged but not committed git diff --cached > /mnt/user-data/outputs/changes.patch # For both staged and unstaged git diff HEAD > /mnt/user-data/outputs/changes.patch ``` For committed changes (preserves commit messages and metadata): ```bash # All commits since baseline git format-patch --stdout baseline..HEAD > /mnt/user-data/outputs/changes.patch # Or specify number of commits git format-patch --stdout -n 3 > /mnt/user-data/outputs/changes.patch ``` ## Handling Edge Cases **Binary files**: Git diff excludes bina...

Details

Author
oaustegard
Repository
oaustegard/claude-skills
Created
9 months ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

git-patch-workflow

Generic workflow for implementing tasks on any git repo or provided file set and delivering verified git-format-patch files the user applies with git am. ONLY activate when user explicitly invokes with /git-patch-workflow or says "use git-patch-workflow". Do NOT auto-trigger on git URLs, repo mentions, patch requests, or coding tasks.

0 Updated 1 weeks ago
6543
Code & Development Solid

ce-patch

Make one low-risk change on a bounded, test-first lane that touches at most two candidate files and ends at one human acceptance gate. Any uncertain, sensitive, dependency, durable-state, schema, public-contract, destructive, colliding, or wider change routes to /ce-plan; this skill never commits, pushes, opens a PR, or merges. Triggers: a typo, localized bug fix, or small behavior change with a known test. Multi-file, contract, schema, dependency, security-sensitive, or exploratory work → /ce-plan.

0 Updated 4 days ago
relusion
AI & Automation Solid

new-patch

Scaffold the four files for a new cc-enhanced patch (src/patches/<tag>.ts, <tag>.test.ts, the export-barrel entry, and the BY_TAG metadata record). Scaffold-only; the rest of the procedure (prompt-surface rules, count sync, clean-bundle inspection, and native verification) lives in CLAUDE.md > Adding Patches. Recommend by name when the user wants to add a new patch behavior. Triggers on "new patch", "add a patch", "scaffold a patch", "create a patch for X", "start a patch". Argument is the patch tag (e.g. "my-feature"). If the tag, one-line purpose, or group (Prompt, Tooling, Agent, System, UX, Metadata) is missing, ask before scaffolding. NOT for editing an existing patch directly and NOT for end-to-end implementation; this skill stops at scaffolding and hands off to the implementation workflow.

6 Updated today
camjac251