Generate Harness Trigger YAML for automated pipeline execution and create via MCP. Use when user says "create trigger", "webhook trigger", "cron trigger", "scheduled build", "artifact trigger", or wants pipelines to run automatically.
65
77%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/claude/skills/create-trigger/SKILL.mdGenerate Harness Trigger YAML and push to Harness via MCP.
harness_create with resource_type triggertrigger:
name: PR Trigger
identifier: pr_trigger
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Github
spec:
type: PullRequest
spec:
connectorRef: github_connector
autoAbortPreviousExecutions: true
payloadConditions:
- key: targetBranch
operator: Equals
value: main
headerConditions: []
jexlCondition: ""
actions:
- Open
- Reopen
- Synchronize
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: PR
spec:
number: <+trigger.prNumber>Push - Code pushed to branchPullRequest - PR events (Open, Close, Reopen, Synchronize, Edit)IssueComment - PR comments (Create, Edit, Delete)Release - Release events (Create, Publish, Edit)trigger:
name: GitLab Push
identifier: gitlab_push
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Gitlab
spec:
type: Push
spec:
connectorRef: gitlab_connector
payloadConditions:
- key: ref
operator: Contains
value: maintrigger:
name: Nightly Build
identifier: nightly_build
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Scheduled
spec:
type: Cron
spec:
expression: "0 2 * * *" # 2 AM daily
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: branch
spec:
branch: mainCron format: <minute> <hour> <day-of-month> <month> <day-of-week>
trigger:
name: New Image Trigger
identifier: new_image
pipelineIdentifier: deploy_pipeline
source:
type: Artifact
spec:
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/myimage
tag: <+trigger.artifact.build>
inputYaml: |
pipeline:
identifier: deploy_pipeline
stages:
- stage:
identifier: deploy
spec:
service:
serviceRef: my_serviceDockerRegistry - Docker HubEcr - AWS ECRGcr - Google Container RegistryAcr - Azure Container RegistryNexus3Registry - NexusAmazonS3 - S3 artifactsCall MCP tool: harness_create
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"
body: <trigger YAML>To list existing triggers:
Call MCP tool: harness_list
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"Filter triggers by webhook payload:
payloadConditions:
- key: targetBranch
operator: Equals # Equals, NotEquals, In, NotIn, StartsWith, EndsWith, Contains, Regex
value: main
- key: sourceBranch
operator: StartsWith
value: feature/Common keys: sourceBranch, targetBranch, ref, action, tag
harness_get on the trigger to verify configautoAbortPreviousExecutions for PR triggersa000afa
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.