Prerequisites
- You have Cline installed.
- You have the GitHub CLI (
gh) installed and authenticated. - You have a Git repository open with a Pull Request you want to test this on.
Creating a Pull Request Review Workflow
This workflow will automate the process of fetching PR details, analyzing the code changes for issues, and drafting a review comment.1
Create the Workflow File
First, create the directory structure for your project-specific workflows.
- In the root of your project, create a new folder named
.clinerules. - Inside
.clinerules, create another folder namedworkflows. - Finally, create a new file named
pr-review.mdinside theworkflowsfolder.
2
Write the Workflow Content
Open the
pr-review.md file and add the following content. This workflow will gather PR details, analyze the changes, and help you submit a review.pr-review.md
When you run this workflow, you will replace
PR_NUMBER with the actual number of the pull request you want to review (e.g., /pr-review.md 123).3
Run the Workflow
Now you’re ready to run your new workflow.
- Open the Cline chat panel.
- Type
/pr-review.mdfollowed by the PR number (e.g.,/pr-review.md 42) and press Enter. - Cline will fetch the PR details, analyze the code, and present you with its findings before submitting the review.
Other Common Use Cases
This is just one example. You can create workflows for a wide variety of tasks, such as:- Creating Components: Automate the boilerplate for new files (like React components or API endpoints).
- Running Tests: Create a workflow that runs your test suite and summarizes the results.
- Deploying Your Application: Automate your deployment pipeline using tools like
dockerandkubectl. - Refactoring Code: Guide Cline through a complex refactoring process step-by-step.

