Agent Skill · Harness

create-environment

Generate Harness Environment YAML for deployment targets and create via MCP. Supports PreProduction and Production types with environment variables, manifest overrides, and multi-environment setup (dev, staging, prod). Use when asked to create an environment, set up staging, configure production, define deployment targets, or manage environment overrides. Trigger phrases: create environment, deployment environment, setup dev, setup staging, setup production, environment variables, environment overrides.

Provider: Harness Path in repo: skills/create-environment/SKILL.md

Skill body

Create Environment

Generate Harness Environment YAML and push to Harness via MCP.

Instructions

  1. Determine environment type - PreProduction for dev/staging/QA, Production for live environments
  2. Define variables and overrides - Environment-specific config values and manifest overrides
  3. Generate YAML using the structure below
  4. Create via MCP using harness_create with resource_type environment

Environment Structure

environment:
  name: Staging
  identifier: staging
  orgIdentifier: default
  projectIdentifier: my_project
  type: PreProduction       # PreProduction or Production
  tags:
    tier: staging
  variables:
    - name: domain
      type: String
      value: staging.myapp.com
    - name: replicas
      type: Number
      value: "2"
    - name: db_password
      type: Secret
      value: <+secrets.getValue("staging_db_password")>
  overrides:
    manifests:
      - manifest:
          identifier: values_override
          type: Values
          spec:
            store:
              type: Github
              spec:
                connectorRef: github
                repoName: config
                branch: main
                paths: [values-staging.yaml]

Environment Types

Multi-Environment Setup

Create dev, staging, and prod:

# Dev
environment:
  name: Development
  identifier: dev
  type: PreProduction
  variables:
    - name: domain
      type: String
      value: dev.myapp.com

# Staging
environment:
  name: Staging
  identifier: staging
  type: PreProduction
  variables:
    - name: domain
      type: String
      value: staging.myapp.com

# Production
environment:
  name: Production
  identifier: prod
  type: Production
  variables:
    - name: domain
      type: String
      value: myapp.com

Creating via MCP

Call MCP tool: harness_create
Parameters:
  resource_type: "environment"
  org_id: "<organization>"
  project_id: "<project>"
  body: <environment YAML>

List environments:

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

Examples

Performance Notes

Troubleshooting

Skill frontmatter

metadata: {"author" => "Harness", "version" => "2.0.0", "mcp-server" => "harness-mcp-v2"} license: Apache-2.0 compatibility: Requires Harness MCP v2 server (harness-mcp-v2)

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/create-environment"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.