Automate CircleCI tasks via Rube MCP (Composio): trigger pipelines, monitor workflows/jobs, retrieve artifacts and test metadata. Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/circleci-automationComprehensive CircleCI automation with clear tool sequences, pitfalls, and ID format guidance
1---2name: circleci-automation3description: "Automate CircleCI tasks via Rube MCP (Composio): trigger pipelines, monitor workflows/jobs, retrieve artifacts and test metadata. Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# CircleCI Automation via Rube MCP910Automate CircleCI CI/CD operations through Composio's CircleCI toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active CircleCI connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `circleci`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1718## Setup1920**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.2122231. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds242. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `circleci`253. If connection is not ACTIVE, follow the returned auth link to complete CircleCI authentication264. Confirm connection status shows ACTIVE before running any workflows2728## Core Workflows2930### 1. Trigger a Pipeline3132**When to use**: User wants to start a new CI/CD pipeline run3334**Tool sequence**:351. `CIRCLECI_TRIGGER_PIPELINE` - Trigger a new pipeline on a project [Required]362. `CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID` - Monitor resulting workflows [Optional]3738**Key parameters**:39- `project_slug`: Project identifier in format `gh/org/repo` or `bb/org/repo`40- `branch`: Git branch to run the pipeline on41- `tag`: Git tag to run the pipeline on (mutually exclusive with branch)42- `parameters`: Pipeline parameter key-value pairs4344**Pitfalls**:45- `project_slug` format is `{vcs}/{org}/{repo}` (e.g., `gh/myorg/myrepo`)46- `branch` and `tag` are mutually exclusive; providing both causes an error47- Pipeline parameters must match those defined in `.circleci/config.yml`48- Triggering returns a pipeline ID; workflows start asynchronously4950### 2. Monitor Pipelines and Workflows5152**When to use**: User wants to check the status of pipelines or workflows5354**Tool sequence**:551. `CIRCLECI_LIST_PIPELINES_FOR_PROJECT` - List recent pipelines for a project [Required]562. `CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID` - List workflows within a pipeline [Required]573. `CIRCLECI_GET_PIPELINE_CONFIG` - View the pipeline configuration used [Optional]5859**Key parameters**:60- `project_slug`: Project identifier in `{vcs}/{org}/{repo}` format61- `pipeline_id`: UUID of a specific pipeline62- `branch`: Filter pipelines by branch name63- `page_token`: Pagination cursor for next page of results6465**Pitfalls**:66- Pipeline IDs are UUIDs, not numeric IDs67- Workflows inherit the pipeline ID; a single pipeline can have multiple workflows68- Workflow states include: success, running, not_run, failed, error, failing, on_hold, canceled, unauthorized69- `page_token` is returned in responses for pagination; continue until absent7071### 3. Inspect Job Details7273**When to use**: User wants to drill into a specific job's execution details7475**Tool sequence**:761. `CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID` - Find workflow containing the job [Prerequisite]772. `CIRCLECI_GET_JOB_DETAILS` - Get detailed job information [Required]7879**Key parameters**:80- `project_slug`: Project identifier81- `job_number`: Numeric job number (not UUID)8283**Pitfalls**:84- Job numbers are integers, not UUIDs (unlike pipeline and workflow IDs)85- Job details include executor type, parallelism, start/stop times, and status86- Job statuses: success, running, not_run, failed, retried, timedout, infrastructure_fail, canceled8788### 4. Retrieve Build Artifacts8990**When to use**: User wants to download or list artifacts produced by a job9192**Tool sequence**:931. `CIRCLECI_GET_JOB_DETAILS` - Confirm job completed successfully [Prerequisite]942. `CIRCLECI_GET_JOB_ARTIFACTS` - List all artifacts from the job [Required]9596**Key parameters**:97- `project_slug`: Project identifier98- `job_number`: Numeric job number99100**Pitfalls**:101- Artifacts are only available after job completion102- Each artifact has a `path` and `url` for download103- Artifact URLs may require authentication headers to download104- Large artifacts may have download size limits105106### 5. Review Test Results107108**When to use**: User wants to check test outcomes for a specific job109110**Tool sequence**:1111. `CIRCLECI_GET_JOB_DETAILS` - Verify job ran tests [Prerequisite]1122. `CIRCLECI_GET_TEST_METADATA` - Retrieve test results and metadata [Required]113114**Key parameters**:115- `project_slug`: Project identifier116- `job_number`: Numeric job number117118**Pitfalls**:119- Test metadata requires the job to have uploaded test results (JUnit XML format)120- If no test results were uploaded, the response will be empty121- Test metadata includes classname, name, result, message, and run_time fields122- Failed tests include failure messages in the `message` field123124## Common Patterns125126### Project Slug Format127128```129Format: {vcs_type}/{org_name}/{repo_name}130- GitHub: gh/myorg/myrepo131- Bitbucket: bb/myorg/myrepo132```133134### Pipeline -> Workflow -> Job Hierarchy135136```1371. Call CIRCLECI_LIST_PIPELINES_FOR_PROJECT to get pipeline IDs1382. Call CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID with pipeline_id1393. Extract job numbers from workflow details1404. Call CIRCLECI_GET_JOB_DETAILS with job_number141```142143### Pagination144145- Check response for `next_page_token` field146- Pass token as `page_token` in next request147- Continue until `next_page_token` is absent or null148149## Known Pitfalls150151**ID Formats**:152- Pipeline IDs: UUIDs (e.g., `5034460f-c7c4-4c43-9457-de07e2029e7b`)153- Workflow IDs: UUIDs154- Job numbers: Integers (e.g., `123`)155- Do NOT mix up UUIDs and integers between different endpoints156157**Project Slugs**:158- Must include VCS prefix: `gh/` for GitHub, `bb/` for Bitbucket159- Organization and repo names are case-sensitive160- Incorrect slug format causes 404 errors161162**Rate Limits**:163- CircleCI API has per-endpoint rate limits164- Implement exponential backoff on 429 responses165- Avoid rapid polling; use reasonable intervals (5-10 seconds)166167## Quick Reference168169| Task | Tool Slug | Key Params |170|------|-----------|------------|171| Trigger pipeline | CIRCLECI_TRIGGER_PIPELINE | project_slug, branch, parameters |172| List pipelines | CIRCLECI_LIST_PIPELINES_FOR_PROJECT | project_slug, branch |173| List workflows | CIRCLECI_LIST_WORKFLOWS_BY_PIPELINE_ID | pipeline_id |174| Get pipeline config | CIRCLECI_GET_PIPELINE_CONFIG | pipeline_id |175| Get job details | CIRCLECI_GET_JOB_DETAILS | project_slug, job_number |176| Get job artifacts | CIRCLECI_GET_JOB_ARTIFACTS | project_slug, job_number |177| Get test metadata | CIRCLECI_GET_TEST_METADATA | project_slug, job_number |178
Full transparency — inspect the skill content before installing.