AGENT SKILL

feature-port-doc-generator

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.

License 许可
MIT
最近更新
2026-04-18
Stars
★ 0
Forks
0

01 前言 Front Matter

name
feature-port-doc-generator
boundary
{ "vs_cross-branch-fix-porter": "cross-branch-fix-porter actively re-implements fixes across branches, this skill documents changes for other teams" }
category
dev-tools
description
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.

02 资源文件 2

03 SKILL.md 正文

Feature Porting Document Generator

Core Approach

Not copying code — transmitting intent. Let the receiving team understand "what changed, why it changed, and how to implement it in their own project."

When to Use

  • User provides a commit ID that needs to be documented as a porting guide
  • User provides one or more changed files and needs to extract the change intent
  • A feature implementation needs to be shared with other project teams

Workflow

Phase 1: Get Change Information

Case A: User provided a commit ID

1. Get commit basic info (message, author, time)
2. Get commit code diff
3. Count changed files, assess change scope

Case B: User specified file paths (no commit ID)

1. Read the user-specified file contents
2. Find recent related commit history for those files
3. Confirm the relevant commits and get their diffs

Phase 2: Analyze Change Intent

1. [Change type] What kind of change is this? (New feature / Bug fix / Performance optimization / Refactoring)
2. [Problem/Goal] What problem does this change solve, or what goal does it achieve?
3. [Change scope] Which files are involved? What's the purpose of each file's change?
4. [Core logic] What's the key behavioral change (not code change)?
5. [External dependencies] Does the change introduce new dependencies (npm packages, utility functions, components, APIs)?
6. [Porting prerequisites] What baseline conditions must other projects meet before porting?

Phase 3: Collect File Paths

1. For file paths in the commit diff, combine with project root to form absolute paths
2. Use git rev-parse --show-toplevel to get the project root
3. All file paths in the final document should use absolute path format

Phase 4: Assess Porting Complexity

Complexity Criteria Porting advice
Simple Single file change, no new dependencies, independent logic Can directly reference code implementation
Medium Multi-file change, few dependencies, related logic Port file by file in order
Complex Involves architectural changes, many dependencies, requires prerequisite work Port in phases

Phase 5: Generate Porting Document

The document must include these sections:

  • Change overview (type, goal, background)
  • File scope (file list + change description)
  • Core logic explanation (before/after behavior comparison)
  • Dependency list (new dependencies, prerequisites)
  • Porting steps (step-by-step instructions)
  • Notes (common issues, risk points)

Output Format

## [Feature Name] Porting Document

### Change Overview

- **Type**: New feature / Bug fix / Performance optimization / Refactoring
- **Goal**: [One-sentence description]
- **Background**: [Why this change was needed]

### File Scope

| File path           | Change description  |
| ------------------- | ------------------- |
| /abs/path/file1.ts  | [Purpose of change] |
| /abs/path/file2.tsx | [Purpose of change] |

### Core Logic Explanation

**Before**: [Original behavior]

**After**: [New behavior]

### Dependency List

**New dependencies**:

- [Dependency package/utility function/component]

**Prerequisites**:

- [Baseline conditions the project must meet]

### Porting Steps

1. [Step 1: specific action]
2. [Step 2: specific action]
3. [Step 3: specific action]

### Notes

- [Risk point or common issue]

Important Notes

  • Paths must be absolute — All file paths in the document must use absolute paths
  • Intent over code — The core of the document is communicating "why it changed"
  • Reader's perspective — Write for someone who doesn't know the original project
  • Dependencies must be complete — All newly introduced dependencies must be listed
  • Steps must be executable — Porting steps must be specific enough to follow

04 同仓库更多 Skills

ImaginerLabs
ImaginerLabs/skill-manager

meeting-minutes

Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.

行政与办公人员Skill与智能体开发
★ 0
ImaginerLabs
ImaginerLabs/skill-manager

documentation-writer

Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.

★ 0
ImaginerLabs
ImaginerLabs/skill-manager

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

内容创作者写作与文案Skill与智能体开发
★ 0
ImaginerLabs
ImaginerLabs/skill-manager

code-review-workflow

Executes comprehensive 4-phase code review: basic review, quality check, bundle analysis, and test coverage. Should be used when the user mentions comprehensive code review, checking code quality, or reviewing staged changes with multi-phase analysis. This is the comprehensive review workflow, distinct from focused skills like frontend-code-review, staged-code-review, or code-change-test-designer.

开发工程师代码审查测试与质量
★ 0
ImaginerLabs
ImaginerLabs/skill-manager

code-change-test-designer

Analyzes code changes and designs comprehensive test cases. Reads diffs, summarizes capability changes, and designs test cases covering main flows and edge cases. Should be used when the user mentions test coverage, designing tests for code changes, or analyzing diff/commit for testing purposes. Distinguished from code-review-workflow which provides comprehensive review, this skill focuses on test case design for code changes.

开发工程师设计师测试与质量视觉设计
★ 0
ImaginerLabs
ImaginerLabs/skill-manager

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

Skill与智能体开发
★ 0