TLDW logo

Kilo Code Workflows: Stop Wasting Time (This Shortcut Will Automate Repetitive Tasks!)

By Code With Nathan

Summary

## Key takeaways - **Workflows Automate Repetitive Tasks**: In Kilo Code, workflows is a feature used to automate repetitive tasks. A workflow is made possible by creating a markdown file that provides step-by-step instructions on how to perform the task. [00:18], [00:28] - **Create Folder Structure for Workflows**: To create a workflow in Kilo code, you can start by creating a folder called Kilocode and then in that folder create another folder named workflows. In this folder, create a new file and then give it a name that will serve as the workflow name with the MD extension. [01:07], [01:18] - **Run Workflow via Slash Command**: Once you save the file, the workflow will be available to call using a slash command. To run it I just need to go to the kilo code chat box down here and then type /project-setup. [00:28], [02:32] - **Project Setup Handles Empty vs Existing Folders**: Step one, if the current folder is empty, prompt the user for a repository URL and clone it. But if the current folder is not empty, skip cloning and continue to the next step. [01:46], [05:42] - **Workflow Steps: Analyze, Install, Run**: Step two is to analyze the readme so the AI understands the project structure and required setup. And then step three is to install dependencies. If it's JavaScript, use npm install. And if it's Python, use pip install. [01:56], [04:10] - **Customize Workflows to Your Stack**: The nice thing is that you can customize the workflow however you want. For example, the install dependency step here only includes npm and pip since I mostly work with JavaScript and Python. But if you're working with something else like PHP and Laravel, you could easily add a composer install step. [06:00], [06:14]

Topics Covered

  • Workflows automate repetitive tasks
  • Slash commands invoke saved prompts
  • Project setup workflow clones intelligently
  • Mirror workflows to your normal work

Full Transcript

Hey there, it's Nathan here. Welcome

back. In this video, I want to show you how to use Kilo Code workflows as well as create one from scratch. By using

workflows, you can save time, keep your project organized, and let Killer Code handle the boring parts. So, in Kilo Code, workflows is a feature used to

automate repetitive tasks. A workflow is made possible by creating a markdown file that provides a step-by-step instructions on how to perform the task.

Once you save the file, the workflow will be available to call using a slash command. In this example, we have the

command. In this example, we have the submit PR workflow. So, slashsubmit PR.

And if we press enter here, kilo code will send the workflow content to the AI agent and it will perform the task you requested. You can think of workflow as

requested. You can think of workflow as a shortcut that allows you to save specific prompts that you frequently send to the AI in your day-to-day activities. Next, let me show you how to

activities. Next, let me show you how to create and run a simple workflow. So,

here in VS Code, I already have Kilo code installed and I have an empty folder open on the left side. To create

a workflow in Kilo code, you can start by creating a folder called Kilocode and then in that folder create another folder named workflows. In this folder,

create a new file and then give it a name that will serve as the workflow name. For example, I will name this as

name. For example, I will name this as project-s setup and use the MD extension to give the workflow a bit of a structure. And just like that, now you

structure. And just like that, now you can write the instructions for the workflow in this file. So here is the workflow for project setup that I have prepared for this demo. First is the

workflow title and then I just say follow these steps for project setup.

Step one, if the current folder is empty, prompt the user for a repository URL and clone it. But if the current folder is not empty, skip cloning and

continue to the next step. Step two is to analyze the readme so the AI understands the project structure and required setup. And then step three is

required setup. And then step three is to install dependencies. If it's

JavaScript, use npm install. And if it's Python, use pip install. After that,

look for the environment file. If AENV

file is found then configure it. If

there is any database setup then do it as well. The same goes for running

as well. The same goes for running testes like npm test or pi test. And

finally run the development server so that the user can start exploring the project. So yeah let's try out this

project. So yeah let's try out this workflow. To run it I just need to go to

workflow. To run it I just need to go to the killer code chat box down here and then type /ash. And here we can already see the workflow name. So select that

and Kilo code will process this workflow once we send the prompt. But before we do that note that you can also create a workflow by selecting this scale icon on the bottom right part of Kilo code.

Click on the workflow tab here and you can define a project scope or a globally scoped workflow. We will use this UI

scoped workflow. We will use this UI later but for now uh let's select orchestrator mode so that Kilo code can handle the steps in the workflow without

any issue. Now press enter and let it

any issue. Now press enter and let it process the request. This process will take a while so I will skip a bit to when the next action occurs.

All right, since this is an empty folder, Kilo code will ask for a repository to clone to the current folder. There are some choices available

folder. There are some choices available here, but none of them are pointing to real repositories. So instead, you can

real repositories. So instead, you can send the desired URL in the chat box.

For example, I will use this React project from my GitHub account. Uh so

copy the URL here and then back in Kilo code, send the URL from the child box like this.

And now we can see that Kilo code wants to run the get clone command to clone the repository to the current workspace.

So let's allow it. And now that the project is cloned, it will continue to the next step, which is to read and analyze the readme file. After analyzing

the readme file, the agent will have a better idea about the project and it can also find some setup hints there. Next,

it will try to install the dependencies.

So, as you can see here, it wants to change directory and then run the npm install command. Once all dependencies

install command. Once all dependencies are installed, it will continue to the next step, which is to configure the environment files. And after that, it

environment files. And after that, it will initialize database setup. But this

project doesn't use any database yet. So

it will be skipped. After that it will run test scripts before finally running the development server. Now it wants to run the npm rundev command. So let's

allow it. And here we can see that the browser is being open and we can start exploring the project. So the workflow is working exactly as expected here

which is awesome. Now let's try to run the same workflow on an existing project. So I will copy this workflow

project. So I will copy this workflow first and then back in the previous project. I'm going to create that

project. I'm going to create that workflow as well. But this time let's use the workflow interface by clicking on the scale icon on the bottom right side and then select workflow. Add new

workflow for the project. The name will be project-supmd and the markdown files now created. So I

will paste the workflow prompt here.

Okay. Next, I will select the orchestrator mode again and then run the project setup workflow command. Submit

the prompt to kilo code and let it process the request.

And here we can see that it skipped the first step. Uh let me cancel the process

first step. Uh let me cancel the process for now and then go back to the previous chat session.

And yep, here we can see it says skip since folder has files. So yeah, as you can see, having a workflow setup is really convenient as it lets you define

step-by-step instructions for routines that you do often, like setting up a project or submitting a pull request.

The nice thing is that you can customize the workflow however you want. Make it

as detailed or as simple as you need.

For example, the install dependency step here only includes npm and pip since I mostly work with JavaScript and Python.

But if you're working with something else like PHP and Laravel, you could easily add a composer install step. The

idea is that your workflow should mirror the way you normally work so you don't have to keep doing the same steps manually.

And that brings us to the end of this tutorial. Now you know how to create and

tutorial. Now you know how to create and run workflows in Kilo Code to automate repetitive tasks. I hope you all enjoyed

repetitive tasks. I hope you all enjoyed today's video and get some value out of it. Let me know your thoughts in the

it. Let me know your thoughts in the comments below. I'll join the

comments below. I'll join the conversation and reply as often as I can. If you're new to the channel, my

can. If you're new to the channel, my name is Nathan and I help you build profitable apps and projects using AI and other tools. Make sure to subscribe if that's something you find useful.

Don't forget to like this video, turn on the notification bell, all that good stuff, as it really helps the channel to grow. With that being said, thanks so

grow. With that being said, thanks so much for watching until the end. I hope

you have a great day and I'll see you in other videos. Bye-bye.

other videos. Bye-bye.

[Music]

Loading...

Loading video analysis...