Diff to SOP Skill
Overview
Transform a git diff into a short, actionable SOP. Captures files, functions, and code blocks. Enables future integrators to follow changes without reading all source code.
When to Use
- After merging a new blockchain or service integration
- Want a reusable SOP for future integrations
- Do NOT use for generic diffs unrelated to operational steps
Core Pattern
- Extract Modified Files
- Identify all files with changes
- List file paths in the SOP
- Identify Changed Functions
- Parse diff hunks to detect modified/added functions
- Include function signatures in SOP
- Include Minimal Code Blocks
- For each modified function, include representative diff lines
- Keep code blocks short but enough to understand change
- Ignore
*.pb.gofiles - Ignore
Justfilefiles
- Step-by-Step SOP Structure
- Each step corresponds to a diff segment
- Include:
- Section title (what changed)
- Files affected
- Functions changed
- Minimal code block
Quick Reference Template
### <Step Name>
- Files modified:
\`\`\`text
<file_path>
\`\`\`
- Functions changed:
\`\`\`<language>
<function_signature>
\`\`\`
- Diff example:
\`\`\`diff
<diff_lines>
\`\`\`