agentsclimarketplace

Creating environments

Skill pvnarp/harness-agentic-skills/skills/harness/creating-environments

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.From its SKILL.md

Install
npx -y skills add pvnarp/harness-agentic-skills --skill creating-environments

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.0 KB, as published. Nobody here has run it

Create Environment

What this skill uses

Harness MCP tools: harness:harness_create, harness:harness_list, harness:harness_schema, harness:harness_update Resource types: environment

Generate Harness Environment YAML and push to Harness via MCP.

Schema discovery (do this first)

Before hand-rolling YAML, fetch the live schema from the MCP. It is authoritative and saves you guessing field names. Use these calls in order:

  • harness:harness_schema(resource_type='environment') for top-level summary of fields and sections.
  • harness:harness_schema(resource_type='environment', path='<dotted.section>') to drill into a specific section.
  • harness:harness_schema(resource_type='environment', example_search='<keyword>') to find a working example.
  • harness:harness_schema(resource_type='environment', example='<example-name>') to fetch the full example YAML.

If a section is more complex than expected, drill into it with path instead of asking the user. Only fall back to authoring without schema lookup if the resource type is not in the bundled schemas list.

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: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:harness_create
Parameters:
  resource_type: "environment"
  org_id: "<organization>"
  project_id: "<project>"
  body: <environment YAML>

List environments:

Call MCP tool: harness: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

Related skills

Composes with (skills commonly invoked together):

Follow-ups (skills commonly chained after this one):

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:harness_update
  • Production type enables deployment freeze and approval guardrails

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.