create-template
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
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.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 242
Verify the versionLabel is unique for each template update.
- Distinctive: line 243
Test template references in a pipeline before distributing to other teams.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Template
Generate Harness v0 Template YAML for reusable components and push via MCP.
Instructions
- Determine template type - Step, Stage, Pipeline, or StepGroup
- Identify reusable parameters - Mark configurable fields with
<+input>for runtime inputs - Generate YAML using the structure below with a unique
versionLabel - Create via MCP using
harness_createwith resource_typetemplate - Verify creation using
harness_listwith resource_typetemplate
Template Types
- Step - Reusable step definitions
- Stage - Reusable stage definitions
- Pipeline - Complete reusable pipelines
- StepGroup - Groups of related steps
Template Structure
template:
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 typeStep Template
template:
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: 15mStage Template
template:
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: StageRollbackPipeline Template
template:
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>StepGroup Template
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>Using Runtime Inputs
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 valueCreating via MCP
Call 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>"Referencing Templates in Pipelines
- stage:
identifier: deploy
name: Deploy
template:
templateRef: k8s_deploy_stage
versionLabel: "1.0.0"
templateInputs:
type: Deployment
spec:
service:
serviceRef: my_service
environment:
environmentRef: prodExamples
- "Create a Docker build and push step template" - Generate Step template with BuildAndPushDockerRegistry
- "Create a reusable K8s deployment stage" - Generate Stage template with Deployment type
- "Make a standard CI/CD pipeline template" - Generate Pipeline template with CI + CD stages
Performance Notes
- Mark all configurable fields with
<+input>to maximize template reusability. - Verify the versionLabel is unique for each template update.
- Test template references in a pipeline before distributing to other teams.
Troubleshooting
Template Creation Errors
DUPLICATE_IDENTIFIER- Template exists; update with new versionLabelINVALID_VERSION- versionLabel must be unique per template- Identifiers must match
^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
Template Usage Errors
TEMPLATE_NOT_FOUND- Check templateRef and scope (account/org/project)VERSION_NOT_FOUND- Verify versionLabel exists- Missing templateInputs - Provide all
<+input>values
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12798% same
Wrote their own version · 13
- steipete/warelay★ 394ksame name
- moltbot/clawdbot★ 394ksame name
- moltbot/moltbot★ 394ksame name
- clawdbot/clawdbot★ 394ksame name
- steipete/clawdis★ 394ksame name
- openclaw/openclaw★ 394ksame name
- ComplianceAsCode/content★ 2.8ksame name
- brwse/earl★ 113same name
- mathematic-inc/earl★ 113same name
- GhostManager/ghostwriter-skills★ 7same name
3 more not listed
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-pipeline-v1Skill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- 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.

