create-environment

Generate Harness environment YAML for deployment targets and create the environment via MCP. Supports PreProduction and Production types, includes environment variables, manifest overrides, and multi-environment settings (development, pre-release, production). Use when creating environments, setting pre-release or production, defining deployment targets, or managing environment overrides.

Last repository push
GitHub Stars
138
Forks
30
Issues / PRs
4

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "create-environment" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-61e9cbea86f3f33f2f275fdf3853b3758cde6d9679c89f8021ba596d320a521c. Verify the upstream source and version against https://github.com/harness/harness-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Generate Harness environment YAML for deployment targets and create the environment via MCP. Supports PreProduction and Production types, includes environment variables, manifest overrides, and multi-environment settings (development, pre-release, production). Use when creating environments, setting pre-release or production, defining deployment targets, or managing environment overrides.

0 Downloads

Introduction source: third_party · harness · 2.0.0 Reference

SkillPi interpretation

Tasks
Not specified in the source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Create dev, staging, and prod: ```yaml
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: create-environment
description: >-
  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.
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)

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

  • PreProduction - Dev, QA, staging, integration environments
  • Production - Live production environments (enables additional safeguards)

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

  • "Create dev, staging, and prod environments" - Generate 3 environments with appropriate types
  • "Set up a production environment with overrides" - Production type with manifest overrides

Performance Notes

  • When creating multiple environments (dev/staging/prod), ensure variable values are distinct per environment.
  • Verify that manifest override paths exist in the referenced repository before creating.
  • Use Production type only for live environments — it enables additional safeguards like deployment freezes.

Troubleshooting

  • DUPLICATE_IDENTIFIER - Environment exists; use harness_update
  • Production type enables deployment freeze and approval guardrails

Current listing version

2.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供 Harness 环境 YAML 生成与 MCP 创建能力,支持 PreProduction/Production 类型区分
  • 涵盖多环境设置(dev/staging/prod)及环境变量、清单覆盖等企业级需求
Trigger Precision95/100

Highlights

  • 触发词完整覆盖多种变体(create environment, deployment environment, setup dev/staging/production 等)
  • 边界清晰,不易误触或漏触
Structure and Standards95/100

Highlights

  • Phase/步骤清晰(Determine type -> Define variables -> Generate YAML -> Create via MCP)
  • 含端到端示例和完整 frontmatter,结构规范
Execution Reliability85/100

Highlights

  • 工具来源明确(harness-mcp-v2),参数正确
  • 覆盖主要异常(DUPLICATE_IDENTIFIER),不可逆操作有确认机制提示
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Create dev, staging, and prod: ```yaml

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.