Buildwithclaude circleci-automation
Automate CircleCI tasks via Rube MCP (Composio): trigger pipelines, monitor workflows/jobs, retrieve artifacts and test metadata. Always search tools first for current schemas.
git clone https://github.com/davepoon/buildwithclaude
T=$(mktemp -d) && git clone --depth=1 https://github.com/davepoon/buildwithclaude "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/all-skills/skills/circleci-automation" ~/.claude/skills/davepoon-buildwithclaude-circleci-automation && rm -rf "$T"
plugins/all-skills/skills/circleci-automation/SKILL.mdCircleCI Automation via Rube MCP
Automate CircleCI CI/CD operations through Composio's CircleCI toolkit via Rube MCP.
Toolkit docs: composio.dev/toolkits/circleci
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active CircleCI connection via
with toolkitRUBE_MANAGE_CONNECTIONScircleci - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
Setup
Get Rube MCP: Add
https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONScircleci - If connection is not ACTIVE, follow the returned auth link to complete CircleCI authentication
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Trigger a Pipeline
When to use: User wants to start a new CI/CD pipeline run
Tool sequence:
- Trigger a new pipeline on a project [Required]CIRCLECI_TRIGGER_PIPELINE
- Monitor resulting workflows [Optional]CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID
Key parameters:
: Project identifier in formatproject_slug
orgh/org/repobb/org/repo
: Git branch to run the pipeline onbranch
: Git tag to run the pipeline on (mutually exclusive with branch)tag
: Pipeline parameter key-value pairsparameters
Pitfalls:
format isproject_slug
(e.g.,{vcs}/{org}/{repo}
)gh/myorg/myrepo
andbranch
are mutually exclusive; providing both causes an errortag- Pipeline parameters must match those defined in
.circleci/config.yml - Triggering returns a pipeline ID; workflows start asynchronously
2. Monitor Pipelines and Workflows
When to use: User wants to check the status of pipelines or workflows
Tool sequence:
- List recent pipelines for a project [Required]CIRCLECI_LIST_PIPELINES_FOR_PROJECT
- List workflows within a pipeline [Required]CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID
- View the pipeline configuration used [Optional]CIRCLECI_GET_PIPELINE_CONFIG
Key parameters:
: Project identifier inproject_slug
format{vcs}/{org}/{repo}
: UUID of a specific pipelinepipeline_id
: Filter pipelines by branch namebranch
: Pagination cursor for next page of resultspage_token
Pitfalls:
- Pipeline IDs are UUIDs, not numeric IDs
- Workflows inherit the pipeline ID; a single pipeline can have multiple workflows
- Workflow states include: success, running, not_run, failed, error, failing, on_hold, canceled, unauthorized
is returned in responses for pagination; continue until absentpage_token
3. Inspect Job Details
When to use: User wants to drill into a specific job's execution details
Tool sequence:
- Find workflow containing the job [Prerequisite]CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID
- Get detailed job information [Required]CIRCLECI_GET_JOB_DETAILS
Key parameters:
: Project identifierproject_slug
: Numeric job number (not UUID)job_number
Pitfalls:
- Job numbers are integers, not UUIDs (unlike pipeline and workflow IDs)
- Job details include executor type, parallelism, start/stop times, and status
- Job statuses: success, running, not_run, failed, retried, timedout, infrastructure_fail, canceled
4. Retrieve Build Artifacts
When to use: User wants to download or list artifacts produced by a job
Tool sequence:
- Confirm job completed successfully [Prerequisite]CIRCLECI_GET_JOB_DETAILS
- List all artifacts from the job [Required]CIRCLECI_GET_JOB_ARTIFACTS
Key parameters:
: Project identifierproject_slug
: Numeric job numberjob_number
Pitfalls:
- Artifacts are only available after job completion
- Each artifact has a
andpath
for downloadurl - Artifact URLs may require authentication headers to download
- Large artifacts may have download size limits
5. Review Test Results
When to use: User wants to check test outcomes for a specific job
Tool sequence:
- Verify job ran tests [Prerequisite]CIRCLECI_GET_JOB_DETAILS
- Retrieve test results and metadata [Required]CIRCLECI_GET_TEST_METADATA
Key parameters:
: Project identifierproject_slug
: Numeric job numberjob_number
Pitfalls:
- Test metadata requires the job to have uploaded test results (JUnit XML format)
- If no test results were uploaded, the response will be empty
- Test metadata includes classname, name, result, message, and run_time fields
- Failed tests include failure messages in the
fieldmessage
Common Patterns
Project Slug Format
Format: {vcs_type}/{org_name}/{repo_name} - GitHub: gh/myorg/myrepo - Bitbucket: bb/myorg/myrepo
Pipeline -> Workflow -> Job Hierarchy
1. Call CIRCLECI_LIST_PIPELINES_FOR_PROJECT to get pipeline IDs 2. Call CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID with pipeline_id 3. Extract job numbers from workflow details 4. Call CIRCLECI_GET_JOB_DETAILS with job_number
Pagination
- Check response for
fieldnext_page_token - Pass token as
in next requestpage_token - Continue until
is absent or nullnext_page_token
Known Pitfalls
ID Formats:
- Pipeline IDs: UUIDs (e.g.,
)5034460f-c7c4-4c43-9457-de07e2029e7b - Workflow IDs: UUIDs
- Job numbers: Integers (e.g.,
)123 - Do NOT mix up UUIDs and integers between different endpoints
Project Slugs:
- Must include VCS prefix:
for GitHub,gh/
for Bitbucketbb/ - Organization and repo names are case-sensitive
- Incorrect slug format causes 404 errors
Rate Limits:
- CircleCI API has per-endpoint rate limits
- Implement exponential backoff on 429 responses
- Avoid rapid polling; use reasonable intervals (5-10 seconds)
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Trigger pipeline | CIRCLECI_TRIGGER_PIPELINE | project_slug, branch, parameters |
| List pipelines | CIRCLECI_LIST_PIPELINES_FOR_PROJECT | project_slug, branch |
| List workflows | CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID | pipeline_id |
| Get pipeline config | CIRCLECI_GET_PIPELINE_CONFIG | pipeline_id |
| Get job details | CIRCLECI_GET_JOB_DETAILS | project_slug, job_number |
| Get job artifacts | CIRCLECI_GET_JOB_ARTIFACTS | project_slug, job_number |
| Get test metadata | CIRCLECI_GET_TEST_METADATA | project_slug, job_number |
Powered by Composio