# Creating Internal Team Workflows with Cursor Team Kit for CI and Code Review

> Automate CI and code review workflows with Cursor Team Kit. This GitHub CLI plugin provides reusable skills and agents for efficient team collaboration.

- Repository: [Cursor/plugins](https://github.com/cursor/plugins)
- Tags: how-to-guide
- Published: 2026-05-25

---

**Cursor Team Kit is a self-contained Cursor plugin that provides reusable skills, specialized agents, and enforced rules to automate continuous integration monitoring and pull request review workflows using only the GitHub CLI.**

Cursor Team Kit, available in the `cursor/plugins` repository, standardizes how development teams handle CI monitoring and code reviews without requiring external services. By combining declarative skill definitions with intelligent sub-agents and automatic lint rules, it creates a reproducible workflow environment that enforces quality gates across your organization's repositories.

## Understanding the Cursor Team Kit Architecture

The plugin lives under the `cursor-team-kit/` directory and is orchestrated through the manifest file at [`cursor-team-kit/.cursor-plugin/plugin.json`](https://github.com/cursor/plugins/blob/main/cursor-team-kit/.cursor-plugin/plugin.json). This JSON descriptor points to three distinct asset folders that work together to execute automation workflows.

### Skills, Agents, and Rules

The Team Kit organizes functionality into three categories:

- **Skills**: Reusable, declarative procedures stored in `cursor-team-kit/skills/` that the Cursor engine parses into executable tasks (e.g., `loop-on-ci`, `review-and-ship`).
- **Agents**: Specialized logic handlers in `cursor-team-kit/agents/` that implement low-level actions, such as the **CI-watcher** agent that fetches and summarizes GitHub Actions logs.
- **Rules**: Automatic policies in `cursor-team-kit/rules/` that enforce lint-style standards, such as the `typescript-exhaustive-switch` rule that ensures all enum variants are handled.

## Automating CI Monitoring with the loop-on-ci Skill

The `loop-on-ci` skill, fully defined in [`cursor-team-kit/skills/loop-on-ci/SKILL.md`](https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/loop-on-ci/SKILL.md), monitors a pull request's checks and iteratively fixes failures until every required check passes. This eliminates the need to manually refresh GitHub's checks interface while waiting for CI results.

### How the CI Watch Loop Works

The skill executes a five-step guardrail process:

1. **Resolve the active PR** using `gh pr view` to identify the current branch and PR number.
2. **Pull the current check set** via `gh pr checks --json` to parse the status of all attached workflows.
3. **Diagnose failures** by examining logs and running failing workflows locally if checks are already red.
4. **Watch pending checks** with `gh pr checks --watch --fail-fast` to receive immediate notification of the first failure.
5. **Iterate** by re-running step 2 after each push until all checks return "success".

The skill explicitly documents guardrails prohibiting hook bypasses and requires verification before any merge. Typical commands used during execution include:

```bash

# Display PR metadata

gh pr view --json number,url,headRefName

# Check current CI status

gh pr checks --json name,bucket,state,workflow,link

# Watch for failures in real-time

gh pr checks --watch --fail-fast

# Verify all checks pass (using jq to filter)

gh pr checks --json name,bucket,state,workflow,link | jq '.[] | select(.state!="success")'

```

## Standardizing Code Review with review-and-ship

The `review-and-ship` skill, defined in [`cursor-team-kit/skills/review-and-ship/SKILL.md`](https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/review-and-ship/SKILL.md), bundles a structured review, testing, commit, and PR creation process into a single automated workflow.

### The Six-Step Shipping Workflow

This skill orchestrates the following sequence:

1. **Context gathering**: Diff against the base branch, list recent commits, and surface relevant chat context.
2. **Targeted testing**: Execute tests that touch the changed code; if none exist, suggest adding them.
3. **Manual review**: Verify correctness, check for regressions, audit security implications, and confirm intent fit. Large diffs can be split across parallel sub-agents.
4. **Apply fixes**: Implement critical fixes and re-run impacted tests to confirm resolution.
5. **Commit creation**: Generate a focused commit with a concise, descriptive message.
6. **Push and PR**: Update the remote branch and open or update the pull request.

The skill recommends chaining the same `gh pr checks` commands used by `loop-on-ci` to verify PR readiness before final submission.

## Enforcing Code Quality with Automatic Rules

Team Kit applies policies automatically during skill execution without requiring manual configuration. For example, the **TypeScript exhaustive-switch rule** in `cursor-team-kit/rules/typescript-exhaustive-switch.mdc` ensures that any new enum or union variant triggers a compile-time error until the corresponding code is updated. These rules run on every skill execution, guaranteeing consistent style and safety across all automated workflows.

## Installing and Running Team Kit Workflows

Because the plugin relies solely on the GitHub CLI (`gh`), installation requires no external servers or API keys. Add the plugin to any repository:

```bash
/add-plugin cursor-team-kit

```

Once installed, invoke skills from the Cursor CLI:

```bash

# Start CI watch loop

cursor skill run loop-on-ci

# Run full review-to-ship cycle

cursor skill run review-and-ship

```

Both commands honor the guardrails described in their respective [`SKILL.md`](https://github.com/cursor/plugins/blob/main/SKILL.md) files, ensuring fixes remain scoped to the PR, hooks execute properly, and merges only occur when all checks are green.

## Summary

- **Cursor Team Kit** automates CI monitoring and code review through the `cursor-team-kit` plugin in the `cursor/plugins` repository.
- The **`loop-on-ci` skill** watches GitHub Actions via `gh pr checks` and enters an iterative fix loop until all checks pass.
- **`review-and-ship`** standardizes a six-step process from diff analysis to PR creation, including targeted testing and security review.
- **Automatic rules** like `typescript-exhaustive-switch` enforce compile-time safety without manual configuration.
- All workflows operate exclusively through the GitHub CLI, requiring no external service dependencies.

## Frequently Asked Questions

### What prerequisites are required for Cursor Team Kit?

Only the GitHub CLI (`gh`) is required. The plugin executes standard `gh pr checks` and `gh pr view` commands to interact with CI systems, making it compatible with any repository using GitHub Actions or other GitHub-integrated CI providers.

### Can I customize the review-and-ship workflow?

Yes. The skill definitions in [`cursor-team-kit/skills/review-and-ship/SKILL.md`](https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/review-and-ship/SKILL.md) are markdown-based specifications that teams can modify to adjust testing requirements, commit message formats, or security review criteria. Changes take effect immediately on the next `cursor skill run` invocation.

### How does the CI watcher handle intermittent failures?

The `loop-on-ci` skill includes explicit guardrails against bypassing hooks and requires diagnostic resolution of failures. It uses `gh pr checks --watch --fail-fast` to detect the first failure immediately, then enters a local diagnostic loop rather than blindly retrying, preventing infinite loops on flaky infrastructure.

### Are the rules applied to all files or only during skill execution?

Rules located in `cursor-team-kit/rules/` are applied automatically during skill execution. For example, the TypeScript exhaustive-switch rule runs whenever code is modified through a Team Kit skill, ensuring consistent style enforcement without affecting manual edits outside the workflow.