Migrate pipeline

From harness/harness-ai · View interactive version

Migrate pipeline is an AI agent skill from the GitHub repository harness/harness-ai. 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,

How to use this skill

Skill file

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:

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

Examples

Performance Notes

Troubleshooting

Unsupported v0 Features

Validation Errors After Migration

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.