Skip to content

harness/harness-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Harness Skills

Claude Code skills for the Harness.io CI/CD platform. Generate pipeline YAML, manage resources, debug failures, analyze costs, and more from natural language.

This repository is designed as a workflow system, not just a folder of prompts. The top-level instructions (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md) establish shared behavior, while individual skills specialize in creation, debugging, governance, and reporting tasks.

Prerequisites

  • Harness MCP v2 Server - required for MCP-powered skills. Most skills in this repo depend on it for Harness API access.

Setup

Claude Code

Clone the repo and run Claude Code from the project directory. Skills are automatically discovered from CLAUDE.md and skills/*/SKILL.md:

git clone https://github.com/harness/harness-skills.git
cd harness-skills
claude

To add the Harness MCP server, configure it in your Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "harness-mcp-v2": {
      "command": "npx",
      "args": ["-y", "harness-mcp-v2"],
      "env": {
        "HARNESS_API_KEY": "<your-api-key>"
      }
    }
  }
}

Invoke skills by name:

/create-pipeline
Create a CI pipeline for a Node.js app that builds, runs tests,
and pushes a Docker image to ECR

Cursor

  1. Clone the repo into your project or as a reference workspace:
git clone https://github.com/harness/harness-skills.git
  1. The repo includes .cursor/rules/harness.mdc, which Cursor automatically loads as a project rule.

  2. Configure the Harness MCP server in Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "harness-mcp-v2": {
      "command": "npx",
      "args": ["-y", "harness-mcp-v2"],
      "env": {
        "HARNESS_API_KEY": "<your-api-key>"
      }
    }
  }
}
  1. Reference individual skills in your prompts using @file:
@harness-skills/skills/create-pipeline/SKILL.md
Create a CI pipeline for my Go service

OpenAI Codex

  1. Clone the repo into your working directory:
git clone https://github.com/harness/harness-skills.git
  1. The repo includes AGENTS.md at the root, which Codex automatically reads as system instructions.

  2. Configure the Harness MCP server in your Codex MCP config:

{
  "mcpServers": {
    "harness-mcp-v2": {
      "command": "npx",
      "args": ["-y", "harness-mcp-v2"],
      "env": {
        "HARNESS_API_KEY": "<your-api-key>"
      }
    }
  }
}
  1. Reference individual skill files as context when prompting:
Using the instructions in harness-skills/skills/debug-pipeline/SKILL.md,
diagnose why my deploy pipeline failed

GitHub Copilot

  1. Clone the repo into your project:
git clone https://github.com/harness/harness-skills.git
  1. The repo includes .github/copilot-instructions.md, which Copilot automatically reads as project-level context in both GitHub.com and VS Code.

  2. For VS Code, configure the Harness MCP server in your workspace settings (.vscode/mcp.json):

{
  "servers": {
    "harness-mcp-v2": {
      "command": "npx",
      "args": ["-y", "harness-mcp-v2"],
      "env": {
        "HARNESS_API_KEY": "<your-api-key>"
      }
    }
  }
}
  1. Reference skill files in Copilot Chat using #file:
#file:harness-skills/skills/create-pipeline/SKILL.md
Create a CI pipeline for my Python service
  1. For GitHub Copilot on GitHub.com, attach skill files as context in Copilot Chat or add them as knowledge base references in your Copilot organization settings.

Windsurf / Other AI Editors

The skills in this repo are plain Markdown files with YAML frontmatter. They work with any AI coding tool that supports:

  1. System instructions - Use CLAUDE.md as project-level context.
  2. MCP servers - Connect the Harness MCP v2 server for API access.
  3. File context - Reference individual skills/*/SKILL.md files in prompts.

Operating Model

The best Harness skills follow the same control flow even when they target different resource types:

  1. Establish scope first - confirm account/org/project context before listing, creating, updating, or deleting resources.
  2. Verify dependencies before generating dependents - do not reference connectors, secrets, environments, infrastructure, or templates that have not been confirmed to exist.
  3. Discover schema before writing payloads - use harness_describe and API validation feedback instead of guessing field names or payload shape.

These repo-level playbooks live in:

Workflow Modes

Workflow mode Representative skills Use when
Create and scaffold /create-pipeline, /create-service, /create-connector, /create-template You need to define or generate new Harness resources and their YAML or MCP payloads.
Run and debug /run-pipeline, /debug-pipeline, /migrate-pipeline, /manage-delegates You already have resources and need to execute, diagnose, or repair behavior.
Govern and secure /manage-roles, /manage-users, /create-policy, /security-report, /audit-report You need RBAC, policy, compliance, or security workflows with blast-radius awareness.
Analyze and report /dora-metrics, /analyze-costs, /scorecard-review, /template-usage You need structured reports, summaries, recommendations, or adoption analysis.

End-to-End Workflows

New microservice setup

Use these skills in order:

  1. /create-connector
  2. /create-secret
  3. /create-service
  4. /create-environment
  5. /create-infrastructure
  6. /create-pipeline
  7. /create-trigger

Debug a failed deployment

Typical sequence:

  1. /run-pipeline to identify the latest execution or reproduce the issue
  2. /debug-pipeline to classify the failure and inspect root cause
  3. /template-usage if shared templates may have propagated the issue
  4. /manage-delegates if the failure points to delegate capacity or connectivity

Skills

Pipeline & Template Creation

Skill Description
/create-pipeline Generate v0 Pipeline YAML (CI, CD, approvals, matrix strategies)
/create-pipeline-v1 Generate v1 simplified Pipeline YAML - Alpha: internal testing only
/create-template Create reusable Step, Stage, Pipeline, or StepGroup templates
/create-trigger Create webhook, scheduled, and artifact triggers
/create-agent-template Create AI-powered agent templates - Alpha: internal testing only

Resource Management

Skill Description
/create-service Create service definitions (K8s, Helm, ECS, Lambda)
/create-environment Create environment definitions with overrides
/create-infrastructure Create infrastructure definitions
/create-connector Create connectors (Git, cloud, registries, clusters)
/create-secret Create secrets (text, file, SSH, WinRM)

Access Control & Feature Flags (MCP)

Skill Description
/manage-users Manage users, user groups, and service accounts
/manage-roles Manage role assignments and RBAC
/manage-feature-flags Create, list, toggle, and delete feature flags

Operations & Debugging (MCP)

Skill Description
/run-pipeline Execute pipelines, monitor progress, handle approvals
/debug-pipeline Analyze execution failures, diagnose root causes
/migrate-pipeline Convert pipelines from v0 to v1 format
/optimize-pipeline Pipeline speed optimization, parallel testing, caching, monorepo builds
/deployment-readiness Pre-deployment readiness checks, environment drift, canary decisions
/incident-response Deployment-incident correlation, blast radius, postmortems
/pr-analysis PR pipeline impact, security review, PR-to-production tracking
/template-usage Track template dependencies and adoption
/manage-delegates Monitor delegate health and manage tokens

Security

Skill Description
/configure-repo-scan Configure code scanning in pipelines with STO security scanners
/configure-secret-scan Add secret detection scanning to pipelines (Gitleaks, Semgrep, Snyk, and more)
/configure-container-scan Add container image scanning to pipelines (Trivy, Grype, Snyk, and more)
/configure-dast-scan Add DAST scanning to pipelines for runtime application security testing (Traceable, Burp Suite, ZAP, Nikto, Nmap)
/exempt-vuln Create STO security exemptions for vulnerabilities (Vuln tab & All Issues page)

Platform Intelligence (MCP)

Skill Description
/analyze-costs Cloud cost analysis and optimization (CCM)
/security-report Vulnerability reports, SBOMs, compliance (SCS/STO)
/dora-metrics DORA metrics and engineering performance (SEI)
/sei-analytics Sprint analytics, investment allocation, capacity forecasting, release readiness
/manage-slos SLO definition, error budgets, incident detection, runbooks (SRM)
/ai-operations Predictive failure analysis and intelligent alert correlation (AIDA)
/gitops-status GitOps application health and sync status
/chaos-experiment Create and run chaos experiments
/scorecard-review Service maturity scorecards (IDP)
/manage-idp Service catalog, self-service workflows, documentation, onboarding (IDP)
/manage-iacm Terraform workspaces, drift detection, cost estimation (IaCM)
/manage-cde Cloud development environments and workspace templates (CDE)
/manage-artifacts Artifact registry, security scanning, replication (AR)
/manage-supply-chain SBOM generation, artifact signing, supply chain policies (SSCA)
/audit-report Audit trails and compliance reports
/create-policy Create OPA governance policies for supply chain security

Project Structure

harness-skills/
├── skills/
│   ├── create-pipeline/
│   │   ├── SKILL.md
│   │   └── references/
│   ├── create-template/
│   │   └── SKILL.md
│   ├── debug-pipeline/
│   │   └── SKILL.md
│   └── ...                      # Skill definitions
├── references/                  # Shared repo-level playbooks
├── templates/                   # Shared repo-level output templates
├── scripts/
│   └── validate-skills.sh       # Structural validation
├── examples/
│   ├── v0/                      # v0 pipeline examples
│   ├── v1/                      # v1 pipeline examples
│   ├── templates/               # Template examples
│   ├── triggers/                # Trigger examples
│   ├── services/                # Service definition examples
│   ├── environments/            # Environment examples
│   ├── connectors/              # Connector examples
│   └── ...
├── .cursor/rules/harness.mdc    # Auto-loaded by Cursor
├── .github/copilot-instructions.md
├── AGENTS.md                    # Auto-loaded by OpenAI Codex
├── CLAUDE.md                    # Auto-loaded by Claude Code
├── CONTRIBUTING.md              # Contribution guidelines
├── LICENSE
└── README.md

Shared Playbooks and Templates

Use root-level shared assets for behavior that should stay consistent across many skills:

  • references/ - reusable operating guidance such as scope establishment, dependency verification, and schema-validation loops
  • templates/ - reusable output contracts such as operation summaries and report formats

Use per-skill references/ or templates/ when the content is domain-specific and should not be imported broadly.

Skill Anatomy

Each skill is a directory under skills/ containing a SKILL.md with YAML frontmatter and a consistent markdown body:

---
name: my-skill
description: >-
  Explain what the skill does, when to use it, when not to use it, and likely
  trigger phrases. Keep it under 1024 characters.
metadata:
  author: Harness
  version: 1.0.0
  mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)
---

# My Skill

One or two sentences describing the operating mode and expected outcome.

## Instructions

Phase-based steps for Claude to follow.

## Examples

Invocation examples and, for complex skills, brief worked examples.

## Performance Notes

Validation checks, tradeoffs, or speed/accuracy guidance.

## Troubleshooting

Common errors, recovery steps, and expected fallbacks.

For complex skills, add references/ or templates/ under the skill directory rather than bloating SKILL.md.

MCP Tools

MCP-powered skills use the Harness MCP v2 server, which provides 10 generic tools dispatched by resource_type:

Tool Purpose
harness_list List resources
harness_get Get resource details
harness_create Create a resource
harness_update Update a resource
harness_delete Delete a resource
harness_execute Execute an action
harness_search Search across resources
harness_describe Get resource schema
harness_diagnose Diagnose issues
harness_status Check system status

Schema References

Contributing

See CONTRIBUTING.md for skill authoring standards, validation rules, and contribution workflow.

License

This project is licensed under the Apache License 2.0.

Copyright 2026 Harness Inc.

About

A collection of structured AI agent skills that enable Claude Code, Cursor, GitHub Copilot, and other AI coding assistants to create, operate, debug, and govern Harness CI/CD workflows through natural language.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages