Generate Harness v0 Template YAML for reusable pipeline components (Step, Stage, Pipeline, StepGroup) and create them via MCP. Use when asked to create a template, build a step template, stage template, pipeline template, or reusable step. Do NOT use for checking template usage or references (use template-usage instead). Trigger phrases: create template, step template, stage template, pipeline template, reusable step, template YAML.
68
82%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No known issues
Generate Harness v0 Template YAML for reusable components and push via MCP.
<+input> for runtime inputsversionLabelharness_create with resource_type templateharness_list with resource_type templatetemplate:
name: My Template
identifier: my_template
versionLabel: "1.0.0"
type: Step # Step, Stage, Pipeline, StepGroup
orgIdentifier: default
projectIdentifier: my_project
tags: {}
spec: ... # Content depends on typetemplate:
name: Docker Build Push
identifier: docker_build_push
versionLabel: "1.0.0"
type: Step
spec:
type: BuildAndPushDockerRegistry
spec:
connectorRef: <+input>
repo: <+input>
tags: <+input>
dockerfile: Dockerfile
context: .
timeout: 15mtemplate:
name: K8s Deploy Stage
identifier: k8s_deploy_stage
versionLabel: "1.0.0"
type: Stage
spec:
type: Deployment
spec:
deploymentType: Kubernetes
service:
serviceRef: <+input>
environment:
environmentRef: <+input>
infrastructureDefinitions:
- identifier: <+input>
execution:
steps:
- step:
identifier: rollout
name: Rollout
type: K8sRollingDeploy
spec:
skipDryRun: false
timeout: 10m
rollbackSteps:
- step:
identifier: rollback
name: Rollback
type: K8sRollingRollback
spec: {}
timeout: 10m
failureStrategies:
- onFailure:
errors: [AllErrors]
action:
type: StageRollbacktemplate:
name: Standard CI/CD
identifier: standard_cicd
versionLabel: "1.0.0"
type: Pipeline
spec:
stages:
- stage:
identifier: build
name: Build
type: CI
spec:
cloneCodebase: true
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
execution:
steps:
- step:
identifier: build
name: Build
type: Run
spec:
shell: Bash
command: <+input>template:
name: Test Suite
identifier: test_suite
versionLabel: "1.0.0"
type: StepGroup
spec:
steps:
- step:
identifier: unit_tests
name: Unit Tests
type: Run
spec:
shell: Bash
command: <+input>
- step:
identifier: integration_tests
name: Integration Tests
type: Run
spec:
shell: Bash
command: <+input>Mark configurable fields with <+input> so users provide values when using the template:
spec:
connectorRef: <+input> # User selects connector
repo: <+input> # User provides repo name
tags:
- <+input> # User provides tag
- <+pipeline.sequenceId> # Fixed valueCall MCP tool: harness_create
Parameters:
resource_type: "template"
org_id: "<organization>"
project_id: "<project>"
body: <the template YAML>To update a template version:
Call MCP tool: harness_update
Parameters:
resource_type: "template"
resource_id: "<template_identifier>"
org_id: "<organization>"
project_id: "<project>"
body: <updated template YAML with new versionLabel>To list existing templates:
Call MCP tool: harness_list
Parameters:
resource_type: "template"
org_id: "<organization>"
project_id: "<project>"- stage:
identifier: deploy
name: Deploy
template:
templateRef: k8s_deploy_stage
versionLabel: "1.0.0"
templateInputs:
type: Deployment
spec:
service:
serviceRef: my_service
environment:
environmentRef: prod<+input> to maximize template reusability.DUPLICATE_IDENTIFIER - Template exists; update with new versionLabelINVALID_VERSION - versionLabel must be unique per template^[a-zA-Z_][0-9a-zA-Z_]{0,127}$TEMPLATE_NOT_FOUND - Check templateRef and scope (account/org/project)VERSION_NOT_FOUND - Verify versionLabel exists<+input> valuesa48c95a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.