# Run Pipeline

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-harness-harness-skills-run-pipeline`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [harness](https://agentstack.voostack.com/s/harness)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [harness](https://github.com/harness)
- **Source:** https://github.com/harness/harness-skills/tree/main/skills/run-pipeline
- **Website:** https://developer.harness.io/docs/platform/harness-ai/harness-skills/

## Install

```sh
agentstack add skill-harness-harness-skills-run-pipeline
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Run Pipeline

Execute and monitor Harness pipeline runs via MCP.

## Instructions

### Step 1: Find the Pipeline

```
Call MCP tool: harness_search
Parameters:
  query: ""
  resource_types: ["pipeline"]
  compact: true
```

Or list all pipelines in a project:

```
Call MCP tool: harness_list
Parameters:
  resource_type: "pipeline"
  org_id: ""
  project_id: ""
  search_term: ""
```

### Step 2: Get Pipeline Details

```
Call MCP tool: harness_get
Parameters:
  resource_type: "pipeline"
  resource_id: ""
  org_id: ""
  project_id: ""
```

Extract from response:
- Required runtime inputs (`` 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: ""
  project_id: ""
```

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: ""
  org_id: ""
  project_id: ""
```

### Step 5: Monitor Execution

```
Call MCP tool: harness_get
Parameters:
  resource_type: "execution"
  resource_id: ""
  org_id: ""
  project_id: ""
```

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: ""
  project_id: ""
```

Then approve or reject:

```
Call MCP tool: harness_execute
Parameters:
  resource_type: "approval_instance"
  action: "approve"  # or "reject"
  resource_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: 
Project: 
Required Inputs: 
Available Input Sets: 
Ready to execute? Confirm to proceed.
```

### After Trigger
```
Pipeline: 
Execution ID: 
Status: Running
View in Harness: 
```

### Execution Complete
```
Pipeline: 
Status: Success/Failed
Duration: 
Stages: 
```

## 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: ""
  execution_id: ""
  org_id: ""
  project_id: ""
```

## Interrupting Running Executions

To abort an entire pipeline execution:

```
Call MCP tool: harness_execute
Parameters:
  resource_type: "execution"
  action: "interrupt"
  resource_id: ""
  org_id: ""
  project_id: ""
  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 `` 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"})

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [harness](https://github.com/harness)
- **Source:** [harness/harness-skills](https://github.com/harness/harness-skills)
- **License:** Apache-2.0
- **Homepage:** https://developer.harness.io/docs/platform/harness-ai/harness-skills/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-harness-harness-skills-run-pipeline
- Seller: https://agentstack.voostack.com/s/harness
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
