Use Cline to Build Workflows
We highly recommend using Cline to help you build your workflows. Since Cline understands your project’s context and structure, it can be an invaluable partner in designing automation that fits your specific needs.Building your own workflows
Creating a workflow is simpler than you might think. There’s actually a workflow for building workflows! First, save the create-new-workflow.md file to your workspace (e.g., in.clinerules/workflows/).
Then, type /create-new-workflow.md and Cline guides you through it:
- It asks for the purpose and a concise name.
- You describe the objective and expected outputs.
- You list the major steps (Cline can help determine details).
- It generates the properly structured workflow file.
.clinerules/workflows/ for project-specific ones or ~/Documents/Cline/Workflows/ for global ones you use across projects. Project workflows take precedence when names match.
Workflow Design
Be Modular
Instead of creating one massive workflow file, break complex tasks into smaller, reusable workflows. This makes them easier to maintain and debug.Use Clear Comments
Just like with code, commenting your workflow steps is crucial. Explain why a step is happening, not just what is happening. This helps both you (the future maintainer) and Cline understand the intent.Version Control
Treat your workflows as part of your codebase. Store them in your Git repository (in.clinerules/workflows/) so they are versioned, reviewed, and shared with your team.
Prompt Engineering for Cline
Be Specific with Tool Use
Don’t just say “find the file.” Be explicit about which tool Cline should use.- Bad: “Find the user controller.”
- Good: “Use
search_filesto look forUserControllerin thesrc/controllersdirectory.”
Advanced Techniques
Available Tools
Cline has a powerful set of tools you can use within your workflows. Here are the most common ones:execute_command
Executes a CLI command on your system. Use this for running tests, builds, git commands, or any other terminal operation.read_file
Reads the contents of a file. Essential for analyzing code or configuration.write_to_file
Creates or overwrites a file. Use this to generate boilerplate, config files, or documentation.search_files
Searches for a regex pattern across files in a directory. Great for finding TODOs, usage examples, or specific code patterns.ask_followup_question
Asks the user for input or confirmation. This makes your workflow interactive and allows for human-in-the-loop decision making.browser_action
Controls a built-in browser to interact with websites or local servers. Useful for testing web UIs or scraping data.Leverage MCP Tools
You can use Model Context Protocol (MCP) tools within your workflows to interact with external services like GitHub, Slack, or databases. This allows you to create powerful end-to-end automations.Manage Context Window
Be mindful of Cline’s context window. If a workflow is too long or processes too much data, it might exceed the token limit.- Break it down: Split long workflows into smaller parts.
- Be concise: Keep instructions clear and to the point.
Learn More
Cline Learn
Dive deeper into general prompt engineering strategies to write even better instructions for Cline.

