migrate-pipeline

使用 MCP 工具将 Harness 管道从 v0 格式迁移到 v1 简化格式。将尖括号表达式转换为 ${{ }} 语法,将类型名称小写化,简化结构,同时保留变量、失败策略和条件逻辑。适用于将管道从 v0 转换为 v1 或升级管道格式的场景。

仓库最近推送
GitHub Stars
138
Forks
30
Issues / PRs
4

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "migrate-pipeline":https://skillpi.com/zh/skills/deepskill-da13ec079e9ec53cba338481ab164a53515662dce416671b48bc51acaacaf059。安装前核对上游来源和版本:https://github.com/harness/harness-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 MCP 工具将 Harness 管道从 v0 格式迁移到 v1 简化格式。将尖括号表达式转换为 ${{ }} 语法,将类型名称小写化,简化结构,同时保留变量、失败策略和条件逻辑。适用于将管道从 v0 转换为 v1 或升级管道格式的场景。

0 下载

介绍来源: third_party · harness · 2.0.0 参考来源

SkillPi 解读

能完成的任务
来源文档未说明。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: migrate-pipeline
description: >-
  Migrate Harness pipelines from v0 to v1 simplified format via MCP tools. Converts expressions from
  angle-bracket to ${{ }} syntax, lowercases type names, simplifies structure, and preserves variables,
  failure strategies, and conditional logic. Use when asked to migrate a pipeline, convert v0 to v1,
  upgrade pipeline format, modernize pipeline syntax, or compare v0 vs v1. Trigger phrases: migrate
  pipeline, convert to v1, upgrade pipeline, v0 to v1, modernize pipeline, simplified format.
metadata:
  author: Harness
  version: 2.0.0
  mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)

Migrate Pipeline

Convert Harness pipelines from v0 to v1 simplified format via MCP.

Instructions

Step 1: Fetch Current v0 Pipeline

Call MCP tool: harness_get
Parameters:
  resource_type: "pipeline"
  resource_id: "<pipeline_identifier>"
  org_id: "<organization>"
  project_id: "<project>"

Step 2: Convert v0 to v1

Apply these transformations:

Expression Mapping

v0 Expression v1 Expression
<+pipeline.variables.x> ${{ pipeline.variables.x }}
<+stage.variables.x> ${{ stage.variables.x }}
<+steps.id.output.outputVariables.x> ${{ steps.id.output.x }}
<+trigger.branch> ${{ trigger.branch }}
<+secrets.getValue("x")> ${{ secrets.x }}
<+pipeline.sequenceId> ${{ pipeline.sequenceId }}
<+input> ${{ input }}

Structure Changes

v0 CI Stage:

stages:
  - stage:
      identifier: build
      type: CI
      spec:
        cloneCodebase: true
        platform:
          os: Linux
          arch: Amd64
        runtime:
          type: Cloud
          spec: {}
        execution:
          steps:
            - step:
                identifier: run
                type: Run
                spec:
                  shell: Bash
                  command: npm test

v1 Equivalent:

stages:
  - name: build
    type: ci
    spec:
      steps:
        - name: run
          type: run
          spec:
            shell: bash
            run: npm test

Key v1 differences:

  • Stage/step types are lowercase: ci, run, deployment
  • command becomes run in Run steps
  • execution.steps simplifies to spec.steps
  • Platform/runtime is simplified or implicit
  • identifier becomes name (or id)

Step 3: Show Converted Pipeline

Present both v0 and v1 side-by-side for review.

Step 4: Update in Harness (Optional)

Call MCP tool: harness_update
Parameters:
  resource_type: "pipeline"
  resource_id: "<pipeline_identifier>"
  org_id: "<organization>"
  project_id: "<project>"
  body: <v1 pipeline YAML>

Migration Checklist

  • [ ] Expressions converted from <+...> to ${{ ... }}
  • [ ] Stage types lowercased
  • [ ] Step types mapped correctly
  • [ ] Platform/runtime configuration simplified
  • [ ] Variables and inputs preserved
  • [ ] Failure strategies maintained
  • [ ] Notification rules preserved
  • [ ] Conditional execution logic preserved

Examples

  • "Migrate the build-and-deploy pipeline to v1" - Fetch, convert, show diff
  • "Show me what ci-pipeline would look like in v1" - Fetch, convert, display only
  • "Convert all pipelines in the project" - List all, convert each

Performance Notes

  • Read the complete v0 pipeline before starting migration. Missing stages or steps will produce an incomplete v1 pipeline.
  • Verify all expressions are converted from <+...> to ${{ }} format.
  • Compare the v0 and v1 outputs to confirm no functionality was lost in translation.

Troubleshooting

Unsupported v0 Features

  • Some v0-specific step types may not have v1 equivalents yet
  • Complex failure strategies may need manual adjustment
  • Custom stage types require careful mapping

Validation Errors After Migration

  • Re-validate expression syntax
  • Check all resource references still resolve
  • Verify variable types are compatible

当前收录版本

2.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 解决 Harness 管道版本迁移的具体工程需求
  • 面向 DevOps 工程师的专业工具,具有明确的生产环境实用价值
触发精准95/100

亮点

  • 触发词覆盖全面且精准,包含多种常见表达方式
  • 边界清晰,不易产生误触或漏触
结构规范95/100

亮点

  • Phase 划分清晰,执行流程完整
  • 提供详细的转换对照表和端到端示例
  • 文档结构完整,包含检查清单和故障排查
执行可靠90/100

亮点

  • MCP 工具调用参数定义明确
  • 覆盖主要异常场景并提供解决方案
  • 对不可逆操作有风险提示
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。