Skip to main content

Harness Skills

Last updated on

Harness Skills are specialized prompt templates that teach AI coding assistants how to interact with the Harness platform. Each skill encapsulates the domain knowledge needed to accomplish a specific task — generating pipeline YAML, creating services, debugging executions, analyzing costs, and more — so you can work with Harness using natural language in your editor.

The repository is designed as a workflow system, not just a folder of prompts. 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.

How skills work

Skills are Markdown files with structured instructions that AI editors load as context. When you invoke a skill (for example, /create-pipeline), the AI reads the skill's instructions and uses the Harness MCP Server tools to execute actions against the Harness platform.

Natural language prompt
→ AI editor loads skill instructions
→ Skill orchestrates MCP tool calls (harness_list, harness_create, etc.)
→ Harness MCP Server
→ Harness Platform APIs

Skills don't embed API schemas directly. Instead, they use the harness_describe MCP tool to discover resource schemas at runtime, keeping skills lightweight and always up to date.

Prerequisites

  • AI coding assistant: Claude Code, Cursor, GitHub Copilot, OpenAI Codex, or Windsurf
  • Harness MCP Server: Required for tool execution. See MCP Server setup
  • Harness API key: Generate an API key

Set up skills

Claude Code

Clone the skills repository and start Claude Code from it:

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

Configure the Harness MCP server in ~/.claude/settings.json:

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

Skills are auto-discovered from the CLAUDE.md file and the skills/ directory. Invoke a skill by name:

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

Cursor

Cursor auto-loads the project rules from .cursor/rules/harness.mdc.

  1. Open the harness-skills folder in Cursor.
  2. Configure the MCP server in ~/.cursor/mcp.json:
{
"mcpServers": {
"harness-mcp-v2": {
"command": "npx",
"args": ["-y", "harness-mcp-v2"],
"env": {
"HARNESS_API_KEY": "<your-api-key>"
}
}
}
}
  1. Reference skills using @file:
@harness-skills/skills/create-pipeline/SKILL.md
Create a CI pipeline for my Go microservice

GitHub Copilot

GitHub Copilot auto-loads instructions from .github/copilot-instructions.md.

  1. Open the harness-skills folder in VS Code.
  2. Configure the MCP server in .vscode/mcp.json:
{
"servers": {
"harness-mcp-v2": {
"command": "npx",
"args": ["-y", "harness-mcp-v2"],
"env": {
"HARNESS_API_KEY": "<your-api-key>"
}
}
}
}
  1. Reference skills using #file:
#file:harness-skills/skills/create-pipeline/SKILL.md
Create a CI/CD pipeline for my Python app

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.

OpenAI Codex

Codex auto-loads the AGENTS.md file as system instructions.

  1. Clone the repo into your working directory:
git clone https://github.com/harness/harness-skills.git
  1. Configure the MCP server in your Codex MCP configuration:
{
"mcpServers": {
"harness-mcp-v2": {
"command": "npx",
"args": ["-y", "harness-mcp-v2"],
"env": {
"HARNESS_API_KEY": "<your-api-key>"
}
}
}
}
  1. Reference skill files as context when prompting:
Using the instructions in harness-skills/skills/debug-pipeline/SKILL.md,
diagnose why my deploy pipeline failed

Windsurf and other AI editors

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

  • System instructions: Use CLAUDE.md as project-level context.
  • MCP servers: Connect the Harness MCP Server for API access.
  • 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, and 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.

Workflow modes

Workflow modeRepresentative skillsWhen to use
Create and scaffold/create-pipeline, /create-service, /create-connector, /create-templateYou need to define or generate new Harness resources and their YAML or MCP payloads
Run and debug/run-pipeline, /debug-pipeline, /migrate-pipeline, /manage-delegatesYou already have resources and need to execute, diagnose, or repair behavior
Govern and secure/manage-roles, /manage-users, /create-policy, /security-report, /audit-reportYou need RBAC, policy, compliance, or security workflows
Analyze and report/dora-metrics, /analyze-costs, /scorecard-review, /template-usageYou need structured reports, recommendations, or adoption analysis

Available skills

Pipeline and template creation

SkillDescription
/create-pipelineGenerate v0 pipeline YAML (CI, CD, approvals, matrix strategies)
/create-pipeline-v1Generate v1 simplified pipeline YAML — alpha: internal testing only
/create-templateCreate reusable step, stage, pipeline, or step group templates
/create-triggerCreate webhook, scheduled, and artifact triggers
/create-agent-templateCreate AI-powered agent templates — alpha: internal testing only

Resource management

SkillDescription
/create-serviceCreate service definitions (Kubernetes, Helm, ECS, Lambda)
/create-environmentCreate environment definitions with overrides
/create-infrastructureCreate infrastructure definitions
/create-connectorCreate connectors (Git, cloud, registries, clusters)
/create-secretCreate secrets (text, file, SSH, WinRM)

Access control and feature flags

SkillDescription
/manage-usersManage users, user groups, and service accounts
/manage-rolesManage role assignments and RBAC
/manage-feature-flagsCreate, list, toggle, and delete feature flags

Operations and debugging

SkillDescription
/run-pipelineExecute pipelines, monitor progress, handle approvals
/debug-pipelineAnalyze execution failures, diagnose root causes
/migrate-pipelineConvert pipelines from v0 to v1 format
/template-usageTrack template dependencies and adoption
/manage-delegatesMonitor delegate health and manage tokens

Platform intelligence

SkillDescription
/analyze-costsCloud cost analysis and optimization (CCM)
/security-reportVulnerability reports, SBOMs, compliance (SCS/STO)
/dora-metricsDORA metrics and engineering performance (SEI)
/gitops-statusGitOps application health and sync status
/chaos-experimentCreate and run chaos experiments
/scorecard-reviewService maturity scorecards (IDP)
/audit-reportAudit trails and compliance reports
/create-policyCreate OPA governance policies for supply chain security

End-to-end workflows

Skills can be chained together for multi-step workflows. Resources that depend on other resources must be created in the correct order.

New microservice setup

Use these skills in order:

  1. /create-connector — Git, Docker registry, and Kubernetes cluster connectors
  2. /create-secret — Credentials for connector authentication
  3. /create-service — Service definition referencing connectors
  4. /create-environment — Target environment configuration
  5. /create-infrastructure — Infrastructure definition for the target cluster
  6. /create-pipeline — CI/CD pipeline referencing the service, environment, and infrastructure
  7. /create-trigger — Webhook or schedule trigger to automate the pipeline

Debug a failed deployment

Typical sequence:

  1. /run-pipeline — Identify the latest execution or reproduce the issue
  2. /debug-pipeline — Classify the failure and inspect root cause
  3. /template-usage — Check if shared templates propagated the issue
  4. /manage-delegates — Investigate delegate capacity or connectivity if relevant

Codebase-aware pipeline generation

The /create-pipeline skill includes codebase analysis capabilities. It can scan your project files to auto-detect:

  • Language and runtime from source files (package.json → Node.js, go.mod → Go)
  • Build tools from build configuration (Dockerfile, webpack.config.js, pom.xml)
  • Test frameworks from test configuration (jest.config.*, pytest.ini)
  • Deployment targets from manifests (Chart.yaml → Helm, task-definition.json → ECS)

This allows the skill to generate pipeline YAML tailored to your project without manual configuration.

Skill anatomy

Each skill lives in skills/<skill-name>/SKILL.md and follows a consistent structure:

skills/create-pipeline/
├── SKILL.md # Skill definition (required)
└── references/ # Supplementary docs (optional)
├── native-steps.md
├── v0-pipeline-schema.md
└── codebase-analysis.md

The SKILL.md file contains:

  • Frontmatter: Name, description, version, MCP server dependency, and license metadata.
  • Instructions: Phase-based steps with MCP tool calls and parameters.
  • Examples: Real invocation scenarios and worked examples.
  • Performance notes: Validation checks, tradeoffs, and optimization guidance.
  • Troubleshooting: Common errors and recovery steps.

Reference files in the references/ subdirectory provide supplementary knowledge like schema definitions, decision trees, and template libraries that the AI loads on demand.

MCP tools

Skills use the Harness MCP Server, which provides 10 generic tools dispatched by resource_type:

ToolPurpose
harness_listList resources
harness_getGet resource details
harness_createCreate a resource
harness_updateUpdate a resource
harness_deleteDelete a resource
harness_executeExecute an action
harness_searchSearch across resources
harness_describeGet resource schema
harness_diagnoseDiagnose issues
harness_statusCheck system status

Project structure

harness-skills/
├── skills/
│ ├── create-pipeline/
│ │ ├── SKILL.md
│ │ └── references/
│ ├── create-template/
│ │ └── SKILL.md
│ ├── debug-pipeline/
│ │ └── SKILL.md
│ └── ...
├── references/ # Shared repo-level playbooks
├── templates/ # Shared repo-level output templates
├── examples/
│ ├── v0/ # v0 pipeline examples
│ ├── v1/ # v1 pipeline examples
│ ├── templates/
│ ├── triggers/
│ ├── services/
│ ├── environments/
│ ├── connectors/
│ └── ...
├── .cursor/rules/harness.mdc
├── .github/copilot-instructions.md
├── AGENTS.md
├── CLAUDE.md
└── CONTRIBUTING.md

Next steps