run-pipeline

通过 MCP 工具执行和监控 Harness 流水线运行。用于查找流水线、提供运行时输入、触发执行、监控进度、处理审批、重试失败任务以及中止或停止卡住的执行。适用于运行、部署、触发构建、检查执行状态、批准或中止流水线等操作。

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

安装方式

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

用 AI 助手安装

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

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

来源与配置

github.com

配置方式待核实

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

安装实测待补充

通过 MCP 工具执行和监控 Harness 流水线运行。用于查找流水线、提供运行时输入、触发执行、监控进度、处理审批、重试失败任务以及中止或停止卡住的执行。适用于运行、部署、触发构建、检查执行状态、批准或中止流水线等操作。

0 下载

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

SkillPi 解读

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

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: run-pipeline
description: >-
  Execute and monitor Harness pipeline runs via MCP tools. Find pipelines, provide runtime inputs, trigger
  executions, monitor progress, handle approvals, retry failures, and abort running or stuck executions.
  Use when asked to run a pipeline, execute a deployment, trigger a build, start a pipeline, deploy a
  service, check execution status, approve a pipeline, or abort/stop/interrupt executions. Trigger phrases:
  run pipeline, execute pipeline, deploy, start build, trigger pipeline, check execution, approve
  deployment, retry failed pipeline, abort execution, stop pipeline, interrupt execution, kill stuck
  pipeline.
metadata:
  author: Harness
  version: 2.1.0
  mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)

Run Pipeline

Execute and monitor Harness pipeline runs via MCP.

Instructions

Step 1: Find the Pipeline

Call MCP tool: harness_search
Parameters:
  query: "<user's pipeline name or keyword>"
  resource_types: ["pipeline"]
  compact: true

Or list all pipelines in a project:

Call MCP tool: harness_list
Parameters:
  resource_type: "pipeline"
  org_id: "<organization>"
  project_id: "<project>"
  search_term: "<optional filter>"

Step 2: Get Pipeline Details

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

Extract from response:

  • Required runtime inputs (<+input> fields)
  • Pipeline variables with types and defaults
  • Stage structure and deployment targets

Step 3: Check Available Input Sets

Call MCP tool: harness_list
Parameters:
  resource_type: "input_set"
  org_id: "<organization>"
  project_id: "<project>"

Input sets provide pre-configured values that can be used or overridden.

Step 4: Execute the Pipeline

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

Step 5: Monitor Execution

Call MCP tool: harness_get
Parameters:
  resource_type: "execution"
  resource_id: "<execution_id>"
  org_id: "<organization>"
  project_id: "<project>"

Execution statuses: Running, Success, Failed, Aborted, Waiting (approval/input), Expired

Step 6: Handle Approvals

If execution is waiting for approval:

Call MCP tool: harness_list
Parameters:
  resource_type: "approval_instance"
  org_id: "<organization>"
  project_id: "<project>"

Then approve or reject:

Call MCP tool: harness_execute
Parameters:
  resource_type: "approval_instance"
  action: "approve"  # or "reject"
  resource_id: "<approval_id>"

Safety: Production Deployments

CRITICAL: Before executing pipelines targeting production:

  1. Confirm intent with the user explicitly
  2. Show what will be deployed (version, service, environment)
  3. Check if pipeline has approval gates
  4. Verify the version was tested in lower environments

Response Format

Before Execution

Pipeline: <name>
Project: <project>
Required Inputs: <list variables needing values>
Available Input Sets: <list>
Ready to execute? Confirm to proceed.

After Trigger

Pipeline: <name>
Execution ID: <id>
Status: Running
View in Harness: <openInHarness link>

Execution Complete

Pipeline: <name>
Status: Success/Failed
Duration: <time>
Stages: <stage results table>

Retrying Failed Executions

Retry is an action on pipeline (not execution). Pass the pipeline ID as resource_id and the failed execution's ID as execution_id:

Call MCP tool: harness_execute
Parameters:
  resource_type: "pipeline"
  action: "retry"
  resource_id: "<pipeline_id>"
  execution_id: "<execution_id>"
  org_id: "<organization>"
  project_id: "<project>"

Interrupting Running Executions

To abort an entire pipeline execution:

Call MCP tool: harness_execute
Parameters:
  resource_type: "execution"
  action: "interrupt"
  resource_id: "<execution_id>"
  org_id: "<organization>"
  project_id: "<project>"
  params:
    interrupt_type: "AbortAll"

The interrupt_type field inside params is required. Valid values:

interrupt_type Effect
AbortAll Abort the entire pipeline execution
UserMarkedFailure Mark the execution as failed by user

To abort multiple stuck executions, call harness_execute with params: {interrupt_type: "AbortAll"} for each execution ID.

Examples

  • "Run the ci-pipeline" - Search for pipeline, execute with defaults
  • "Deploy version 2.0.0 to staging" - Find deploy pipeline, provide version input, execute
  • "What's the status of execution xyz123?" - Get execution details
  • "Retry the last failed deployment" - List recent failed executions, retry
  • "Abort all stuck executions" - List running/waiting executions, interrupt each with params: {interrupt_type: "AbortAll"}
  • "Stop execution abc123" - Interrupt the specific execution with params: {interrupt_type: "AbortAll"}

Performance Notes

  • Always confirm the pipeline identifier and required inputs before triggering execution. A failed execution due to missing inputs wastes time.
  • When monitoring executions, wait for terminal status (Success, Failed, Aborted) before reporting results. Do not assume intermediate states are final.
  • If an execution fails, gather full error context from logs before suggesting fixes. Do not guess at root causes.

Troubleshooting

Pipeline Won't Start

  • Check delegate availability with harness_status
  • Validate all required inputs have values
  • Test connector credentials with harness_execute (resource_type: "connector", action: "test_connection")

Missing Inputs

  • Use harness_get on the pipeline to see all <+input> fields
  • Check input sets for pre-configured values

Execution Stuck

  • Check for pending approvals with harness_list (resource_type: "approval_instance")
  • Check delegate status with harness_status
  • Abort stuck executions with harness_execute (resource_type: "execution", action: "interrupt", params: {interrupt_type: "AbortAll"})

当前收录版本

2.1.0

核对来源版本 ↗

安全与评测信息

质量评测

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

场景价值92/100

亮点

  • 提供 Harness 流水线全生命周期管理能力,覆盖查找、执行、监控、审批、重试、中断等高频刚需场景
  • 显著提升 DevOps 自动化效率,减少人工操作成本
触发精准95/100

亮点

  • 触发短语覆盖全面,包括 run pipeline, deploy, check execution, abort execution 等多种用户表达
  • 边界清晰,无歧义,有效降低误触或漏触风险
结构规范94/100

亮点

  • Phase/步骤划分清晰,从查找流水线到监控执行形成完整闭环
  • 每个步骤均提供 MCP 工具调用示例和参数说明,便于用户理解与执行
  • 包含端到端示例和性能提示,frontmatter 完整
执行可靠93/100

亮点

  • MCP 工具来源明确,参数定义准确,覆盖主要异常处理场景
  • 对生产部署有明确的安全确认机制,防止误操作
  • 重试和中断操作说明详尽,确保用户能正确处理失败或卡住的执行
证据可验 (前四项均值)94/100

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

正文静态检测

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

正文未命中当前规则。

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

权限与使用前检查

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

  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 217 行

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

安全评级与访问范围

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

来源文档未说明。

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