home / skills / openclaw / skills / circleci

circleci skill

/skills/mrgoodb/circleci

This skill helps you manage CircleCI pipelines and workflows via API, triggering and monitoring builds to streamline CI/CD processes.

npx playbooks add skill openclaw/skills --skill circleci

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
826 B
---
name: circleci
description: Manage CircleCI pipelines, jobs, and workflows via API. Trigger and monitor builds.
metadata: {"clawdbot":{"emoji":"⭕","requires":{"env":["CIRCLECI_TOKEN"]}}}
---
# CircleCI
Continuous integration platform.
## Environment
```bash
export CIRCLECI_TOKEN="xxxxxxxxxx"
```
## List Pipelines
```bash
curl "https://circleci.com/api/v2/project/gh/{org}/{repo}/pipeline" \
  -H "Circle-Token: $CIRCLECI_TOKEN"
```
## Trigger Pipeline
```bash
curl -X POST "https://circleci.com/api/v2/project/gh/{org}/{repo}/pipeline" \
  -H "Circle-Token: $CIRCLECI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"branch": "main"}'
```
## Get Workflow
```bash
curl "https://circleci.com/api/v2/workflow/{workflowId}" -H "Circle-Token: $CIRCLECI_TOKEN"
```
## Links
- Docs: https://circleci.com/docs/api/v2/

Overview

This skill lets you manage CircleCI pipelines, workflows, and jobs via the CircleCI API. It provides actions to list pipelines, trigger new pipelines, and fetch workflow status so you can automate CI tasks from scripts or bots. The skill expects a CircleCI API token provided via environment variable.

How this skill works

The skill calls CircleCI API v2 endpoints to list project pipelines, create new pipelines for a branch, and retrieve workflow details and status. It uses a configured CIRCLECI_TOKEN for authentication and returns JSON results that can be parsed by downstream automation. Typical operations include triggering a pipeline for a given repo/branch and polling workflow state until completion.

When to use it

  • Trigger CI runs from external tools, bots, or deployment scripts.
  • Monitor pipeline or workflow status programmatically for notifications.
  • List recent pipelines for audit, backup, or archival processes.
  • Automate retries, backfills, or branch-specific runs from orchestration systems.
  • Integrate CircleCI events into dashboards or incident workflows.

Best practices

  • Store the CircleCI token in an environment variable (e.g., CIRCLECI_TOKEN) and avoid hardcoding secrets.
  • Grant the token least privilege necessary and rotate regularly.
  • Respect API rate limits: implement retries with exponential backoff for transient errors.
  • Use pagination when listing pipelines to avoid missing older entries.
  • Log requests and responses (redact sensitive fields) for observability and troubleshooting.

Example use cases

  • Trigger a pipeline on the main branch after approving a release from a chat bot.
  • Poll a workflow ID to detect success or failure and post results to Slack or issue tracker.
  • Enumerate pipelines across projects to create a backup or archive of recent CI activity.
  • Automate CI-based smoke tests by programmatically starting jobs for feature branches.
  • Integrate pipeline triggers into deployment pipelines to ensure CI runs before rollout.

FAQ

How do I authenticate API calls?

Set CIRCLECI_TOKEN in the environment and include it in the Circle-Token header on each request.

Which endpoints are commonly used?

Project pipelines (list and trigger) and workflow retrieval endpoints from CircleCI API v2 are the primary endpoints for this skill.