Install
$ agentstack add skill-harness-harness-skills-create-trigger ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Create Trigger
Generate Harness Trigger YAML and push to Harness via MCP.
Instructions
- Identify trigger type - Webhook (Git events), Scheduled (cron), Artifact (registry updates), or Manifest (Helm chart updates)
- Configure conditions - Branch filters, payload conditions, cron expression, or artifact path
- Generate YAML using the templates below, referencing the target pipeline
- Create via MCP using
harness_createwith resource_typetrigger - Verify webhook registration - For webhook triggers, confirm the webhook is registered in the Git provider
Trigger Types
- Webhook - GitHub, GitLab, Bitbucket, Azure Repos, Custom
- Scheduled - Cron-based scheduling
- Artifact - Docker Hub, ECR, GCR, ACR, Nexus
- Manifest - Helm chart updates
Webhook Trigger (GitHub)
trigger:
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:
GitHub Event Types
Push- Code pushed to branchPullRequest- PR events (Open, Close, Reopen, Synchronize, Edit)IssueComment- PR comments (Create, Edit, Delete)Release- Release events (Create, Publish, Edit)
Webhook Trigger (GitLab)
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: main
Scheduled (Cron) Trigger
trigger:
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: main
Cron format:
Artifact Trigger (Docker Registry)
trigger:
name: New Image Trigger
identifier: new_image
pipelineIdentifier: deploy_pipeline
source:
type: Artifact
spec:
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/myimage
tag:
inputYaml: |
pipeline:
identifier: deploy_pipeline
stages:
- stage:
identifier: deploy
spec:
service:
serviceRef: my_service
Artifact Source Types
DockerRegistry- Docker HubEcr- AWS ECRGcr- Google Container RegistryAcr- Azure Container RegistryNexus3Registry- NexusAmazonS3- S3 artifacts
Creating via MCP
Call MCP tool: harness_create
Parameters:
resource_type: "trigger"
org_id: ""
project_id: ""
body:
To list existing triggers:
Call MCP tool: harness_list
Parameters:
resource_type: "trigger"
org_id: ""
project_id: ""
Payload Conditions
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
Examples
- "Create a GitHub PR trigger for CI" - Webhook trigger with PullRequest type
- "Set up nightly builds at 2 AM" - Scheduled trigger with cron
- "Trigger deploy when new Docker image is pushed" - Artifact trigger with DockerRegistry
- "Create a release trigger for tags" - Webhook with Push type, tag filter
Performance Notes
- Verify payload conditions match actual webhook payloads from the Git provider.
- For cron triggers, double-check the expression — cron uses UTC timezone.
- Confirm the target pipeline identifier and inputYaml match the pipeline's expected inputs.
Troubleshooting
Trigger Not Firing
- Verify webhook is registered in Git provider
- Check payload conditions match actual payload
- Ensure connector has correct permissions
- Test with
harness_geton the trigger to verify config
Duplicate Executions
- Enable
autoAbortPreviousExecutionsfor PR triggers - Check for overlapping trigger conditions
Cron Not Running
- Verify cron expression syntax (5 fields, UTC timezone)
- Check pipeline identifier is correct
- Ensure trigger is enabled
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: harness
- Source: harness/harness-skills
- License: Apache-2.0
- Homepage: https://developer.harness.io/docs/platform/harness-ai/harness-skills/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.