AGENT SKILL

迁移计划发现与选择

list-plans

在工作区中发现有效的迁移计划,并返回所选计划的路径。 有效的计划是指 .github/modernize/ 下同时包含 plan.md 和 tasks.json 的子目录(tasks.json 可位于计划文件夹内,也可位于 .metadata 子文件夹中)。 可处理 0 个、1 个或多个计划;当需要做出选择时,返回结构化的 NEEDS_INPUT。 触发词:“list plans”、“find plans”、“select plan”、“list-and-select-plan”、“discover plans”。

License 许可
MIT
最近更新
2026-09-24
Stars
★ 55
Forks
15

01 前言 Front Matter

name
list-plans
description
Discovers valid migration plans in the workspace and returns the selected plan path. A valid plan is a subdirectory of .github/modernize/ that contains plan.md AND tasks.json (tasks.json may be in the plan folder or in a .metadata subfolder). Handles 0, 1, or multiple plans and returns structured NEEDS_INPUT when a choice is needed. Triggers: "list plans", "find plans", "select plan", "list-and-select-plan", "discover plans".

03 SKILL.md 正文

List and Select Plan

Step 1 — Discover valid plans

You MUST run this in a terminal — do NOT use file tools (list_dir, file_search, grep_search) to discover plans.

Detect the OS and run the matching script in the terminal. Replace <workspace-root> with the absolute path to the workspace root before running.

Windows (PowerShell) — run in terminal:

Set-Location "<workspace-root>"
$modernizeDir = ".github/modernize"
$plans = @()

if (Test-Path $modernizeDir) {
    Get-ChildItem -Path $modernizeDir -Directory | ForEach-Object {
        $hasPlan  = Test-Path (Join-Path $_.FullName "plan.md")
        $hasTasks = (Test-Path (Join-Path $_.FullName "tasks.json")) -or (Test-Path (Join-Path $_.FullName ".metadata/tasks.json"))
        if ($hasPlan -and $hasTasks) {
            $plans += @{ folder = $_.Name; planPath = "$modernizeDir/$($_.Name)/plan.md" }
        }
    }
}

$plans | ConvertTo-Json -Depth 2

macOS / Linux (bash) — run in terminal:

cd "<workspace-root>"
modernize_dir=".github/modernize"
entries="[]"

if [ -d "$modernize_dir" ]; then
    for folder in "$modernize_dir"/*/; do
        [ -d "$folder" ] || continue
        name=$(basename "$folder")
        if [ -f "$folder/plan.md" ] && ([ -f "$folder/tasks.json" ] || [ -f "$folder/.metadata/tasks.json" ]); then
            entry="{\"folder\":\"$name\",\"planPath\":\"$modernize_dir/$name/plan.md\"}"
            if [ "$entries" = "[]" ]; then
                entries="[$entry]"
            else
                entries="${entries%]},$entry]"
            fi
        fi
    done
fi

echo "$entries"

Parse the JSON output from the terminal as the list of valid plans for the next step.

Step 2 — Route based on count

No plans found

Return no-plans-found to the caller. Do not prompt the user.

Exactly 1 plan found

Return its path immediately — no user prompt needed:

.github/modernize/<folder>/plan.md

Multiple plans found

  1. For each plan, read .github/modernize/<folder>/plan.md, extract the first heading, strip the leading # and any prefix of the form <Word> Plan: (e.g. Modernization Plan: , Migration Plan: ), and use the remainder as the title.
  2. Do not invoke a question tool. Return exactly these two lines to planning-coordinator, with compact JSON on the second line and no surrounding prose or Markdown fence:
NEEDS_INPUT
{"schemaVersion":1,"coordinator":"planning-coordinator","requestType":"plan-selection","questions":[{"header":"plan-selection","question":"Which plan would you like to execute?","allowFreeformInput":false,"options":[{"label":"<folder>","description":"<plan title>"}]}],"resumeContext":{"plans":[{"label":"<folder>","planPath":".github/modernize/<folder>/plan.md"}]}}

Include one option and one matching resumeContext.plans entry per discovered plan, preserving discovery order. The option label is the folder name and its description is the title from step 1. Never select the first plan by default.

Step 3 — Return

After planning-coordinator receives the top-level structured answer, it resolves the selected label through resumeContext.plans and returns that path:

.github/modernize/<selected-folder>/plan.md

04 同仓库更多 Skills

microsoft
microsoft/github-copilot-modernization

迁移后基线测试验证

verify-test-baseline

根据冻结的基线规范生成并运行迁移后测试。

测试工程师测试与质量保障
★ 55
microsoft
microsoft/github-copilot-modernization

团队连接信息与密钥申请

team-request

团队成员如何在团队模式下申请基础设施连接信息并处理密钥

普通用户凭证与密钥管理
★ 55
microsoft
microsoft/github-copilot-modernization

多智能体团队角色章程

team-charters

为多智能体编码团队提供角色章程(使命、职责范围、核心原则、质量标杆)。每份章程定义该角色的使命、职责范围、核心原则(边界约束)和质量标杆。大多数角色还包含沟通规则。协调者在任务分解时读取这些章程,以将工作分配给正确的角色。 触发场景:"查找角色章程"、"架构师负责什么"、"检查角色边界"、"查找团队角色"、"哪个角色处理 X"、"列出智能体章程"、"角色职责"。 不适用于:任务分解(使用 breaking-down-tasks)、代码实现(使用 implementing-code)、架构分析(使用 analyzing-architecture)。

AI 工程师编码任务委派
★ 55
microsoft
microsoft/github-copilot-modernization

Struts 2 至 Spring Boot 迁移

struts-to-spring

将 Apache Struts 2 应用程序迁移到 Spring Boot 3.x 和 Spring MVC 的迁移指南。

软件开发工程师开发参考
★ 55
microsoft
microsoft/github-copilot-modernization

Spring Boot 项目脚手架搭建

spring-boot-scaffolding

在重写迁移过程中创建新 Spring Boot 项目的参考指南。

软件开发工程师开发参考
★ 55
microsoft
microsoft/github-copilot-modernization

项目经验教训记录与共享

sharing-learnings

介绍如何记录项目经验教训,以便后续阶段的工作者和未来的智能体运行能够参考使用。

项目经理知识管理与沉淀
★ 55