create-pipeline-v1
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
Generate Harness v1 simplified Pipeline YAML using the new concise syntax with flat structure, ${{ }} expressions, script field, and action steps. Supports CI stages (run, run-test, background), CD stages (service/environment with action steps for K8s, Helm, ECS), approval (stage-level and inline), parallel execution, matrix/for/while strategies, caching, volumes, and templates. Use when asked for a v1 pipeline, simplified pipeline, new pipeline format, or when user specifically requests v1 syntax. Do NOT use for v0/standard pipelines (use create-pipeline). Trigger phrases: v1 pipeline, simplified pipeline, new pipeline format, create v1, modern pipeline syntax.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 0 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Consult the spec reference: - Use references/v1-spec-schema.md for the complete v1 schema, step types, action catalog, and examples
- Very specific: line 30
Select native actions: - Always prefer native action and template steps over run: steps.
- Very specific: line 41
Use run: steps only for custom build/test/lint commands with no native equivalent
- Very specific: line 460
Always check references/native-actions.md before using a run: step.
- Very specific: line 461
Always consult references/v1-spec-schema.md for the complete v1 spec before generating YAML.
- Very specific: line 462
Use script: field in run steps, never command: or run: as the field name.
- Very specific: line 463
Use action: uses: or template: uses: for deployments, never v0 native step types like K8sRollingDeploy.
- Very specific: line 464
Do not mix v0 and v1 syntax.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Pipeline v1
Generate Harness v1 simplified Pipeline YAML and optionally push to Harness via MCP.
Alpha: This skill is currently in internal testing only.
Instructions
- Confirm v1 format - User must specifically want v1 syntax. Default to v0 (
/create-pipeline) if unclear. - Clarify requirements - Pipeline type (CI, CD, or both), language/framework, deployment target
- Consult the spec reference - Use
references/v1-spec-schema.mdfor the complete v1 schema, step types, action catalog, and examples - Select native actions - Always prefer native action and template steps over
run:steps. Consultreferences/native-actions.mdfor the full mapping. Key rules:- Docker build/push → use
template: uses: buildAndPushToDocker/buildAndPushToECR/buildAndPushToGAR(neverrun: docker build && docker push) - K8s deploy → use
action: uses: kubernetes-rolling-deployortemplate: uses: k8sRollingDeployStep(neverrun: kubectl apply) - Helm deploy → use
action: uses: helm-deployortemplate: uses: helmDeployBasicStep(neverrun: helm upgrade --install) - ECS deploy → use
template: uses: ecsBluegreenDeployStep(neverrun: aws ecs update-service) - Terraform → use
template: uses: terraformStep(neverrun: terraform apply) - Security scanning → use native STO templates (
gitleaksStep,banditStep,sbomOrchestrationStep) - Uploads → use
template: uses: uploadArtifactsToS3/uploadArtifactsToGCS(neverrun: aws s3 cp) - Approvals → use
approval: uses: harnessorapproval: uses: jira(never polling scripts) - Ticketing → use
action: uses: jira-create/snow-create(neverrun: curl) - HTTP requests → use
action: uses: httportemplate: uses: httpStep(neverrun: curl) - Use
run:steps only for custom build/test/lint commands with no native equivalent
- Docker build/push → use
- Generate v1 YAML using flat structure,
${{ }}expressions,scriptfield for run steps, andaction/templatesteps for deployments - Optionally create via MCP using
harness_createwith resource_typepipeline
v1 Key Differences from v0
| v0 Syntax | v1 Syntax |
<+variable> expressions | ${{ variable }} expressions |
type: CI / type: Deployment stage types | Flat stages -- no type field |
command: field in Run steps | script: field in run: steps |
Native steps (K8sRollingDeploy, HelmDeploy) | Action steps (action: uses: kubernetes-rolling-deploy) |
failureStrategies: | on-failure: |
HarnessApproval step type | approval: uses: harness (stage-level or inline) |
Deep nesting (spec: execution: steps:) | Flat structure (steps:) |
strategy: matrix: under stage spec | strategy: matrix: directly on stage or step |
Pipeline Structure
pipeline:
name: My Pipeline
repo: # optional: repository config
connector: account.github
name: myorg/my-repo
clone: # optional: clone config
depth: 1
on: # optional: event triggers
- push:
branches: [main]
env: # optional: global env vars
NODE_ENV: production
inputs: # optional: pipeline inputs
branch:
type: string
default: main
stages:
- name: build
steps:
- run:
script: go buildNo version:, kind:, or spec: wrapper -- pipeline: is the root key.
Stages
Stages have no type field. Their purpose is determined by their keys.
CI Stage
- name: build
runtime: cloud
platform:
os: linux
arch: arm
cache:
path: node_modules
key: npm.${{ branch }}
steps:
- run:
script: npm ciDeployment Stage
- name: deploy
service: my-service
environment: staging
steps:
- action:
uses: kubernetes-rolling-deploy
with:
dry-run: falseApproval (stage-level)
- approval:
uses: harness
with:
timeout: 30m
message: "Approve deployment?"
groups: [admins, ops]
min-approvers: 1Step Types
Run Step
Uses script: field (not command: or run:).
# long syntax
- run:
script: npm test
# short syntax
- run: npm test
# with container
- run:
container: node:18
script: npm test
# with shell and env
- run:
shell: bash
script: |
npm ci
npm test
env:
NODE_ENV: test
# with output variables
- id: build
run:
script: echo "TAG=v1" >> $HARNESS_OUTPUT
output: [TAG]Run Test Step
- run-test:
container: maven
script: mvn test
report:
type: junit
path: target/surefire-reports/*.xml
splitting:
concurrency: 4Action Step
Actions replace v0 native steps. See references/v1-spec-schema.md for the full action catalog.
# Kubernetes deploy
- action:
uses: kubernetes-rolling-deploy
with:
dry-run: false
# Helm deploy
- action:
uses: helm-deploy
with:
timeout: 10m
# Terraform plan
- action:
uses: terraform-plan
with:
command: apply
aws-provider: account.aws_connector
# HTTP request
- action:
uses: http
with:
method: GET
endpoint: https://acme.comBackground Step
- background:
container: redis
- run:
script: npm testTemplate Step
- template:
uses: account.docker@1.0.0
with:
push: true
tags: latestApproval Step (inline)
- approval:
uses: jira
with:
connector: account.jira
project: PROJParallel and Group
# parallel steps
- parallel:
steps:
- run:
script: npm run lint
- run:
script: npm test
# parallel stages
- parallel:
stages:
- steps:
- run: go test
- steps:
- run: npm test
# step group
- group:
steps:
- run:
script: go build
- run:
script: go testStrategy
# matrix (stage-level)
- strategy:
matrix:
node: [16, 18, 20]
os: [linux, macos]
max-parallel: 3
steps:
- run:
container: node:${{ matrix.node }}
script: npm test
# matrix (step-level)
- strategy:
matrix:
go: [1.19, 1.20, 1.21]
run:
container: golang:${{ matrix.go }}
script: go testFailure Strategy
# step-level
- run:
script: go test
on-failure:
errors: all
action: ignore # abort, ignore, retry, fail, success
# retry with attempts
- run:
script: go test
on-failure:
errors: [unknown]
action:
retry:
attempts: 5
interval: 10s
failure-action: fail
# stage-level
- steps:
- run:
script: go test
on-failure:
errors: all
action: abortConditional Execution
# stage conditional
- if: ${{ branch == "main" }}
steps:
- run:
script: deploy.sh
# step conditional
- if: ${{ branch == "main" }}
run:
script: deploy.shComplete CI Example
pipeline:
repo:
connector: account.github
name: myorg/my-app
clone:
depth: 1
on:
- push:
branches: [main]
- pull_request:
branches: [main]
stages:
- name: build-and-test
runtime: cloud
platform:
os: linux
arch: arm
cache:
path: node_modules
key: npm.${{ branch }}
steps:
- run:
script: npm ci
- parallel:
steps:
- run:
script: npm run lint
- run-test:
script: npm test
report:
type: junit
path: junit.xml
- action:
uses: docker-build-push
with:
connector: dockerhub
repo: myorg/my-app
tags: [${{ pipeline.sequenceId }}, latest]Complete CD Example
pipeline:
inputs:
skip_dry_run:
type: boolean
default: false
stages:
- name: deploy-staging
service: petstore
environment: staging
steps:
- action:
uses: manifest-download
- action:
uses: manifest-bake
- action:
uses: kubernetes-rolling-deploy
with:
dry-run: ${{ inputs.skip_dry_run }}
- approval:
uses: harness
with:
timeout: 1d
message: "Approve production deployment?"
groups: [prod-approvers]
min-approvers: 1
- name: deploy-prod
service: petstore
environment: prod
steps:
- action:
uses: manifest-download
- action:
uses: manifest-bake
- action:
uses: kubernetes-rolling-deploy
with:
dry-run: falseCreating via MCP
- Verify the project exists — List projects with
harness_list(resource_type:project, org_id) to confirm. If the project does not exist, create it first withharness_create(resource_type:project, body:{ identifier, name }) or ask the user. - Create the pipeline — Use
harness_createwith the v1 pipeline YAML serialized as ayamlPipelinestring in the body. Do not pass a nested JSONpipelineobject; it causes serialization errors.
Call MCP tool: harness_create
Parameters:
resource_type: "pipeline"
org_id: "<organization>"
project_id: "<project>"
body: { yamlPipeline: "<full v1 pipeline YAML string, including 'pipeline:' root key>" }Examples
Create a v1 CI pipeline
/create-pipeline-v1
Create a v1 CI pipeline for a Node.js app with caching, parallel lint and test, and Docker pushCreate a v1 deployment pipeline
/create-pipeline-v1
Create a v1 Kubernetes deployment pipeline with staging approval and production stagesCreate a v1 matrix build
/create-pipeline-v1
Create a v1 pipeline that tests across Go 1.19, 1.20, and 1.21 using matrix strategyPerformance Notes
- Always check
references/native-actions.mdbefore using arun:step. Native actions provide better error handling, rollback support, and UI integration. - Always consult
references/v1-spec-schema.mdfor the complete v1 spec before generating YAML. - Use
script:field in run steps, nevercommand:orrun:as the field name. - Use
action: uses:ortemplate: uses:for deployments, never v0 native step types likeK8sRollingDeploy. - Do not mix v0 and v1 syntax. No
<+...>expressions, notype:on stages, nospec:wrapper. - Validate all expressions use
${{ }}syntax before presenting.
Troubleshooting
Common v1 Syntax Errors
- Using
<+...>instead of${{ ... }}expressions - Adding
type:field on stages (v1 stages have no type) - Using
command:orrun:as the field name instead ofscript: - Wrapping pipeline in
version:,kind:,spec:(v1 uses barepipeline:) - Using v0 step types (
K8sRollingDeploy) instead of actions (action: uses: kubernetes-rolling-deploy) - Using
failureStrategies:instead ofon-failure:
MCP Errors
- Project not found — Verify the project exists with
harness_list(resource_type:project, org_id). Create it first or confirm org_id/project_id are correct. - Missing required fields for pipeline: pipeline — Pass the body as
{ yamlPipeline: "<full v1 pipeline YAML string>" }instead of a nested JSONpipelineobject. DUPLICATE_IDENTIFIER— Pipeline exists; useharness_updateINVALID_REQUEST— Check YAML structure matches v1 schema
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12799% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- analyze-costsSkill
- audit-reportSkill
- chaos-experimentSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- debug-pipelineSkill
- dora-metricsSkill
- gitops-statusSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-rolesSkill
- manage-usersSkill
- migrate-pipelineSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
- template-usageSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

