skills/dev-tools/cross-branch-fix-porter/SKILL.md
Cross-branch fix porting expert. Understands fix intent and re-implements the same fix goal in the current branch's code context when direct cherry-pick isn't feasible. Should be used when the user needs to apply a fix from one branch to another where code structures differ significantly. Distinguished from feature-port-doc-generator which documents changes, this skill actively re-implements fixes.
npx skillsauth add ImaginerLabs/skill-manager cross-branch-fix-porterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Don't copy code — copy intent. First understand what problem the fix solves and why it was done that way, then re-implement the same fix goal within the current branch's code logic.
Case A: User provided a commit ID
1. Get commit basic info (message, author, time)
2. Get commit code diff
3. Analyze diff, extract fix intent
Case B: From conversation context
1. Search conversation history for fix-related content
2. Extract already-analyzed fix content and intent
After reading the diff, answer these questions:
1. [Root cause] What bug did this fix solve, or what requirement did it fulfill?
2. [Change scope] Which files are involved? What's the purpose of each file's change?
3. [Core logic] What's the key behavioral change (not code change)?
4. [Dependencies] Does the fix depend on specific utility functions, components, or type definitions?
1. Based on the functional modules involved in the fix, search for corresponding files in the current branch
2. Read candidate file contents to confirm they handle the same functionality
3. If no corresponding file is found, inform the user and explain why
Direct copy is only appropriate when all of these conditions are met:
If conditions are met: copy the file directly. If not: proceed to Phase 5.
Use the current branch's logic as the source of truth. Don't copy the original code:
1. Read the current branch's corresponding file's complete logic
2. Understand the current branch's code style, encapsulation patterns, utility functions
3. "Translate" the fix intent into the current branch's implementation style
4. If the current branch already has similar logic, modify it in place
Porting principles:
| Principle | Description | | ------------------------- | -------------------------------------------------------------------- | | Intent first | Reproduce the behavioral effect of the fix, not the code | | Respect current style | Use the current branch's utility functions, types, and encapsulation | | Minimal change | Only modify what's necessary, don't introduce unrelated changes | | Consistency | Match the current branch's code style and conventions |
## Cross-Branch Fix Porting Report
### Fix Intent Summary
[One-sentence description of the problem the fix solves]
### File Mapping
| Original fix file | Current branch file | Handling |
| ----------------- | ------------------- | -------------- |
| src/a.ts | src/b.ts | Re-implemented |
| src/new.ts | — | Direct copy |
### Key Differences
[Structural differences, implementation differences]
### Applied Changes
- [Change 1]
- [Change 2]
### Items Requiring User Confirmation (if any)
- [Confirmation item]
development
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
devops
Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.
tools
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
documentation
Generates standardized porting documentation from completed feature changes. Analyzes commit diffs or file contents, extracts change intent, and outputs Markdown documentation for cross-team understanding. Should be used when the user needs to document a change for cross-team or cross-project consumption. Distinguished from cross-branch-fix-porter which actively re-implements fixes, this skill documents changes.