# Manage Delegates

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-harness-harness-skills-manage-delegates`
- **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/manage-delegates
- **Website:** https://developer.harness.io/docs/platform/harness-ai/harness-skills/

## Install

```sh
agentstack add skill-harness-harness-skills-manage-delegates
```

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

## About

# Manage Delegates

Monitor delegate health and manage registration tokens via MCP.

## Instructions

### Step 1: List Delegates

List all delegates in the account to check health and connectivity:

```
Call MCP tool: harness_list
Parameters:
  resource_type: "delegate"
```

This returns all delegates with their status, version, connectivity, and last heartbeat. Delegates are account-scoped -- no org/project needed.

### Step 2: List Delegate Tokens

```
Call MCP tool: harness_list
Parameters:
  resource_type: "delegate_token"
  org_id: ""
  project_id: ""
```

Filter by name or status:

```
Call MCP tool: harness_list
Parameters:
  resource_type: "delegate_token"
  name: "prod-token"
  status: "ACTIVE"
```

### Step 3: Get Token Details

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

### Step 4: Create a Token

```
Call MCP tool: harness_create
Parameters:
  resource_type: "delegate_token"
  org_id: ""
  project_id: ""
  body:
    name: "prod-delegate-token"
```

### Step 5: Find Delegates for a Token

```
Call MCP tool: harness_execute
Parameters:
  resource_type: "delegate_token"
  action: "get_delegates"
  resource_id: ""
  org_id: ""
  project_id: ""
```

### Step 6: Revoke a Token

```
Call MCP tool: harness_execute
Parameters:
  resource_type: "delegate_token"
  action: "revoke"
  resource_id: ""
  org_id: ""
  project_id: ""
```

### Step 7: Delete a Token

```
Call MCP tool: harness_delete
Parameters:
  resource_type: "delegate_token"
  resource_id: ""
  org_id: ""
  project_id: ""
```

## Resource Types

| Resource Type | Scope | Operations | Description |
|--------------|-------|-----------|-------------|
| `delegate` | Account | list | List delegates with health status |
| `delegate_token` | Project | list, get, create, delete + revoke, get_delegates actions | Manage registration tokens |

## Examples

- "Are all delegates healthy?" -- List delegates, check status and last heartbeat
- "Create a new delegate token for the staging project" -- Create token with project scope
- "Which delegates are using the prod-token?" -- Execute get_delegates action on the token
- "Revoke the old registration token" -- Execute revoke action
- "Show me all active delegate tokens" -- List tokens filtered by status ACTIVE

## Performance Notes

- When diagnosing delegate issues, check both the delegate list (for health/heartbeat) and the token status (for auth). A delegate showing as disconnected may have a revoked token.
- Always verify delegate connectivity before troubleshooting pipeline failures -- many execution errors stem from unavailable delegates.

## Troubleshooting

### Delegate Shows Disconnected
1. Check the delegate's last heartbeat timestamp -- if stale, the delegate process may be down
2. Verify the delegate token is ACTIVE (not REVOKED)
3. Check network connectivity between the delegate host and Harness SaaS

### Pipeline Fails with "No Delegates Available"
1. List delegates to confirm at least one is connected and healthy
2. Check if the pipeline uses a delegate selector that doesn't match any active delegate
3. Verify the delegate has the required tools installed (kubectl, helm, docker, etc.)

### Token Issues
- Tokens are project-scoped -- a token created in project A cannot register delegates for project B
- Revoking a token disconnects all delegates registered with it
- Deleted tokens cannot be recovered -- create a new one and re-register delegates

## 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-manage-delegates
- 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%.
