ワンクリックで
unified-diff-generation
Expertise in generating rigorous, patch-compatible Unified Diffs for the 'patch' utility.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Expertise in generating rigorous, patch-compatible Unified Diffs for the 'patch' utility.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Expert in building, evaluating, and deploying AI agents using the Google ADK Python framework. Use this skill for writing agent logic, configuring multi-agent systems, and implementing tool integrations.
Advanced manipulation of text streams using the classic Unix power tools: awk and sed.
The discipline of writing robust, re-runnable system administration scripts that converge to a desired state.
Expertise in creating delightful, low-friction command-line interfaces using modern TUI principles.
Ensuring that code is well formatted
The art of identifying the root cause of software defects through heuristic analysis and logical deduction.
| name | unified-diff-generation |
| description | Expertise in generating rigorous, patch-compatible Unified Diffs for the 'patch' utility. |
Expertise in generating rigorous, patch-compatible Unified Diffs for the 'patch' utility.
* **Format:** We strictly use the Unified Format (`diff -u`).
* **Headers:**
* Original file: `--- a/path/to/file`
* New file: `+++ b/path/to/file`
* **Crucial:** The `a/` and `b/` prefixes are mandatory to allow standard `patch -p1` usage.
* **Hunks:**
* Header: `@@ -start,length +start,length @@`
* Context: Must include exactly **3 lines** of unchanged context before and after the change.
* **New Files:** Represent original file as `--- /dev/null`.
* **Deleted Files:** Represent new file as `+++ /dev/null`.
* Context: Include exactly 3 lines of unchanged context before and after every change.
* No Truncation: Do not use comments like // ... existing code ... inside the code blocks. Write out the full lines.
* Headers: Ensure the @@ -old,lines +new,lines @@ headers accurately match the line counts.
* Whitespace: Preserve indentation exactly.
* Final Newline: Ensure the very last line of the diff block ends with a newline character.
* **Whitespace:** The `patch` utility is unforgiving. Context lines must match the source exactly, including indentation.
* **Fuzz:** While `patch` can handle some line number drift ("fuzz"), it rejects patches where context text does not match.
* Final Newline: Ensure the very last line of the diff block ends with a newline character.
+ (Addition)
* - (Deletion)
* (Space - Context)* **Mandatory Leading Space:** Every context line (a line that is not a
`+` or `-`) MUST start with a single space character.
* **Failure Mode:** If this space is missing, the `patch` utility will
reject the file as malformed.
diff or patch.@@ -old,len +new,len @@) with high precision.