📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Cursor AI: Полный гайд по вайбкодингу с нуля. Subagents, Hooks, Skills, Rules, Commands, MCP

Alexey Andreevsky2:43:21

Transcription

I am opening Cursor, asking it to make me a personal website, and literally within a few minutes, I have a ready website with all the necessary sections. This is how development looks in 2026. Okay, in reality, it's not quite like that. I just decided to have some fun and trigger your attention a bit. I made this website over about a week, but I made it in Cursor. Yes, I said that right. And in reality, with the right approach to development, the reality isn't that drastically different from what I showed at the beginning. Of course, it's not done with a single prompt, and you need to configure Cursor for yourself to make it work effectively. And that's exactly what we're going to do today. Hello, VibeCoders and those who want to become VibeCoders. Today, we'll explore one of the most popular tools for VibeCoding, namely Cursor. I really love this program and have been using it for quite some time. And yet, while preparing for this guide, I learned a lot of new things for myself. I think you'll also discover something new and useful for yourselves after watching this video. The material turned out to be dense and rich, so save this video so you don't lose it. It's quite possible that you'll want to rewatch some moments to better grasp the principles of working in this program. This video is designed for both beginner VibeCoders, who may be discovering development with AI agents for the first time in their lives. But this video will also be useful for experienced VibeCoders. And experienced developers will also be able to discover something new. Everything is as usual, I'll provide the good stuff, and you provide the likes and subscriptions. And we begin. In this video, we'll learn from scratch how to work in Cursor. We'll start with the simplest and at the same time the most enjoyable – AI agents, which will write code for us. We'll continue with more in-depth settings, namely, we'll figure out what rules are, how to write them, how to use them, what commands, skills, sub-agents, and hooks are. We'll figure out what MCP is. We'll connect this MCP, see how they are connected. In general, we'll cover everything that will make your user experience as a Cursor developer as pleasant as possible, so you can VibeCode, enjoy the process, and worry as little as possible. Okay, let's finish the introductory speech and let's get started. The first thing we need to do is, of course, download Cursor itself. It's quite simple. Go to the official website kursor.com. And on the main page, we're greeted with an offer to download Cursor itself. Click download, run, install. I don't think you'll have any questions about this, so I won't go through this process in detail now. Cursor is already installed for me. I think you can handle this. After you've downloaded and installed Cursor, you obviously need to launch it. We launch it, and it will open, well, something like this. I honestly don't remember exactly. I won't uninstall and reinstall it now, but you should ideally see something similar to this picture. If you've previously used Visual Studio Code for development, then I have good news for you. Well, good news only if you liked it. Cursor is built on the basis of Visual Studio Code. Technically speaking, it's a fork of Visual Studio Code, meaning it was copied and enhanced with new functionality. What does this give us? We can import settings from Visual Studio Code. For example, if you had some theme, colors, fonts, etc., set up there. And all these settings can be imported into Cursor so you don't have to set everything up again. Most likely, upon first launch, Cursor will ask you about this, or rather, offer to import settings from Visual Studio Code if it's installed. But you can also do this after installation. To do this, you need to go to Cursor settings. In the General tab, there's a Preferences section. And here there's an option to import settings from VS Code. Here you can click the import button and import settings from Visual Studio Code. Also, to work in Cursor, you need to register an account. This is done very simply. On the Cursor website, click the Sign in button, then follow the registration link. On this page, you can either log in through one of the offered services or create a new account using your email. To log in within the program itself, go to Cursor settings. And here, in the Manage Account section, you'll find a Login button. Click it, a browser will open where you are logged into your account, after which Cursor will log you into the application. At this stage, we can already start working. And the first thing we need to do is open a folder where we will be working. You can do this either by clicking the Open Project button and then creating or selecting the desired folder. Or there's a list of recent projects that have already been opened. You can also select a project you want to open from here. I'll now open the folder Cursor Guide, which is currently empty. Once we've selected the folder where we'll be working, the actual interface for working in Cursor opens. And it can open in different ways. That is, it doesn't necessarily have to look like this. Here in the settings in the upper right corner, there's a choice of interface views. Moreover, you can create new ones, well, essentially window configurations that will be open. By default, if I'm not mistaken, Cursor currently opens in agent mode, which includes a chat window directly with the agent, and a list of previously created chats. We'll explore what this is very soon, but for now, let's talk about interface layouts in general. Besides the agent mode, there's another mode. It's very similar, just the window arrangement changes slightly. The chat with the agent is preserved. Now it's on the right. On the left, our file list opens. That is, there are no files here yet, but they will appear soon. Besides this, there's the EN mode, where nothing is visible at all, and the browser mode, where a browser opens in a separate tab, where we can enter a URL. And we'll get back to this. We'll also explore the browser. It's a very cool feature within Cursor, but we'll return to it a bit later. In general, there isn't a big difference which display option you choose here. In any case, you can always enable specific windows you need here. Here they are, the five main windows. Agents is the list of agents. Chat is, well, the chat with a specific agent. Editors is, well, this panel. There's nothing here yet, but it displays the content of files that can be edited manually. There's also a panel section. The panel includes several tabs. Most often, you'll probably use the terminal here, but in principle, there are also other tabs for problems: output, debug, terminal, ports. In short, if you're a true VibeCoder and seeing a code editing program for the first time in your life, just forget about it, you don't need it yet. Well, the terminal might be useful, and everything else can be ignored for now. The terminal, besides this switch in the panel, can also be opened using the Show Terminal button. Here, if no file is selected, this preview appears. Here you can make the terminal appear either at the top, in these panels of the program itself, or you can select Terminal -> New Terminal. Well, let's not pay attention to this for now, forget about it. Personally, I find it more convenient to work in edit mode. I'm used to having the file list on the left. The chat with the neural network is on the right, and in the center, I can look at the files I'm editing, or that the neural network is editing. I'll use this view. But changing the position of these windows doesn't change anything, so you can configure it as you find convenient. Okay, we've roughly figured out the interface. These are the main things you need to know, and we'll cover the other little tabs and buttons as needed. Now, actually, we can already work with the neural network. To do this, we'll use this chat window. This is where prompts for the neural network are written. If you've ever used a neural network, this should be familiar to you. It's the same chat as in all other interfaces for working with neural networks. That is, a similar chat to, for example, Claude or ChatGPT. So you can write prompts, questions, anything you want to write there. We'll cover that now. But before we write anything there, I'll briefly explain a few settings that will be useful for you. Let's start with the model. If you haven't paid for a subscription in Cursor, then most likely you'll have the Auto model here, and the other models won't be available. What is a model? Well, if you don't know, a model is the brain of the neural network that gives us answers. This entire visual interface is just, well, some kind of wrapper where we write something, but then all our requests are sent to the model. Well, to put it simply, right? It's sent to this model, it thinks about it, and then it answers us and does our tasks. A few words about models. I currently have the Sonnet 4.5 model selected. In my opinion, it's the most optimal in terms of cost and the quality of code it generates. Sonnet 4.5 is a model from Anthropic. There are also many models available with paid subscriptions. If for some reason they are not in the list here, you can click the Add Models button and see the full list of models. You can view all models. There are quite a lot of them. If for some reason you want to use a different one, you can easily look here, find the one you need. You can also add keys here so that requests go not through your Cursor subscription, but via API keys. But that's a separate topic, we won't delve into it now. And in general, let's start with the simplest. So, which model to choose? If you have an unpaid subscription, then the choice is limited. Most likely, only Auto will be available. Honestly, I don't remember. If you do have a paid subscription and don't know which model to choose, go with Sonnet 4.5. That's it. This is the optimal model. If you want a more powerful model, then choose Opus 4.5. Or the latest version available. If you want a simpler model, then choose Haiku. These are all models from Anthropic. In my top list, these are my favorites. I don't dispute that there are other good models. Gemini 3 Pro seems decent. GPT personally didn't click with me when I used it. But I don't know, you can try. Actually, I'm not dictating to you here. Pick any, see how it responds. And if you like it, then please use another model. Just so you don't end up with a situation where you enable a certain model, the neural network doesn't do anything useful, and you get disappointed with all of VibeCoding. And this can happen if you choose some simple, cheapest model. Well, the Auto mode, actually, I have similar impressions. In short, to avoid this and just to feel it, take Sonnet 4.5. This should satisfy you for starters. Then you can figure out if you want something more powerful, take Opus; if you want something faster and cheaper, take Haiku. Experiment with the rest as you wish. Maybe you'll like something else. Before we get too far from models, let me quickly explain how costs are calculated here. Yes, we pay for a subscription, say, the cheapest one, $20 a month, and it has limits. Theoretically, you might hit these limits before the month you paid for ends, and Cursor will say: "Well, either switch to pay-as-you-go." Then you'll accumulate a debt on your account. It will reach about $20, after which Cursor will ask you to pay this debt, and until you pay it, it won't let you work. Well, that's how the limits work. That is, in each of the tariff plans, whether for $200 or $20, there's a certain volume of limits that you can potentially hit before your subscription month ends. If you take a subscription, for example, for a year, then, accordingly, your subscription renews the next month, your limits reset, and you can use the tool again. Moving on. Next to the model, we have a choice of modes in which we will work with the neural network. Currently, there are four modes. These are Agent, Plan, Debug, and Ask. Let me briefly explain what they are. We'll probably look at them in more detail a bit later. Agent is, essentially, an agent that will edit code. Well, actually, if you don't ask it to edit something, it can just answer you. But it has access to editing, creating files, deleting files. It will likely ask you if it can delete, but it can do that too. It can run some console commands, and it can also access the internet. That is, you can give it a link to documentation or a website with some information so it can look at the visual aspect. In short, it can browse websites. This is actually cool. A very convenient thing. To do this, just copy the link, paste it into the chat. And you'll notice that the link, relative to simple text, is highlighted in blue. This means Cursor perceives it as a link. If you want the URL you paste here not to be highlighted as a link, meaning it should be treated as text, you need to press not just Ctrl+V or Command+V. You need to press Command+Shift+V. Or probably Ctrl+Shift+V if you're on Windows. On Linux, probably too. I don't know. Then it pastes it as regular text. Sometimes this is necessary, sometimes not. In principle, it can probably navigate to the link anyway. It's just that when we paste a link, we're explicitly indicating the link, that it can be navigated. Before we explore the other modes, let's quickly see how the agent works to better absorb all this. Let's ask it to create a Tic-Tac-Toe game in a brutalist style. Well, I don't know what it will do with a single prompt, but let's try at least as an example. How do we do this? We can type the prompt manually, or we can dictate it. This is a very cool feature. There's a microphone icon here. Besides the fact that we can dictate the prompt here, it can also translate it immediately. That is, I can speak to it in one language, and it will translate it into English, for example. Let's see how this voice input works. Make a Tic-Tac-Toe game with a brutalist design. And let it display the score between X's and O's at the top, the score of wins and losses. By the way, you can choose the language here. If you click on the sound wave icon, you can choose the language to which the prompt will be translated. I currently have English set, so regardless of the language I dictate the prompt in, it will be translated into English. I click stop. As you can see, it recorded what I said above. Let me delete the extra parts, even like this, and press Enter. This is the entire prompt. Honestly, I don't know how well it will handle this, but in principle, it should now create some files, and we'll be able to run them. It's good that it decided to create a simple HTML page. At least we won't have a bunch of extra files now, because we need this for testing. It will finish with this now, and we'll see what it came up with. Okay, the agent has finished creating our game. Before we open it, let me quickly show you what's in the chat. Well, first of all, you can see which files were edited. It does write this in the chat, but besides that, you can click on the number of files at the bottom here, and a list of files edited by the AI agent will open. And if we click on a file, in this case, it created one, we'll see the changes. Changes in the file are highlighted in green. In this case, it created the file from scratch, so the entire file is highlighted in green. Here we can either click Keep, and within this file tab, I mean this tab, so within the file, we can approve or disapprove specific blocks that it edited. Well, in this case, it's one whole large block. There's not much to choose from here, but keep that in mind. Or we can click Keep File, then we approve the changes in the entire file, or we can click Accept All or Undo here. Accept All will accept all changes in all files. Undo will cancel all changes in all files. Well, it doesn't matter, let's click Keep File, just so it doesn't keep showing green. Here's our file. Now we can open it in a browser. It's an HTML file, so a simple HTML page. And it put everything inside this page. It wrote the styles here, it wrote the logic here, yes, there are scripts here. But let's not delve into that for now. We're looking at how to work through neural networks, not how the code is structured. So it wrote it, it wrote it, good job. To open it, I need to find it in the folder. And now I can double-click it, and it will open in my browser. Well, here it is. I don't know if it's brutalism or not, but the thick borders, well, probably part of it. Anyway, it's okay. Such minimalist brutalism. Let's try to play. X, O, X, O, X, X wins. Win one. Amazing. Let's Clear, and this will clear everything. Well, okay, let's say I won again. But how do I play again? Reset game, right? Reset game. If we click it, the score remains. And we can continue playing. Well, it's a draw for now. Okay, it doesn't matter. In short, it created a file. We did all this just to see how the AI agent works. In principle, this chat mode, called Agent, works something like this: it creates files, it can edit them, we can ask it to do something else, but we won't do that for now so as not to get too distracted. We still have a lot of information. Just keep in mind that in principle, this is it. You can work like this. Just enable agent mode, start writing your requests, and it will create or edit files for you. You can open an existing project, and it will work within it. And in principle, you can already work like this. That's it, at this point, you can turn off the video and go have fun with Cursor. In principle, yes. But besides this, there are many other cool features that will simplify and expand this work process. So let's move on. With the agent mode, it's generally clear. Well, that's how it works. Let's see what other modes there are. But before that, look, we just did this in the context of one chat. Here's our chat with the AI agent. Cool. But an icon of filled context has appeared here. If you hover over it, you'll notice that 15% of the context has already been filled with the creation of this game. Consequently, when our context gets close to the end, the model will start forgetting some information, will start hallucinating, may stop considering important factors. In short, you can't work infinitely in one chat, unfortunately. And in general, a simple rule. If you've finished with a task and want to move on to a new task that doesn't require this previous context, meaning you're starting something new, just open a new chat with the plus button here, and a new context window with a clean message history will open. Here the context is 0% filled. And we'll start doing something here, some new task. These chats. If you click here in the settings and enable the display of agents, they will appear here in the list. So these are essentially the agents. Here's our agent, which created the Tic-Tac-Toe game, Cross and Zeros. All good. We can click New Agent. And essentially, a new chat will open in the same way as if we had clicked the plus button. Now, however, the tabs have disappeared from here, but this is because these tabs are now displayed on the right. Here. If we hide this agent block, then these tabs will reappear. And essentially, these are the same agents. Honestly, I rarely open this agent block. I find it more convenient without it. It takes up space, and without it, there's more space. But the same agents are switched here in the tab. Okay, everything is clear. Let's see what else we have in terms of modes. Besides the agent mode, we have the Plan mode. This is planning mode. And it differs from the agent mode in the following way. In planning mode, Cursor doesn't immediately start implementing the task and taking actions. It first creates an action plan, shows it to you, and only after you approve it, does it start performing the actions you expect from it. Besides creating an action plan first, it can also ask you some clarifying questions if they arise. For example, if you gave it incomplete information, then it will clarify what you meant, how best to do it, and suggest some options. Let's try to do this. I'll enable planning mode, it's already enabled. Instead of giving a task, I'll ask it a question, after which I expect it to implement something. The question will be as follows: Look, we have a Tic-Tac-Toe game, and I want to improve it somehow, add some new functionality. What can you suggest, and how will we implement it? Well, let's say the question is stupid, of course. I don't know, I could have come up with something smarter, but I couldn't. I press Enter. I just hope this demonstrates the process of working with this planner. It will think now. By the way, an interesting point. Here you can see its thought process. It hides later, but you can open it like this and see it. This is its thought process. It thought for 7 seconds, came up with something. Okay. Here's the trick. In the model selector here, you can notice that there are models with the same name, but one has a brain icon, and the other doesn't. The difference is precisely in this reasoning. That is, I currently have the SAN 4.5 model with a brain enabled. This means it will reason. This gives it the ability to provide a more balanced answer, a more considered answer. If we had turned it off, it wouldn't have thought, but would have just blurted out whatever its neurons connected in its brain. That result it would have given us immediately. But with a brain, it thinks for itself, can reason, evaluate its own thoughts, and then provide us with a more balanced answer. In principle, this is also a bit more expensive, because, in addition to the main answer, we consume tokens for reasoning. Tokens are like a unit of information processed by the neural network. This isn't necessarily a letter; it can be words, sentences, even. In short, some unit of information under the hood of the neural network. So, it's offering us something. We can make an AI opponent, which is quite complex for our test task. It also suggests making a visual winner indicator. You can do an undo move, well, like undo the last action. And a few other suggestions. I don't really want to delve too deep into this now. We're only covering this as an example. I want to show how it works. I'll say, let's do undo move. That's all I'll write to it now. See how it will act now. I've chosen an option, and now it will start creating a plan to implement this functionality. A plan window has opened. It's writing it in real-time. And when it finishes writing it, we can either agree with it or add something. In this specific case, it didn't ask us direct questions. Sometimes a panel with clarifying questions from it appears here. Not direct questions, but clarifying questions. For example, how do you specifically want to implement this? In this case, it found everything clear, but in any case, it created a plan. We'll go through it. In general, to see what it wrote. Here it describes the implementation logic, and if something doesn't suit us, we can simply write to it: "Let's do it differently." I won't do that now simply to save time. Just know that you can. That is, if you don't like something, just write a new prompt about what you don't like, and it will correct the action plan. In this

In this case, I will simply click "build," and it has now switched to agent mode and started implementing these changes. While it's implementing them, I'll say the following. Planning mode is a great thing. I use it quite often. When I need to do some big task, or if I'm unsure about the implementation, then I can directly ask it, as I just did, like, "What do you think is the best way to do it?" It can ask me some guiding questions even before it answers and makes some, well, suggestion, right, on how something can be implemented. It might ask, "Why do you need this at all? What do you want? How do you see it?" And so on. After that, I will agree with it, and okay, then we start development with it. If the task is some super small thing, well, like changing the title, for example, on a page, there's no big point in using planning mode. If it's, of course, some title that is connected with a bunch of other titles or something else, well, maybe. But, in general, you understand the principle, I think. For simple tasks, it's not necessary. But if you want to plan first, somehow fix the action plan, or discuss some implementation, then you can use planning mode. In any case, I advise you to just try using it, and you will understand for yourself at what moment and for what purpose it is convenient for you to do so. At the current moment, it has implemented some buttons for us. Let me open our game again. Here we have the "und move" button. Well, let's say, "batz" works perfectly. Well, tic-tac-toe is a fairly simple program to implement, so it managed here. But it's still good, like, everything is fine. Okay, we are not evaluating the intellectual abilities of the neural network right now. We are just looking at what modes are available here. We've dealt with planning. Let's move on. The next mode we will analyze is debug mode. It helps in fixing some errors, finding problems, and eliminating them. Let's see how it works. Let's open a new chat, select debug mode. And to test it, let's break something. For example, let's delete Wins Pattern. We will agree with the previous changes. Click "Keep file." These were the changes from the last implementation. Now we have deleted WS pattern. And if we open this page now, then at first glance, nothing will happen. We can even play somehow. But notice that we are currently only displaying crosses. A normal situation. Let's tell the neural network that for some reason we only have crosses on the screen. There must be some problem. And let's see how debug mode works. We have created this problem artificially now, but in a real situation, it also happens that something is accidentally deleted somewhere, something breaks somewhere, and so on. Let's ask the neural network to fix it. Look at our tic-tac-toe game. For some reason, we are only displaying crosses now. That's it, I press Enter. Let the neural network think and tell us what the problem might be. The cursor suggests several hypotheses. Moreover, it immediately drew attention to win Patterns, that we don't have this variable, and even started to fix something. But in fact, it's not even fixing, but it did a much more cunning thing. It added click tracking and wants to see the logs that will appear when we click. That is, to track what actions are happening, how it affects the code. Let's try. I open our tic-tac-toe, click on some crosses everywhere, for example, yes, and we can notice that there was an empty column of bug logs here, and now it's full. Next, it offered us the next steps, actually, to open our file, click on three or four cells, make sure that only crosses are displayed, and click "process." That is, we gave it some logs by clicking, and it tracked them. And we say that yes, we have done this. Now it will see what's wrong and, in theory, should fix our error. Look what it did. It analyzed the logs, said that all hypotheses were confirmed, and started the correction. And now it suggests repeating the same steps again. It will also track the logs and see if it has fixed everything. Let's do it. I open the page again, click. We have zeros. Everything is great, crosses won. Okay. Let's open the cursor again. We say that we have done this. Now it will look and check if the error has indeed been fixed. It confirmed the fix, and now it's deleting the extra logs that were added to track the problem. If you don't know what logs are, then, essentially, it's some record of some action. So, it scanned all these actions that happened, saw that everything is fixed, and says that everything is fine, it's fixing it. Notice that at the end, if we click on our file and look at the changes, all it did was add Win Patterns, which we initially deleted. We agree with this. Well, besides these changes, there's nothing else. Let's agree, everything is great, our game is working again. And that's roughly how debug mode works. It's a very useful thing. If you encounter a problem, it doesn't just try to solve the problem immediately, but it first tries to track what the issue was. And when it understands what the exact problem is, it fixes it. And it also deletes the extra code that it added for tracking. Okay, we've dealt with debug mode. The last mode remains – Ask. In fact, it's probably the simplest mode. In this mode, the neural network simply does nothing. Well, in terms of not performing specific actions, but simply answers our requests. Essentially, it works like a regular chat with a neural network. Well, for example, in ChatGPT. That is, we write something there, it answers us something, but it doesn't make any changes to the files in this mode. But, naturally, it has access to the files. It can look at them and, based on the code it finds, tell us something. This mode can be used if you don't want to implement anything, but just want to ask questions. Perhaps you've joined a new project, and you need to understand the code, how it works. Then, turn on ask mode, ask questions, the cursor looks at the code and answers them. Okay, we've dealt with the modes. What's interesting here? Besides the fact that we can write prompts here, we can also attach images, and the neural network will analyze them. For example, let's take a screenshot of the cursor page. I'll copy it, delete this, paste it. An image icon appeared, well, a preview. And let's ask it to update the design of our tic-tac-toe to match the screenshot. I write to it: "update design to match the image style." So, update the design to match the image styles. Look immediately, first, we switch to agent mode here, because in ask mode, it won't do anything. Second, besides adding an image here, you can also drag files into the context. That is, it's done as follows. We take our file, for example, we know for sure that we need changes in this file, and we can just drag it here like this, and it will appear in the neural network's context. That is, the neural network will immediately know that we need to edit this file. Or look at this file, if we provide it as a reference. In short, we immediately indicate that this file needs to be interacted with. This is quite convenient, especially if there are many files in the project, and you also understand them, right, which file is responsible for what functions. Then you can directly give the file to the neural network's context and thereby make its task easier, so it doesn't have to search for it throughout the project. Besides the file, you can also provide specific lines. For example, we would like to change this particular block, or this particular logic. Let's take the script from here, yes, highlight the entire script like this. That is, it's no longer the whole file, it's part of this file. Here we get a hint that you can add this to the chat and edit it using hotkeys. Add to chat Command L, edit Command I. Furthermore, if we scroll down to the end of the selection, there will be buttons to add to chat or Quick Edit. If we click Quick Edit, then a window for requesting the neural network opens right here in the file. And we can ask it to change something here. We won't do that now, but if it's a quick fix, you don't have to use the chat window, but write it here. Also, there is a model selection. By default, it's set to auto, but we can choose something else. Moreover, you can also add models here in the same way, but not all of them are displayed in this quick edit. Most likely, some simple models are displayed. Well, you can also set it to auto. That is, it's assumed to be some simple editing. Also, here you can choose what you want to do, either edit or ask a question. That is, essentially, these are agent mode and ask mode. If we want to ask a question, for example, how it works, let's do it. "How it works?" we ask it. It will think now and give us an answer about how it works. In general, here's its answer. We are not very interested in that now. We could also ask it to edit something if we had chosen section mode. But I wanted to show you not only this. For example, let's highlight the script again. If we copy it now, we can paste it into our chat window. Press Ctrl V. And here you go, not just a file is attached, but a file with specific line indications. That is, from line 196 to 310. These are exactly the lines we highlighted. This can be done this way, or you can click the button, well, it doesn't matter. Here we highlight again. We can click on "to chat." And notice, it's also added to the chat in the same way. Okay. We don't need this now. Let's just drag the entire file here. We need to edit it completely, not just its logic. And press Enter. What I want to show with this is that neural networks can work with images and that you can drag a file or specific lines into the chat context, right, and with the file. Now the neural network will analyze the image, identify some styles from it, and update the styles of our tic-tac-toe game so that they resemble what it saw in the screenshot. Cursor has edited something. Let's see what it came up with. Let's open the file again. And as you can see, yes, the styles have changed. Well, I wouldn't say they perfectly match what we see here, but the cursor simply didn't find some elements. The color is very similar to the download button. The blue and red borders in the screenshot were not there, but it decided to add them for some reason. But in any case, the colors are similar to the download button, for example, these headings are similar. Well, and the background also seems to match. In short, it understood in general. If we want to edit something, we can write to it separately. For example, "remove the borders from the score cards." Well, for example, or something like that. We won't do that now. You already understand. You just write the next prompt here, like, "please remove the borders." Or you can open a new chat, since, by and large, we don't really need the previous context, we just need to remove the borders. We could have done this in a new chat. I made a separate video about context, about working with context, how to get into limits, and how to optimize it. If you want, you can watch it. The link will be in the description. We won't delve too deeply into this now, but just keep in mind that you can hit the context limit in one chat. Well, and of course, there are limits in general for subscriptions. And, roughly speaking, when we send a new message here, the cursor will send not only the last message to the neural network but also the message history that was here. Yes, it caches something, but in any case, it's a larger amount of information than if we had written it from scratch. Although, of course, this is a debatable point in the sense that if we needed this context and the neural network would start looking for it anyway, then it would be cached here. And if we opened a new chat, there would be no cache, and it would take the same thing into context. Only this data would not be cached, and therefore would be valued more expensively. But that's not the topic of this video, actually. I wouldn't say it's super important right now, and you can not worry about it for now. What else can the agent do? I already mentioned that it can follow links. That is, in this case, we sent it a screenshot of the page, but we could have sent it a link to the cursor page. Besides this, it can execute commands in the terminal. Let's look at that too. First, I will delete our tic-tac-toe, which we no longer need, and write a simple prompt to it. "Create a NextJS Project." I press Enter. I hope it can initialize a NextJS project now. NextJS is a framework for developing web applications, websites, based on React. It's good if you understood what I just said, but if not, I'll try to explain it very simply. A framework is a set of tools and rules for creating something, for example, an application or a website. And React is a library. In general, also a set of specific functionality, which can be used for frontend development, that is, the user interface. All sorts of buttons, cards, all of this is frontend. What you see, all these elements are the user interface. Okay, let's see what's happening in our cursor now. And you can notice that the cursor has already started executing our task. It has already launched some command. It launched it without asking, because I have allowed it to execute. I'll show you where. And this command, it seems, is not allowed. I allow it to execute. And it, essentially, executes these commands in the terminal, which initialize some processes. Here's what happened. It tried to execute a command that initializes a NextJS project, but it couldn't do it because our folder was not empty. We had another folder, "cursor," in this folder, and this prevented it from initializing the project. Therefore, I have now canceled what it is doing. I clicked "stop" here, and it simply stopped all execution. It hasn't finished creating our NextJS project yet. There are two options here. Well, first, I'll just delete all this because I don't need it. And I want it to do it again in the current folder. By the way, here we have a tab open with a plan that we created at some point. We no longer need it, it can be simply closed. Ah, look, yes, here are two options. Either you initialize the project in an empty folder. Now there's nothing here. The ".cursor" folder is actually created automatically by the cursor at certain times. We'll get back to it soon. It's an interesting folder, a lot can be done in it, but for now, we don't need it. Therefore, I have now deleted everything and will try to ask the cursor to do it again. In theory, it should work now. I don't want to cut this out because it's a fairly common problem. That is, if you are in a folder where you have already created some files and ask the neural network to initialize something in it, then it first goes to execute some command to initialize a project from scratch. And this is correct, it's a good command, but this command gives an error if something is already in that folder. Well, at least it can give an error. The neural network sees this error and tries to create it differently, that is, well, by its own means, right? So, what happened now? Essentially, the cursor executed one command, and all the necessary files were downloaded for us to run the project. If this command didn't work, it tries to create these files itself from scratch. It can do it, but it's much better to initialize the project with the official command. If we go to the NextJS website now, click "get Started," and somewhere here, we'll probably find this "installation," yes, we'll find roughly the same command. We used npm, a package manager. This command NPX Create, next up, and so on. Let's see. This command. Then there are certain parameters, it specified them so as not to choose them manually. If we enter this command manually, then the command in the terminal will ask us for the configuration we want to create. Here, the cursor simply specified the parameters so as not to answer these questions and immediately make it clear what configuration needs to be executed. Notice, now it has succeeded. That is, it did it. And here's the second option, which I didn't explain at first. If you have already started doing something in this folder, possibly created some documentation, which we will talk about a little later, or something else, well, in general, you have other files, then most likely, the cursor will not be able to initialize the application with such a command and will start doing it manually. I don't really like it when it does it manually. That is, yes, it can do it and even everything will work, but I prefer to understand that I have executed the official command. Or rather, the neural network executed the official command, and everything was installed as specified there. Therefore, in such a case, you can simply create a new folder where your project will be located. For example, there would be nothing here, there would be some other files, and you could create a folder here, for example, "web" or "app" or something else. Well, that is, a folder directly with the code of our application. Here in the root directory of this project, we had some other files, and the application itself would be in this folder, for example, "app" or "web" or whatever it's called. And it would be able to initialize it perfectly in that folder because it would be empty. You can use this option, not bad, by the way, a normal option. Or do it like this, and then ask the neural network to copy all the files from that folder to the root directory. If you still want everything to be in the root directory, then the neural network will be able to execute the official installation command. And if you need everything to be in the project root, and you already have some files there, then it will simply move them, and everything will be as you want. Look further. First, yes, the cursor executed commands in the terminal. Cool, we demonstrated this, you can see. Next, it offers us to run the server so that our project works, so that it opens in the browser. We need to run the server. We can't just drag an HTML page into the browser if we are working with the NextJS framework, because, well, it has much more functionality than just displaying a static page. Okay, let's do it. First, you can, in principle, ask it to do it, to run it, but just in case, I'll show another option. Here we click "show terminal," or here "terminal new terminal," or the key combination Command J. Well, you will have your corresponding key combination there. Okay, the terminal opens, and we just take and run our command. Okay. NPM Randev. We are thus running the server for development. Notice that the browser has opened here in the cursor. For now, it's not displaying anything here, but if we open our page in the browser, then our page should open. Well, the starting page of this NextJGS framework. Cool. This is already good, it works. You can already write more complex things here than just tic-tac-toe. It's also worth adding that to enable the browser independently, you need to click on the three dots here. And there's the "open browser" option. For this page to open in the browser, well, first, you can try to refresh, but somehow it's not working for us. Or here HTTPS. It might be difficult here, but, in short, these are two different protocols: HTTP and HTTPS. We need to delete this. Ah, the letter S, or just copy what it gave like this. It will probably be easier. And paste. And it should, I don't know why this page isn't opening for me. It's a real mystery, but in principle, you can copy the second link, paste it. Well, it opened for me. I don't know, most likely, the first one will open for you too. Maybe I adjusted something in the settings, I don't know. But in any case, the browser works. Moreover, the browser works not only with our local sites. It's a regular browser. We can write, for example, Google.com here. And Google.com will also open here. True, it asks me if I'm a robot, and I'll have to pass a captcha. But in any case, you can see that the page is opening. Okay. After I passed the captcha, everything opened for me, everything is great, but we don't need Google now. Let's go back to our site. I will use the second link because the first one is not opening for some reason. At the same time, in a regular browser, everything is fine. Local host 3000, and here for some reason it's not. If you know why this is happening, please write in the comments. I think it might be useful for someone. So, this is our page. Everything is cool. Let's go back to our program. In general, what I wanted to say with this is that the cursor can work with the terminal. In fact, all of this was about this. That is, it can execute commands, and thanks to executing commands, it has quite a lot of possibilities, actually. If you have never encountered this, then through terminal commands, in principle, you can do, well, almost anything. Of course, it won't execute them without asking. It will ask if it can execute a command. At least until you allow it to execute it always. First, when it asks, you can choose "always allow." And second, here in the cursor settings, in the agents tab, there is a field called "Command Allow List." Essentially, you can see that the NPX command, which the cursor executed, is in my allowed list. That is, it can execute it without asking for permission. By default, it will ask for all commands, so it won't execute them just like that. You must approve them first, then it can execute them. Okay. This is to say that you don't need to worry about security. You can always forbid it to do something, but potentially it has very great possibilities thanks to the fact that it can execute terminal commands, and this gives it many possibilities. Okay, the terminal is clear. What else I wanted to show. You can drag not only files into the context, as I already showed, you can drag entire folders. Please, now we have added the entire "src" folder to the context. Besides this, we can drag some information from the terminal there. That is, in this case, everything is fine. If there was an error here, we could highlight it like this, click "to chat." And the information from the terminal would be added to our context, with an indication that it is information from the terminal, and not just a list of lines with symbols. We can also copy the contents of the terminal and paste it into the chat. And similarly, this information will be added to the context with an indication that it is information from the terminal. And again, if you don't want the cursor to mark it as information from the terminal, you want to paste it as plain text, then copy and paste not Ctrl V, but Ctrl Shift V, or Command Shift V. And then it will be pasted as regular text. Moving on. Let's, for example, give it some link, say, the same cursor.com. And let's ask the neural network to make the header the same as on this page. I pasted the link and ask it to make the navbar on our project the same as on this page. I press Enter and let's go. In fact, yes, this can be called a navbar, that is, a navigation bar. Well, it could also be called a header, it doesn't matter. And then what happens is that the cursor asks me: "Can I visit this site?" And I allow it. The cursor made us a NAFB. And, of course, it's not exactly the same as what we saw on the page. Well, at least the heading and buttons are similar. That is, it took information from there. This happens. I have a suspicion that when we give it links, it looks more at the content, but it doesn't analyze the visual. If we want it to match the header from the cursor visually, we can take a screenshot, paste it here, and ask it to make the same styles. Okay, I press Enter. Let's see how well it understands this now. The cursor has finished with the changes, updated our navbar, and even wrote the heading as we have in the screenshot. And it even made a button, tried to add some icons, but it draws icons rather poorly than well. It just draws them itself. Sometimes it

It seems, sometimes no, but now we don't care much about it. Of course, it's not ideal. It's not one to one, exactly, what's on the page. For this, firstly, one could describe it to him in more detail, for example, not just write about the navbar, but in general. That is, take the same background from the page, such and such buttons, everything the same. That is, describe it to him point by point. But now I won't go into this for now. Now I want to show this. Here he made some changes. Suppose he made changes that we don't like. And what should we do? Fortunately, Cursor has checkpoints. You can notice that opposite the messages we sent, if there were any changes after them, there is an arrow icon. That is, we can roll back to this point. If we click on it now, Cursor will ask us: "Are you sure you want to roll back to this checkpoint?" Yes, this is called checkpoints. We click "Yes". And it cancels all actions that he did after this message. In fact, this is very convenient, and it often comes in handy during work. If we ask the neural network to do something and it doesn't do exactly what we need, we can roll back and, for example, change the prompt, describe in more detail what we want from it, for it to do. For example, I will write him a more detailed prompt asking to update not only the navbar, but the entire page, so that it fully corresponds to what he sees in the screenshot. And let's try to send him this prompt, let's see what he gets. Okay. He updated the page. Well, yes, it's not exactly what we wanted. With this, in principle, we can deal with it further. Ask him to update the header, ask him to update the background, if required. Well, in my opinion, yes, the background of the page is different, and so on. Already go through each component. And, by the way, let me show you a cool feature with the browser in Cursor right here. For now, let's hide the terminal so it doesn't bother us. There is a button here, symbolizing element selection. And if we click on it, we can select some element. Here it is highlighted, outlined. For example, the header. If we click on the header, notice that this header has been added to our chat context. And now we can write some prompt asking to make it smaller. But besides that, what else I want to show you. Well, this, I think, you, in principle, understood, right? By analogy with the context, that we sent files, links, anything, you can also directly send headers or other elements on the page into the context like this. Besides this, if we open this right panel here, you can see some parameters of the selected element, and they can be changed. For example, here is the text parameter. We have selected the font "er". We can choose some other font. It immediately changes visually here. And we can also choose the size of this font. For example, make it smaller. For example, make it like this. We can also edit the line height. Well, for example, let's assume this suits us. What to do to make it save? Very simple. For this, you can click the "apply" button. After that, all these changes are sent in a message to the neural network, and the neural network changes the values in the necessary places. We cannot simply take and save it, because here we see what the result is, right, the text size, the font size, but under the hood in the code, these parameters can be formed differently. These can be some variables that are used in other places, or some classes with styles that are used in other places. Therefore, we send all this to the neural network using the "apply" button, after which the neural network changes the necessary styles, and we, in theory, should see our styles here. And now we have an error. Let's try to reload the page. It doesn't help. Ah, it's okay. You can do the following. Either use the debug mode. But in this case, I think we can just copy the error or click here. And it's not clickable here. Well, then just copy the error, paste it to the neural network in the chat, press Enter, and it should fix it now. Well, it's quite simple. We could, in principle, select it like this. Ah, no, we couldn't. Well, we could select the next portal like this, right, that is, the entire page. In principle, that would also work. The neural network would see the error message and fix it. So, now the page is broken. Let's try to update it. It doesn't work. Let's see what's in the console. Perhaps the server needs to be restarted. Let's do that again. I'm running the same command `npm ev`. I'll try to update. Still not working. Now we are getting a 404 not found error. The thing is, Cursor found some duplicate file. Now, in principle, we can just give it this whole error like this. Click on the topmost component, that is, the one that combines everything else, and send it to him. Let's see how well he understands it. As a last resort, we can simply roll back to the previous step. Cursor cleaned up some duplicate files. Although, of course, it's strange that they were actually duplicated, because all we did was, in essence, initialize a NextJS project. But surprisingly, I thought he broke everything, and it actually worked. That is, the styles were applied. Maybe at some point duplicates were created there. I don't understand at what point this could have happened, but nevertheless, it works now. And notice that he fixed the header. Besides just the text size here, there are actually quite a lot of different parameters that can be adjusted. For example, if we select the entire container, then here we can set some internal paddings for it, horizontally, vertically. If you have worked in Figma, then some elements here are similar to what we have in Figma, for example, we can work with the layout, align them differently. and at the same time edit some paddings. For example, here we can adjust the padding between the text and the button, if we align it like this. Or vice versa. And again, this padding between the text and the button, we can adjust. Now I will cancel everything I did. In principle, I didn't need it. For now, let's leave it as it is. Why was I telling you all this? Because there is a browser right inside Cursor. Besides the fact that in the browser you can open pages that we created ourselves, you can open external pages here. For example, we can open the same cursor.com. Great, the page has opened. And instead of taking screenshots or sending a link, we can literally give context of some component from this page. For example, we can select this block with cards like this. It has already been added to the context. And let's ask Cursor to add this block to our page. A maximally simple prompt. Add this block to our page. Let's see how well it understands it. At least in this version, it has not just a visual image and not just a link, which it most likely uses to view the content, not the visuals, but it has everything together. It sees both the content and the styles of these elements, which can also be partially viewed here. Let's see what he did. He added the cards, but didn't write the styles, of course. You can try to ask him about it. Here, the line spacing has shifted. Actually, it's not even that, but the font size has shifted for some reason. Now it's 59 pixels, and it should be 24, for example. Yes. Perhaps Cursor just didn't grasp what and where needs to be changed. Let's do it again. When he last edited it, we found some duplicates. Let's see if he can fix it now. So, it seems he implemented it. If you refresh the page, everything is displayed correctly. Let's ask him to make the same styles for our cards as here. Let's select this block again, it has been added to the context, and write him a simple prompt asking to make the card styles the same as on our page. We could go to our tab and add these cards to the context as well, but honestly, I hope he understands me. He didn't understand me. Let's do it simpler. Let's send these cards to the end of the prompt. And let's send our cards here at the beginning of the prompt. But they are added to a new message, and I will cut and paste them into the prompt. Let's see if it works now. It didn't work. What if we send him the project folder? Then he clarifies what exactly we want to edit. I will write him `same background border radius sizes`. Well, he did it partially. He didn't give us the card background. There are actually borders here too, if you look closely. Perhaps now he can fix it for us. He offered three options, and we need exactly the same background. Therefore, I chose the third one. The first option was some standard gray, the second transparent, and the third exactly the same. I want him to literally take the shade from our reference. In short, Cursor tried, but stubbornly doesn't understand me. You could attach a screenshot to him here. Let's see. This card has a background. You can copy it and on our page select the card and in the Background section paste this shade. Well, like this. Click apply. Perhaps he will understand us now, but we won't go into this too deeply for now. In short, you can have fun with the browser here. It doesn't always understand well, but it's okay. With great desire, you can achieve results from it. It's normal to have to clarify some points, but I don't want to get stuck on this for now. We still have a lot of material. We can stop with the browser for now. If to give a brief theory now, then it could be done a little differently. Take the reference from the desired site first, ask the neural network to describe all the styles, exactly one to one, that it sees on this site. After the neural network has thoroughly described all these styles and has fixed it, you could then ask to implement the corresponding elements on our site. Most likely, this would work better. Cursor's browser is not the main hero of today's video, so we'll finish with it for now. Just keep in mind that it exists, you can work with it, you can ask the neural network to change something, you can manually adjust the styles of some elements. The neural network will then edit them in the code. Sometimes it turns out perfect right away, sometimes it's not like that. But the neural network is like that, you often have to tweak something, polish it, ask it to do more, change something. In general, you often have to polish it. There's nothing criminal about it. Everything is okay. We've almost finished with some basic functions. There are a couple of points I want to mention before we move on to more advanced settings and topics. Firstly, regarding checkpoints. Yes, we can roll back to checkpoints within a single chat, but if we had multiple chats and want to roll back some changes, then we either have to roll back sequentially in each chat like this, or I don't even know what will happen if we now roll back to some change from an old chat. That is, will it delete part of the code there, and leave part from other chats, or delete everything? But in any case, it will cause certain difficulties if we want to roll back a large amount of changes at once. And generally speaking, checkpoints are not quite designed for this. That is, checkpoints can be used within a single chat if the neural network did something and we didn't like it immediately. But if we want to manage the project state more flexibly, then we need Git. Git is like checkpoints on steroids and even more. With Git, you can very flexibly manage the project state, create parallel development branches, test new functionality in them, then merge them into the main project state, or vice versa, roll back. In short, there is a separate video about Git, and it is definitely worth watching if you are going to do at least some more or less serious project. Even if it's just a landing page, you already need Git. That's for sure. So watch it, it will be very useful for you. Besides Git, what else do I want to mention? Here in the settings in Cursor Settings, in the General tab at the very bottom, there is one parameter called Privacy. And here you can enable privacy mode, that is, not to send your data to improve Cursor's performance, so to speak. And I advise you to always set it. There are two options here. Share data, that is, help Cursor improve its functionality, or enable Privacy mode. If you are working with sensitive data, then you definitely need to enable privacy mode. And frankly, even if not, then still enable it. This choice is available only on paid subscriptions. On a free account, Share Data mode is always enabled without the option to change it. There is also a notification section here. you can enable sound notifications when the agent has finished working. Sometimes it's convenient, I have them turned off now. And you can also enable system notifications when the agent needs your attention, for example, to approve command execution. We've finished with the basic information. Now we'll move on to, so to speak, the advanced level. It will be more difficult to perceive if this is the first time you are seeing this program. But it will definitely be useful to you sooner or later if you continue to work with it. Firstly, as you may have noticed, neural networks don't always do what we want them to do, and that's generally normal. But to improve the quality of their work, there are certain methods, so to speak. In fact, everything sooner or later comes down to context management. Context is the information that is available to the neural network within a single dialogue. Roughly speaking, it's like this. We have already encountered the topic of context management when we added files or elements from the browser to the neural network's chat, thereby giving the neural network some additional information, or images, or links, into the context. In general, yes, but besides the fact that you can simply add some information to the chat, Cursor has additional features that simplify working with context beyond the simple dialog window. Let's figure out what ways there are for this. First, we'll go through these possibilities overview and then consider each of them in detail. In Cursor settings, there is a tab Rules, Skills, Subagent. This is a rather important tab that contains rules, skills, and subagents. There are three tabs here, that is, well, three tabs. These are All User, Cursor Guide. Cursor Guide is, by the way, the name of our project. By and large, these are all user and in-project. Well, these entities, that is, rules, skills, subagents. What they are, we will figure out now, don't worry. Also, we have a tab - these are hooks, which we will cover soon. There is a tab Tools and MCP. We will probably touch upon it last today. And there is a tab indexing and docs. Let's start with this tab. This is probably the simplest tab there can be. Indexing is the indexing of your project. When you create a project, you have more and more files. And this is called the codebase. Well, that is, your files with code. Well, and not only with code. Cursor indexes them. And indexing is exactly about this. In our case, our codebase has been indexed, it says 100%, 13 files. You can start synchronization again if you need to do this. Generally speaking, it should start automatically. Well, in principle, you can click for fun, but nothing is happening now. In short, this usually happens automatically. The codebase is indexed by Cursor. Everything is great. Among the parameters, you can highlight `index new folders`. If the checkbox is ticked, new folders and, accordingly, files will be indexed automatically. And there is also a section for ignoring files. That is, we can add a file to Cursor and ignore it. Now I clicked the button, and it created this file in the project root. Here we can write which files Cursor will ignore. For example, we can add the `.env` file, which contains some access keys and other sensitive data. But since we don't have such files in the project now, we can write, for example, as follows: `*.md`. An asterisk means any file name with the extension `.md`. In particular, this is `README.md`. And if we add some file here, for example, `private.md`, it should not be indexed by Cursor. And here opposite the file, we see a crossed-out circle. If you hover over it, you can see that we have forbidden Cursor from indexing this file. If we return to the settings and click synchronization again, this file will not appear here. This is a useful feature if you want to hide some of your sensitive data, private data, maybe your access keys or passwords, from indexing. After all, it often happens that people don't want the neural network to know their passwords. Regardless of whether privacy mode is enabled or not, well, screw it. In short, you can edit files that will be ignored by Cursor. There is such an option. Besides this, we have a `docs` section here. This is a cool section. Here you can add documentation for Cursor to follow. And you can add it quite simply. For example, we want to add documentation from Lucid React. This is an icon library. We copy the link to this documentation, click `Add docs`, ah, I've already clicked, and paste this link here. Press Enter. Done. After that, we can give this documentation a name. It seems I reset it now. Let's do it again. I press Enter. The name is set. All that remains is to click confirm. After that, our Lucid React docs will appear in the list, and a green circle will indicate that this documentation has been indexed. This is quite useful if you are working with a specific framework, a specific programming language, and so on. You can add documentation here, after which Cursor will know about it. You can also explicitly point it to this documentation when you want to draw its attention to it. The at symbol is used for this. Here, select the `docs` section. And here we have quite a lot of documentation. Let's find our library. Here it is, press Enter. Done, we have added the library to the chat context, that is, well, the documentation of this library. Cool. If you notice that Cursor starts to lag and make some strange errors, you can give it the documentation for the corresponding library or programming language. Most likely, it will start working better if it explicitly looks at the docs. You can also update the documentation here by clicking the refresh button. The library has started indexing again. Now there is a yellow circle, when it is indexed, it will turn green. You can delete it using the trash can icon. Well, in short, this should all be clear anyway. This is a fairly simple section, we won't dwell on it for too long. Let's move on. We are very interested in these two tabs: Rules, Skills, Subagents, and Hooks. The topic is complex, but interesting and very useful. So, get ready, we're going to break down what this is. To explain how all this works, I have prepared a small diagram. Let's figure out what means what here. We have been working at the prompt level so far. That is, we wrote prompts. A prompt is essentially a message to the neural network with some request to do something or get some answer. These are all prompts. We wrote prompts, sent them to the Cursor Agent. The Cursor Agent is this window, it's our main Cursor agent, which does something or answers us. And that's basically it. The Cursor Agent gave us the result. There is no result here, but I think you understand this without a diagram. But it works approximately like this. That is, yes, we write prompts, the Cursor agent does something and gives us the result. Now it will only interfere here. So let's leave this diagram like this for now. Ah, look, the simplest thing we'll start with is commands. Even in Cursor, in the message window, it says that we can add a slash for commands. We'll get back to this now. How exactly to do this? First, a little theory. Through the at symbol, we can pass context here. Yes, we understood that. We can add either some files, or documentation, or something from the terminal. By the way, we can add previous chats to the context. For example, if we click here, we can choose some previous chat. A cool feature. If the context of this one chat is filled up, we can pass it here. Although, in fact, it will probably eat up a lot too. But let's do this. If we need the context of some chat, we can add it here. Everything is great. You don't have to ask the previous chat to summarize something. Although sometimes it's even better, because the final file will still have less information than the whole chat, and it will be concentrated. But such a possibility exists. Besides this, we can refer to the browser and some elements here. And in principle, we can throw some Git branches here, but we won't consider them now. This is regarding context. Regarding commands, that's where we stopped. Commands are essentially the same prompts, only they are described in some command, and we don't need to write them every time. For example, we need to push our updated code to Git, right? I already mentioned Git, didn't explain much. Briefly. Git is like a code repository, something like Google Drive, Yandex Disk, only with a lot of additional features, with the ability to control versions, roll back, create parallel development branches, and much more. So, let's get back to commands. For example, yes, we can create a command to send our files to Git, we can create some universal command to create files, to initialize a project, to write documentation, for review, that is, to check our code. Well, for example, write in the command, check that everything is working, check that the tests are building, check that everything is good, give an answer. So that we don't have to write the same thing to the neural network 100, 500 times after each message, we can create a command. Well, and in general, commands can be used for any recurring actions, well, prompts, right. That is, if we ask the neural network to do the same thing, instead of writing it anew each time, you can write a command. Okay, roughly understandable. It will become clearer in practice. Let's move on. As you can see, commands and prompts are marked in green here. This is not by chance. I did this because the entities are very similar. We just write prompts manually. And for commands, we can write a prompt once and not write it 100 times. But the principle is the same. What else do we have here? Let's first look at this card. Subagents. This is a very cool entity in Cursor. And it's not only in Cursor, it's in CloudCode and probably in many other tools for development with neural networks. So what are subagents? A subagent is like a separate chat with Cursor, the one that opens separately. What's the difference? It has its own isolated context. For example, we are doing some big task, well, a whole page, for example, to lay out or something else, to add some big logic. We start doing it in our main agent. And after the first few prompts, our context gets filled up. I've already shown you. There is an icon here showing how much the context is filled. Here, for example, 17%, here 20%. Yes, it's not much, but our project is super simple, with 13 files. If your project is large, then this context gets filled up very quickly. When I was coding my website, which I showed at the beginning, this one, even here, it would seem, a small site, but a lot of code, components, files, plus documentation, about which, by the way, I made separate videos. You can watch them too. I won't go into such detail about it in this video, but it's an important thing. Therefore, if you haven't worked with documentation for agents yet, it's worth studying too, it's a good boost to your development process. But that's not the point. I'm saying all this because the context can get filled up extremely quickly. And when I was coding the site, it got filled up in one prompt. It was already about 80%. Yes, there were big tasks, but nevertheless, that is, it was problematic to continue working in this context and it was necessary to create a new chat, for example, right? But if you use subagents, this problem is solved. How is it solved? For example, we set a big task in our main agent, instead of doing it all ourselves. And in the process, what does it do? It looks at what files there are, what files are related to these files, what needs to be done, where and what needs to be changed. That is, it looks through a lot of files, searches for where and what needs to be changed, makes changes. All this is saved in the context and fills up the context. So, there is an alternative. Instead of doing it yourself, this main agent calls a subagent, which starts performing the task in its own context window. That is, it does not save all the information about files, about editing, its thoughts in the context of the main chat. It does it separately in

in its context. And when it finishes, in the main chat, this one here, it outputs only the result. And this is very convenient because the main chat does not get cluttered, we can continue working with it, but at the same time, the main information of our changes and the overall process of implementing, realizing some new functionality, it remains. Essentially, this is the feature of sub-agents. Additionally, for a sub-agent, we can also write some specific instructions for each sub-agent. For example, there will be a sub-agent implementer who implements tasks. We will write him some implementation instructions, how to do it correctly, what to pay attention to, and so on. For instance, we will have a sub-agent reviewer who checks the work of the previous sub-agent and also does this in a separate context window. And, let's say, we will have a sub-agent who writes documentation after all of this, meaning, documenting how the project is currently structured. This documentation can then also be referenced when performing other tasks. And in general, various sub-agents can be invented. For example, a planner who creates an implementation plan, which is then implemented into the project by an implementer, a reviewer, a tester, and so on. And yes, I will say again, the main advantage of a sub-agent is that they do all of this in their own isolated context, without cluttering the main chat with the neural network. Next, let's break down the rules. A rule is a similar thing to a prompt. These are files in which, well, a rule is written, logically, right? For example, never use uppercase letters in file names, or conversely, use them. That is, in the rules, you can specify all the fundamentally important points for you that need to be considered. For example, this could be code style or file naming, or you can specify that neural networks should not output too much text, too many answers. That also happens. Or, that neural networks should not invent information. They also like to do that if they cannot find the correct answer in their own "head." In short, rules are, in general, some norms that agents need to adhere to when performing your tasks. Next, let's break down skills. They are very similar to rules, but there are still differences. Skills are used to describe some processes. That is, in a rule, we write some simple instructions, for example, code standards, some architectural agreements. We write what can be done, what cannot be done. In general, some simple instructions. In the case of skills, we describe some process, or rather, how to do it. Unlike rules, skills can also launch some scripts. Scripts are meant for the terminal. That is, you can create files with a sequence of actions, as if we were writing them in the terminal. These are called shell scripts or bash scripts. Well, in short, files in which a sequence of command executions is written. We can create them, put them in a skills folder, and describe how to use them. For example, in such scripts, you can specify how to work with Git or how to perform code checks. And using skills, agents will launch the corresponding commands or entire files and execute them. It is not necessary to write these scripts. In principle, in skills, you can simply describe some process, for example, code quality checks, in general, some step-by-step instructions. So. That is, in skills, we fix the description of how to perform some processes. In rules, we write some simple, straightforward instructions, what to do, what not to do. A little later, when we create them, I think it will be clearer. But for now, yes, it might be a bit confusing. Rules and skills are really very similar. But I hope that with the analogy, I have at least given a little understanding of the difference. They also have different capabilities. If rules are, in essence, ordinary text files, then skills are entire folders with the same text files. And besides text files, there can also be additional scripts that are executed, launched, where all these commands are run. They can also be written with a neural network. It is not necessary to thoroughly understand how these scripts work under the hood. And in fact, all these entities are perfectly described using a neural network. You just need to ask correctly, and we will get to that. For now, I want to at least roughly outline what entities are responsible for what. And we have, in principle, covered all of them. Only hooks remain. Hooks are also a cool topic. They are placed at the top here, sort of controlling agents and sub-agents. What's the point? Hooks are processes that are launched at a specific moment of the agent's work. For example, before the agent starts working, or when the agent has made some changes to files, or before calling a sub-agent, or after calling a sub-agent. That is, we can clearly define the moment when a hook will be called and perform some action. Hooks come in, well, two types. The first are terminal scripts, which I tried to describe earlier. In short, scripts that execute some commands in the terminal. And the second are prompts. That is, at some point in the agent's work, for example, when the agent has finished its work, a hook is called. Well, it is specified there, when the agent finishes work, call this hook. We will specify this. Essentially, a hook is called and executes a linter command, for example. A linter is a utility that checks code formatting, various indents, spaces, and so on. It executes a code check command and outputs the result, for example, to the chat. And then the agent can, if there are any errors, fix them. Or, several such processes can be added. For example, check that there are no errors in the code, and then commit the changes to Git, for example. You can do that. Or, another interesting point, using hooks, you can call sub-agents. And here, another cool topic begins, the creation of these, well, supposedly infinite development cycles. When you give an agent a large task, and it breaks it down into individual sub-tasks using sub-agents and iterates until all tasks are completed. And thanks to the fact that all this task execution happens in the sub-agents' isolated context, and the main context of the main agent is not cluttered, we can thus handle very large tasks without fear that the context will simply overflow and the neural network will start hallucinating and giving inadequate solutions. At the same time, we can implement a check that the code works correctly. Well, at least that there are no errors in the code. For example, a sub-agent completes one task. After that, we execute a hook to check that the code does not contain errors. And if so, only then proceed to the next task. And if not, then call another sub-agent that fixes our problems. Cool topic, right? I don't know how much we will implement it today. Well, we will certainly do something from this partially, but the video is simply becoming very long. Whether this whole story with cyclical execution will work fully, I don't know. But we will definitely cover each of these entities. Let's fix this a bit more. Commands are quick, repetitive actions. Essentially, the same prompts, so we don't have to write them 100,500 times identically. A rule is context and instructions. That is, in a rule, we can add paths to some key folders or files. Also, give the agent instructions on what it can do, what it cannot do, and how it should do all of this. Skills are similar to rules, but they are used to describe some processes, not just some rules, but a description of some processes that consist of specific steps. Plus, they can execute scripts. Sub-agents are used for context isolation, so as not to clutter the main context, sub-agents are used. Hooks are automation and event control. That is, before some event or after some event, we can call a specific hook. It will perform some check or launch some prompt or some script. In general, hooks are used for event control at specific moments in time. Let's now see how all this works in Cursor. We will start with sub-agents and then cover all other entities as well. To create sub-agents, well, and everything else listed above, we need a .cursor folder in the project root. It can be created manually. Click New Folder .cursor. All done. And it will store files and folders for Cursor, which will, in fact, contain all these skills, rules, sub-agents, hooks, and so on. In principle, this folder might already exist. Cursor sometimes creates it automatically. Also, if we go to the section here, say, rules, and create some rule for the project here, the folder will also be created automatically, and this rule will appear there. We will return to rules a little later. For now, I created this folder manually. To create a sub-agent, you need to create another folder in the .cursor folder, which will be called agents. Here, the folder is created. And inside this folder, we can create our sub-agents. To do this, you need to create a new file. I will name it implementer.m. And essentially, our sub-agent is ready. Cursor also highlights the parameters of this sub-agent here. Currently, there is nothing written here. Let's fix that. So, I have added information about the sub-agent here. Partially, it jumps ahead. Well, what we will do a little later is already written here. This is my template for this file, so as not to write everything on video. But briefly, let me explain. In this block, which is between the three dashes, these are metadata. As you can see, they were automatically pulled here, the description was pulled, at least ronli, by the way, too, if we make it true here, you can see that ronli will be enabled. Now I will briefly explain what these parameters are and what they are responsible for. Name, obviously, is the name. If we add something here, it will appear in this name as well. Okay. Well, we won't do that for now. Description is a description of when this sub-agent should be automatically activated. I'll say right away, this doesn't always work perfectly, and often you have to manually specify the sub-agent to use it. This is done as follows. Through a slash. Then we write the name of the sub-agent, implementer. Here it is highlighted. And we must select it. Press Tab, then it will be highlighted. Or just click on it with the mouse cursor. It should be highlighted, because if we just write implementer and nothing else, it won't be highlighted. It's better for it to be highlighted. Then Cursor clearly understands that we are interacting with this sub-agent. And in fact, if we give it a task here after this mention, Cursor will understand that it needs to call this sub-agent and will call it to perform this task. This is cool. That's it. This is, in fact, the basic way to use sub-agents, which is enough to start using them. Here we set some instruction on what the agent does. Here we call it, and that's it. And it works in its isolated context window, and outputs only the result of its work. But before using it, let's see what else is written here. In the description, as I already said, it describes when it should be used. Sometimes it works automatically, sometimes it doesn't, and you need to specify it manually. Next is the model. In this case, it says inherit. The model can also be selected here in the dropdown menu. Inherit means it inherits. That is, the model will be the same as selected in the main agent. Well, in this case, SNT 4.5. If I had chosen a different model, it would have been inherited, and this sub-agent would also use it. This is actually an important parameter. That is, if you understand that the task that your sub-agent will perform is, well, some simple ones, in principle, you are doing it for simple tasks. For example, running tests, checking code, running a linter, well, I don't know, in general, some simple task, then instead of inheritance, you can set some simple model here, for example, Haiku 4.5, or even set auto. But I don't really like auto, to be honest. I would rather set a specific one manually. In general, you understood. The model can be chosen. Cool. The Ronli parameter is responsible for whether this agent can edit files or can only read them. For example, you can create an agent that should, well, sort of review your code, but not change anything and not write anything to you, just give some assessment. You can enable ReadOnly from the background. What is this parameter? This is a parameter responsible for whether the agent will block further task execution, or will run in the background. That is, if background is true, then the agent will run in the background, and in this chat, the agent will continue to do something. Sometimes this is needed, sometimes not. If you want the main agent to wait for the result of this agent's execution, then set it to false. If you want it to launch something in parallel, you can set it to true, and then it will not block the main chat process. Phew. Okay. Moving on. Next, we have the instructions for this agent. You may have noticed for a long time now, in fact, that here, firstly, some symbols are used, like three dashes, some hashes. In general, a slightly strange format if you see it for the first time. I'll explain. This is the Markdown format. I've mentioned it several times in videos, well, I've mentioned it, but now it's probably worth explaining. Markdown format is, in essence, a regular text file, but it supports markup. Well, that is, we can explicitly indicate that there is a heading, that there is a list, and neural networks read this well. By the way, in Cursor, you can also click on this icon and see a preview of how this file looks. So, this is already a formatted file. You can see there are headings, there are lists, and even headings of different levels. There is some quote or code - this is Markdown code, by the way, it is highlighted with these three apostrophes. And after the apostrophes, it says what kind of code it is. That is, in this case, it is Markdown format. Here could be, I don't know, CSS or TypeScript or bash. And depending on this, what is inside this block is highlighted differently. But, of course, you need to write the corresponding format. to what is inside. In this case, what is inside is Markdown, so, well, it needs to be written as Markdown. Okay, but let's not go too deep into this now, because I'm afraid the video will drag on for a very long time. But, in short, these are instructions, instructions to the agent on what it should do. Briefly, it says here that it should understand what kind of task it is, plan the implementation, implement all of it, check that everything is good, follow best practices. Also, output format is written - this is what it should output, and, as it were, to the main chat. Okay. It also says what it should not do. And chain Triggers, well, we will look at that a little later when we create other sub-agents. Okay. Now, uh, well, let's just do something with it for example, shall we? Let's again call the implementer and ask it to create a feedback form. For example, create a feedback form on the main page, in which add fields for name, email, and message, as well as a send button. No need to implement the logic, only the visual display. Okay, I have dictated the prompt. First, I will add our implementer to tag it, and press send. Now we will see how sub-agents are launched within the context. Look, the main agent is working now. It starts looking at something, checking, and so on. Let's see what happens next. Here. Ah, this is what we need. This is how sub-agents look. That is, now the implementer is working in its context window. It is not cluttering our main chat. It received some task and started executing it. We can click on it, I have already done that. And here we see the window of this sub-agent. That is, it is also thinking, changing some files, and now it will implement the feedback form into our project. At the same time, the main context is not cluttered with this information. That is, after the sub-agent completes its task, it will send some information back about what it did. This information will already be in the main context of our main agent. The sub-agent has completed the task. A checkmark has even appeared here, indicating that it has finished execution. Now we will hide its reasoning for now. In our main chat, there is only what we delegated to the implementer to perform the task. It did it. And the output we have is that our task is implemented, meaning the feedback form has been added. If we look at our page, it has indeed appeared here, Get in touch, name, email. True, I don't see the message field here. This is, of course, an oversight. Or maybe I told it. Yes, indeed, there is no mention in the prompt that a message field should be added. Maybe I didn't say it, or it wasn't accounted for in the translation, but what we asked for, it did. That is, it only did the visual display. And the visual display is there. Everything is fine, it works, it displays, everything is good. Okay, with sub-agents, it's clear. Well, that is, how to create them, in principle, we have figured out. How to use them, we have also figured out. Well, that is, it is a simple and effective application for saving context in a single chat. Several such agents can be created. We will return to this a little later. Now, let's look at other entities. We will probably start with rules as well. We can create a rule either manually by adding another folder called Rules to the .cursor folder, or we can go to settings. Go to Cursor Settings, to the Rules, Skills, and Subagents section. And let's, a little, yes, before we create a rule, let's figure out what types there are. At least there are these three tabs here. For the most part, we are interested in two of them: user and project rules. User rules are rules that will apply to all projects. That is, if you open another folder, user rules will be saved. Cursor guide is the name of the current folder. Here are the rules for this project. That is, they will be stored, precisely, in our .cursor folder within the project and, accordingly, will only apply to this project. By priority, project rules come first, and only then user rules. That is, project rules override user rules. Well, if such an override is present. Okay, let's see what we can do here. There is a rules section. We can click the New button and select the type of rule we want to add. We can add a user rule - these are user rules that apply to all projects, as I already said, or a project rule. Let's choose it. Rule name. For example, let's make it general. Just a rule for now. Let's call it general. Okay. For example, I will write a rule here that is more humorous than useful. I say, always say, "Hello, my lord," when starting a dialogue. Then I click the Save button. And notice, a Rules folder has appeared in the .cursor folder. We could have created it manually in the same way, and it would have worked fine. Let's see how it works. Let's write something like "Explain what this project is" in the chat. And enable the mode, for example, AS, to ask. Let's assume this is a project we don't know yet. Let the neural network explain it to us. I press Enter. And now we will see that it will greet us with the first words. Please, Greeting, my lord. That's how it works. But, naturally, let's return to more practical rules. Of course, you don't have to write this. You can write about file naming, about how to respond, and so on. Let's write the following rule for now. It's a universal rule, so to speak. I ask it to always respond concisely and to the point. Unless I ask for an explanation. This can already be a useful rule, because neural networks tend to write a lot. For interest, we can ask the neural network the same question again. Well, actually, I still want it to greet me. So let's keep both. And now I will ask the same question to the neural network in a new chat and see how it responds this time. Let's just compare these two answers. Exactly the same request. And let's see what the answer will be. And here it responded, not to say that it's much shorter, but in fact, it responded to the point. But shorter, it even started explaining something about design, about colors, about paths. And in our new answer, it, well, made it a bit shorter. So, in principle, it works. In fact, the answer here is to the point. There are no particularly unnecessary answers here. Well, if we need to specify these rules, we can do that. Okay. Also, we could describe, for example, the folder structure here. Let's create a rule project.md. MD, if you don't know, is the same Markdown. You can see that the first two letters match, only with the addition of C. This means that metadata is also supported here. In general, they are supported here as well, but it's better to write the rule in this format. And in this case, we will do the following. We will ask the neural network to fill in this rule based on the structure of our project. Let's do it this way. Write a rule that will contain the main, the main information about the structure of our project. That's it, I say, create a rule that will contain the main structure of our project. I'm giving it this file in context. And then the neural network will write our rules directly into this file. It greeted me, everything is super. And now it will go through our architecture and write it into this file. This is useful, especially when the project is quite large. You can go through the entire project once like this and record it in some rule so that the neural network knows where to look. Now let's talk a bit about how these rules are applied. You can see that there is an Always Supply parameter here, and there is also this dropdown. Yes, this interface differs from what we see in sub-agents, because, yes, this is a rule, there are different parameters here. Always Supply true means that this rule will always be attached to the chat. In general, rules work as follows. When we write some prompt, in a new chat, in addition to what we write here as a message, these rules are attached to this message. Well, rather, how all rules are attached, all rules for which the parameter always apply is true. What else can this parameter be? Here, if you click on this dropdown, you can see, yes, Always apply. These are always sent with all messages. Apply intelligently means that Cursor should figure out when to apply this rule. And for it to figure this out, we need to describe in this field when this rule should be applied. When we fill in this field, we get an additional parameter here, description. This is that field. It's the same thing. For example, now I have written that whenever it is necessary to find a file in the project, this rule should be used. Well, again, it doesn't always work 100%. When the neural network has to figure something out on its own, there's always a chance it won't figure it out. Yes, this should be kept in mind. But, in principle, it's a working thing. Here we write in detail when to apply this rule, and the neural network evaluates this and executes it. Why can this be useful? If we have Always Supply selected here, it means that this rule will always be attached to our requests to the agent. And this, in turn, means that our context will be cluttered every time. Well, that is, the entire rule will be added to the context every time. Sometimes this is necessary, but if this rule is not designed to be needed every time with any request, then, accordingly, it is better to configure this application area somehow, so as not to clutter the context unnecessarily. In the case where we choose Apply intelligently, then not the entire file gets into the agent's context, but only this description. And the neural network looks at this description and decides whether it needs to use this rule or not. Okay. Next, what else do we have? Apply to specific files, for example. Then we can apply this rule to files of a specific extension. For example, only TypeScript files, only Markdown files, only Python files, and so on. For example, if your rules relate to a specific programming language, for example, file naming rules, or code formatting rules, or the maximum number of lines in a file, in short, then this can be applied to specific file formats. Moreover, this does not only apply to file extensions. Well, that is, this .tsx, .md, and so on. You can also specify specific folders, as you can see here, yes, src/config/** - this means any nesting of folders, .json. This means that all .js files in the config folder and in all nested folders will be considered, and accordingly, this rule will apply to them. If the agent touches them, this rule will apply. And Apply manually is when we always have to specify this rule manually when we want to use it. Without this, Cursor will not use it automatically. This is done as follows. Here I have saved this file, and now I can find it via the @ symbol here, well, it is immediately highlighted as project, so I can select it like this and add it to the context. Then this rule will be used in the context of this dialogue with the agent. Phew. Well, something like that. Let's probably finish with the rules for now. In general, I hope you understood how rules work. And here you go.

Here's a small hint, yes, how to use them. For example, if you notice that you are explaining the same thing to the cursor for the tenth time, for example, what to do and what not to do, then perhaps it makes sense to write it down as a rule, and then you won't have to explain it to him so much. Okay, let's move on. In this file, I will enable the "apply intelligently" mode for now. That is, let it be used whenever it is necessary to find some file in the project. For now, this suits me. Okay, closing. Let's now look at what commands are. Commands can be created manually by creating a folder named "commands" inside the "cursor" folder, or by pressing "slash", scrolling to the end. And here there is a button "create command". Let's press it. And, for example, we will create an "explain" command. We automatically created a "commands" folder inside the "cursor" folder and an "explain" file, that is, to explain. And instead of manually writing this command now, let's ask our agent to do it. Create an "Explain" command, by which the agent will explain a piece of code or a request from the prompt. I want our AI agent to explain to us what we send to it further through this command. Commands can accept some parameters. In fact, parameters can be some text that we write after the command, or some files that we also add to the context. So, it created a command for us. We will accept this file, named "explain", description "explain code or concept in depth". In short, it should explain to us what we are asking for. It added tags for this command, and what interests us most is this content. Here the instruction is described, what we want to get from this command. In fact, it is written in plain language. Just in case, I'll explain. I write everything in English because English takes up fewer tokens in the context. For example, Russian characters take up more tokens in the context. Therefore, purely for the sake of economy, writing in English turns out to be cheaper. Moreover, English neural networks understand things a little better. I'm not saying they don't understand other languages well, but English is like their native language. In general, here we have instructions and output. Naturally, all this can be edited as you need. If you need a different format or some additional instructions, please change it. You can write anything you want here in your own words. But now, so as not to drag out the video, let's just go through all these entities. I think it will be clear to you from your own goals what commands you want to create. Commands are needed so as not to write the same thing in prompts to the neural network 100 times. As we discussed in the diagram, commands are the same prompts, just pre-written. That's all. Let's use our "explain" command for testing. We call this command via slash and, for example, send it the "package.json" file. Press Enter. I opened this by accident. Closing. Hmm. Now it should explain to us how "package.json" works. But it greets us, as we asked it to. Everything is great. And it starts explaining. That is, I don't have to write some prompt for it every time. I just call the command, give it input data, and it starts working with it. Well, roughly speaking, it just substitutes this prompt into our message that we write to the neural network. So, it gave us the result in the format we asked for. That is, first there is an overview, then details and key concepts and considerations. In short, it answered as we asked. At the same time, we can always write to it here, responding in Russian, for example. And then, if we send this request again, it should answer us in Russian. Even though the instruction here is written in English. Let's see if it does it or not. Yes, indeed, it started talking to us in English, but when it gave us the result of the performed actions in this command, it answered us in Russian. It says, overview, configuration on nexts. Here is a detailed breakdown and key concepts and important points. That's all. That's how it is. Commands can be used, yes, for some, well, simple repetitive actions. For example, to commit something to git, to explain something, possibly to add documentation. Although for this I would rather use an agent, because with an agent you can write all the instructions in the same way. It will just be launched in a separate context window. For now, I will remove the Russian language. And with commands, let's probably finish here. Well, that is, in principle, I think it's clear how to use them. You just take some of your repetitive prompts, create the corresponding command, write these prompts into the command, and call it via slash. Everything is ready. You are working with commands, you are great. Of all this variety, we are left to analyze skills and hooks. Let's start, perhaps, with skills. To create a skill, there are generally two ways. You can manually create a "skills" folder here and create these skills. You can do it differently. Click on settings, go to "cursor Settings". And here in the "Rules, Skills and Subagents" section, there is a button to create a skill. Here it is, the "Skills" section. And then click "new". What happens? A new chat with an agent opens. And here there is, first of all, a command, by the way, yes, a command built into the cursor, if anything, it is initially written there. And an explanation: help me create a skill for the cursor. For example, I want to create a "project" skill. That is, checking that the project is healthy. Well, literally, yes. Press Enter. What does this mean? It will run certain tests, linters, and check that the project can be built without errors. Okay, it greets us. Thank you. And then, by the way, it asks relevant questions. The same interface may appear if you are in planning mode. That is, if you have a large task, you select planning mode here, and the cursor needs to clarify something, it will open the corresponding window here. Let's answer its questions. It asks what needs to be checked. Well, let's start with something simple. For example, formatting, that is, the code format. I select this item. Then we have the second question, where should the skills be located? That is, here it offers us two options. These are user skills, that is, global skills, and project skills. In this case, I will make it a project skill. Here it explains, in fact, that the first option is available for all projects. It is located in the global user folder. And the second option is for a specific repository. Well, for a specific project. We choose it. What format do we prefer? Here you can choose a detailed Markdown report. That is, it will generate reports in Markdown format every time. You can choose a simple checklist, and I will choose a simple checklist. And the last question: should this skill include specific scripts that will be executed? And here I will answer: yes. I want it to run the linter and automatically check that everything is formatted correctly. The cursor has finished creating the skill for us. Let's see what it did in the "cursor" folder in "Skills". We have a new folder that is called "Project Health Check". That is, skills are not created as a single file, but a whole folder is created for them, inside which the skill itself is written. It wrote a README for us, rather, so that we understand what this skill is. The main file here is precisely "skill.md" in the folder with the name of the skill itself. In addition to this file, it also created a "scripts" folder, in which the script for running the health check is written. If we look at the "skill" file itself, for now I will agree with all its changes. Here it is directly described what it should do. That is, it should run automatic quality checks and display what it got on the screen. Then it is written how to run it. That is, it has written the script that it needs to run here, and then showed in what format it needs to display the result. In addition, what is worth paying attention to is, of course, metadata, that is, the name. It is clear that what is important is the description. Based on this description, it will understand when it needs to use this skill. That is, in theory, it says here: "Analyze code quality through automated checks for linting, type safety, and code consistency." Okay, let's try to do this by simply writing "run health check" to it. And we are not specifying a specific skill here. In theory, it should guess itself that it needs to use it. Let's see if it can do it. We specified it quite straightforwardly. Well, that is, run. Okay. And now, yes, it started studying "Project Health Check", ran the script that we specified here. Well, it is created here, in fact, this script. And then it gave us the result, and in the format that was specified here in the skill. So, here is "Project Health Check" and here is "code quality". Okay. Here's what we got. We only have a failure, that is, "fix npm run". Okay. Well, we can run it, it's not a fact that it will fix all errors immediately. And here, by the way, an interesting point is that the linter started checking this file and found errors there, respectively. We can, firstly, run it, secondly, fix it with the help of the neural network, or simply write "fix it" to it and send it. But in fact, the problem is that, to a large extent, we don't need to check the code quality in the scripts that are in the skills. That is, it's not entirely part of our project, but let's try to send it. That is, there are two solutions: either to fix this script file somehow, or simply to ignore it, because we need to check the code quality in the project, not in our scripts. But it will most likely try to fix it. I, honestly, would just ignore it. It works, and it's good that some format is not specified, well, it's not critically important. Here you can stop and ask it not to fix, but to remove this file "disable linter for cursor folder". That is, we are directly telling it that the linter should not consider the cursor folder. And now it will add to the settings in this file that we need to ignore. Here there is global ignoring. Here are the folders that the linter should not analyze, and it added the cursor folder with all nested files here. Okay, perhaps you don't know what a linter is. Well, that's okay. A linter is a utility that checks code format. And in fact, it's quite useful when working with neural networks, because it gives some adequate limitations to the neural network regarding code format. And the stricter we set these limitations for the neural network, the better. Linters themselves do not clog the context, that is, they simply execute as a check and point out errors. This is very cool, so using a linter in projects, well, in principle, it's a good practice. But when working with a neural network, it becomes even more useful, because thanks to this, we can somehow set the code format boundaries for the neural network. Okay, now it has added the cursor folder to ignore. If we run the same prompt again asking to run the health check, then there should be no problems now. As you remember, it was showing red that it wasn't working. And now, since we have added files to ignore that are in the cursor folder, which it was complaining about, well, by the way, maybe we didn't manage to do it, let's check. The linter is now working correctly, but here we apparently have an error in the script. We can, in principle, mark this to the neural network, tell it to fix it. Say that the linter is working without errors. Fix the script that checks the quality. Like this, we will send it the data from the console. that the linter is working fine and we will send it the file with the check. The problem here is most likely in this condition. It checks that the response contains either "errors" or "no errors", but the response contains neither of them, so it considers that we have errors. But in fact, there are errors when the word "error" is in the response. Therefore, now it will correct this condition. Let's click "keep file". And now, most likely, it will give us a correct picture. 6 out of 6 checks completed. Good, everything is great. That is, our skill is working, and the linter is working, and the script is working. Everything is cool. Okay, let's move on. With skills, well, more or less clear, I hope. Simply considering all possible skills that can be made is quite long. Our video is already super huge, so let's go through it, well, at least overview. I understand that it can be quite difficult to perceive, but you don't have to use everything at once. You just remember at some point that such an entity as skills exists, and you can use it for your tasks. For example, if you need to explicitly describe some process that you need to do regularly, then you can create a corresponding skill for it. And this will simplify your work by not having to write everything manually, do it, and so on, every time. By the way, "agent Skill" is a kind of standard. It even has an official page, which is "agentskills". Which describes, in fact, the format of skills for agents. Therefore, you don't need to think that this is some kind of stupid rule extension. This is already a standard that many AI agents use. And, accordingly, the format of these skills should be the same for different AI agents. What we write for Cursor will also work for Cloud Code, and should work for other agents that follow this standard. Of all these entities, we are left to analyze only hooks. In fact, each of these entities deserves a separate video. And to fit the full story about everything into one video is practically impossible, or it will last about 6 hours. Therefore, in this video, we are looking at everything overview, and if necessary, we may consider each of these entities in depth separately. But let's figure out what hooks are. As I said earlier, hooks are some processes that are launched at a certain moment of the agent's work. These specific moments, let's say, can all be viewed in the Cursor documentation in the "Hooks" section. And here are all the events to which you can attach these hooks: session start, session end, before tool use, after tool use. If tool use finished with an error: subagent start, subagent end, script start, script end. In short, here is the whole list of events, in fact. There is also "compact", by the way, which is the process of, well, compression, obviously, yes, of the context within your window. That is, if you have reached the limit of this context window in a single dialogue with an agent, and here it showed 100%, then Cursor will most likely compress your dialogue, do some summarization, and you will be able to continue working. But, naturally, not all the details that were in your chat will be fixed in this summarization. Let's see how to create hooks. To create a hook, create a file named "hooks.json" in the "cursor" folder. Again, it can be created in the user folder, then it will work in all your projects, or added to the project folder to work in a specific project. Let's do this in the "cursor" folder. Right-click "New Hooks". Everything is cool. "hooks.json" looks, well, approximately as follows. Let's copy it. Paste it here. It turns out the following. Well, the version is clear, we can write it arbitrarily, be it one, two, or three. This is useful if you are, in general, doing some versioning in git. And you can specify these versions. This is especially useful if you work with a team. You can then compare versions of hooks with each other. In short, the version is for you to understand what version of hooks is being used. In this case, we have now copied it. Here we have one hook. This is the JSON format. Well, damn, if you have never seen the JSON format, then an object is described like this. In curly braces, separated by commas, an object is listed in the key-value format. I understand that if you opened Cursor for the first time and have never programmed, it's difficult to perceive, but it's like some parameter and its value. Let's put it that way. Here is the version parameter, in this case, it is one, the hooks parameter is also an object, in which the parameter, well, the key, let's call it a key after all, yes, this is the event itself, that is, in this case, it is "after file edits". Here you can see all these events, they are described here. "After File Edits" is one of them. For example, let's choose "Session start" for now. Just for example, we can specify it like this. "Session start". This means that when the session starts, the following hooks will be activated. They are described here in square brackets. In square brackets means that it is an array, that is, a set of several elements. In this case, it is a set of several hooks. Well, for now, it is here. Here it is, one - this is the description of a specific hook. What does this hook do? Hooks can be of two types. The first is a command, that is, some script that will be executed. And the second type of hooks is prompts. So, the first type is command-based hooks. We just provide a link to some script that will be executed. And the second type of hooks is prompt-based hooks. Let's start with this one for simplicity of understanding. Well, let's insert the hook format with a prompt. It looks like this. That is, a prompt is written. It is clear that it is a prompt type and, in fact, the prompt itself. Timeout is the time that the agent will wait before, well, continuing until this hook is completed. Here in the prompt it says the following: is this command safe to execute, allow only reads, that is, only operations that are for reading, for writing, well, respectively, are not allowed. That is, if the command changes some file, then it is unsafe. Well, according to the logic of this prompt. It should be said here that it, in theory, should be executed when Cursor wants to execute some command, yes, and before we execute it, we ask: "Is the command safe?" Well, that is, this hook is triggered, it asks this question: "Is the command safe?" And after that, if the command is safe, then the agent continues execution. And if it changes some file, it restricts it accordingly. For example, it's fine, right? Let's change, in general, the event itself, when this command will be executed to the proposed one, that is, "before shell execution". And we ask, like, is the command normal or not. For example, let's ask Cursor to delete, I don't know, some file. This is really, well, hardcore, of course. Naturally, this is for example, but the file, for example, "package.json" with a terminal command. Well, I'm specifically writing this so that it executes some command. Ah, by the way, an important point, we added hooks. Here in the settings, you can see in the "hooks" section if it has been added or not, because it may be necessary to restart Cursor for our hooks to, well, start working. But let's try without restarting. Let's just send a request like "delete the file using a terminal command". And now let's see what it does. First of all, it tries to execute the command. And pay attention, it did not execute it. Ah, damn. [laughter] Oh, funny. In short, the funny thing is? Yes, it tried to execute the delete command, then our hook was triggered, which asked: "Is this command safe? We only allow read operations." So, it blocked the execution of this command. Here Cursor itself writes that the command was blocked by the hook, and it decided not to delete it through the terminal, but simply perform the delete action. Now, of course, we will roll it back, return our previous state where this file existed. In normal cases, it probably wouldn't do that. Well, that is, if we hadn't explicitly asked to delete the file. If some command simply changed, in fact, files or deleted or moved, well, in short, did something with files, then with this hook we would block the execution. And then, I don't know, either it would do something similar, or it would still say: "Okay, I won't." Well, at least I managed to demonstrate how, in principle, hooks work. Okay, we've covered all the entities overview. But I understand, of course, that after such an overview, there's a complete mess in my head, how to use it adequately, well, it's not entirely clear. Let's give some, well, a generalization now, so that, well, at least it settles down a little in your head. With prompts, probably, everything is clear. Well, we write a request in the chat to the agent. it executes it. That's it, we are happy, everything is fine. With commands, well, more or less clear too, yes, we move repetitive actions into commands that are, well, quite simple, and we don't need to describe them every time. That is, you can write some instructions there, plus the response format. In short, saved prompts that we use often. If you speak very roughly, yes. Then the cursor agent is also, in principle, clear. It's just a dialogue with an agent. We work with it when we want the neural network to do something for us. That's all. This is the main agent. There's not much additional explanation needed here either. Subagents. A cool feature to isolate context and not clutter up the chat of one agent. If you suddenly realize that you are working in one chat and on your project, well, the entire context is instantly cluttered and you can't even write three prompts normally because the context is filled up to 100%, then here's your solution. We use subagents so that the work is moved to a separate context and we only get the result in our main chat with the agent. Okay, also clear. Rules. Here, I hope, it's also, in principle, clear. we set some limitations, we write what to do, what not to do. Quite short, clear, understandable. You can describe the structure there. Okay. Well, a rule is a rule, yes? We use rules when you understand that the cursor is doing something wrong for the tenth time. And this is a signal that it might be worth making it a rule so that it stops making the same mistakes so often. Or just what you don't need. Well, yes, a good explanation for rules. Skills, if you understand that some process with a neural network repeats several times, it's also a signal, yes, that you can put the description of this process, how to go through it correctly, into skills. Plus to this, yes, remember that you can create scripts in skills. In our example, the neural network created a JavaScript script for us. But it doesn't have to be JavaScript. It can be some SH or bash file, that is, a script that literally executes commands in the terminal. You don't even need to understand all of this. You can just try to imagine what it can do and ask the neural network to write it. Well, let's limit ourselves to this for now. Hooks, if you need to do something at a certain moment in time, you understand exactly, yes, that the agent has finished working, I want to validate it. This is a hook. If you understand that, for example, before the agent starts working, you also need to check something, use a hook. And so on. That is, if you want to check the safety of a command, the quality of the agent's work, and so on. That is, if you want to do something at a certain moment of the agent's work, it's a hook. Listen, well, it seems like I've broken it down more or less, yes. I don't know how understandable the examples I gave were, and how universal they are. Well, like, in general, okay. But how accessible it was, it's up to you to decide. But I hope that this last remark, it still brought some, even if small, clarity. What will we do now? I will briefly talk about MCP, because the video turned out to be very large. And then, uh, I will show some of my, albeit raw, but seemingly working combination of all these subagents, hooks, rules, skills. It still needs to be refined, but it will probably be possible to demonstrate. Well, just as an example of how this combine works. The combination is that I have several subagents created. And when I send some large task to the agent, first a planner subagent is launched, which breaks it all down into subtasks. Then, for each task, an implementer subagent is launched. After it finishes its work, a checker subagent is launched, which checks if everything is correct. If it finds any errors, it launches a fixer, and all this spins until the entire list of tasks is completed. There, the full set of all these possibilities is used. In fact, rules are not used there, yes. Agents are used there, of course, subagents, skills, and hooks. That's it. And rules, well, in principle, everything is clear with rules. It's a fairly simple topic, as it seems to me, and I hope I managed to explain it accessibly. What is MCP? MCP is like a browser extension. Well, like a browser extension. Only MCP is for neural networks. MCP is, in general, a protocol. That is, it stands for Model Context Protocol. From the name, you can guess a little what it is. That is, it's a protocol for context in a neural network. Well, something like that. So. In fact, when they talk about MCP, they often use, in general, let's say, a combination between a neural network and an MCP server, because there is Model Context Protocol. That is, it's a protocol by which this connection between the neural network and the server works. So, it turns out, like there is some server that can

to perform specific actions, to issue, for example, some information, yes, in the MCP neural network, methods are indicated, well, handles, which you can pull to get this information from the MCP server. Here. Well, I hope it's roughly clear. I found some picture for a slightly clearer explanation. MCP servers are, well, some servers, for example, mail servers, some kind of calendar for working with files, a CRM, by the way, can also be. Some databases, Figma, uh, or many, many, many more. In general, there are a bunch of varieties of these MCPs. There is a client, well, in our case, it's EGН. Here it says CLD, chat GPT AI agent. Uh, in our case, it will be, well, a cursor with a neural network, yes, under the hood, which will access some MCP server through the MCP protocol, to, well, interact with it somehow. Okay, let's, well, the most basic MCP, probably, that can be invented is Kotex 7. Kotex 7 MCP. If you watched my full guide to cloud code, then I showed it there. Well, let me show it. This is an MCP that provides documentation for libraries. In principle, as you could understand, this documentation can, in general, be manually put into the documentation, indexing and docs section. But this also needs to be done manually, right? And each time a new library needs to be put in like that. Well, in principle, you can do it this way, actually, it's not a bad option, but you can use the Kotex 7 MCP server and add it to the cursor so that it can get documentation through this server. Here. There is such an option. Let's see how it is installed. First, you need to register in it, because it works via an API key. Well, and in general, you, for example, encountered some MCP server, say, it's a different server. What needs to be done? Yes, you need to find the installation section somewhere. And often there is an instruction for different tools. We, for example, need a cursor. We look at install in cursor. And here, in general, it is written in detail what we need to do. We need to go to cursor settings Settings. MCP Add New Global MCP server. Well, Global, I think, there is no such thing now. Well, let's say MCP. And yes, here we have just add custom MCP server. We can do this. What do we need to do next? We can click on it, right? Let's see. Cursor Remote Server Connection and Cursor Local Server Connection. These are two connection options, right? MCP can be connected locally, it can be connected remotely. What does this mean? As we saw in this picture, yes, MCP is, in general, just a protocol, and there are servers. That is, our AI agent needs to connect to some server through this protocol. This server can be remote, that is, running, well, somewhere there, I don't know, at Google or at Kotex 7, for example, yes, they also have their own server, which you can connect to at this address. And we don't need to run it locally on our computer, but you can also run it, yes, it's often done through the NPX command and the server is launched, essentially. That is, well, you probably don't see it visually, but, roughly speaking, what happens? This server is launched on your computer, and instead of sending requests to the official server, like Contex 7, we will send requests to our own MCP server. I don't know what exactly differs between the local and remote server in Contex 7. You still need to make external requests to get documentation. Well, maybe locally it requests documentation immediately, I don't know. It doesn't seem to be written here. Well, let's use the remote one for now. Actually, here's the point? That is, if you can run it locally, in principle, it's better to run it locally, because every time you access an MCP server, you call some method from it. If it's just a method for retrieval, like in Contex 7, then, in principle, it's not a big deal. But if the MCP server processes your data, then, accordingly, the neural network sends some data from your dialogue there, well, so that the MCP server processes them. And here, in general, you need to understand the situation. Do you want to send your data to a remote MCP server, do you trust it or not. Here, with a local server, in this regard, well, it's simpler, you don't send data. But on the other hand, the MCP server can run some code on your computer. That is, it's good if it's a trusted open source server, yes, and it doesn't pose any obvious threats, but at the same time, you need to keep in mind that the MCP server that you run on your computer has access to your file system. It can do something under the hood. Therefore, it's probably better to use a remote one. In short, let's connect the remote MCP server context 7. We copy these settings. Next, what do we need to do? Open the Settings section in our cursor Settings Tools and MCP, click New MCP server. Here a JSON file opens, and we need to specify this contact 7 in the MCP Servers object. Note that I already have other MCP servers connected here. I've hidden them now so as not to reveal my keys. Therefore, the MCP Servers parameter is already there. By the way, it's duplicated here, and that's probably a bug. Well, okay, let's not pay attention to it for now. We need to add Contex 7 inside the MCP server. We copy the internal content of this Kotex 7 and add a new object here. After it, you need to put a comma, because there are other fields after it. If there are no fields after it, for example, FigMtop, yes, there are no other fields after it. A comma is not placed here. And now we need to specify our API key here. To do this, we need what? First, go to Contex 7. I logged in through my Google account. Here you need to create an API key. Here they are. API keys. They can be used for free. Well, at least up to 1,000 requests. This will be enough for us. I'll write "for video" as a note to myself that I need to delete it. Here we have created the key. I can copy it. We go back and paste the API key here. Okay, great. Well, we've configured the MCP server. Let's look in Cursor Settings. Contex 7 has appeared in the list. Now, in theory, we can access it. Contex 7, yes, this is an MCP that allows you to request documentation for libraries. Let's try to do it. Find, please, using MCP Contex 7, documentation for React JS. Okay. This is a direct instruction, yes, use MCP Contex 7 just to see that it works. And actually, yes, you can do it like this. For example, you are developing an application in a specific programming language, framework, using a specific library, and you can directly specify that you use such and such an MCP to get documentation for the corresponding libraries. Now the cursor wants to launch our MCP. Here it is, it offers. We can add it to the low list mcp tool, meaning it will always launch without asking, or just allow it. Well, in this case, I'll just allow it. In principle, this is an MCP that can be added to the low list, because it just requests documentation. But for now, I'll just allow it to make requests to the MCP. Look, it has already completed the first request. It started searching for libraries available in Contex 7, and after that, it found a specific library for React, after which, of course, it requested documentation for the specific library. And here it got something. Then it says that such and such documentation is available. What does this mean? This means that now the neural network, well, at least in this chat after this request, knows about the existence of documentation for React. And you can either directly instruct it to explore, or it will itself look at references to the documentation and write code for us, guided by this documentation. Well, of course, with neural networks, it's a tricky business. It's better to explicitly tell it what to do, because if you expect it to guess on its own, it won't always guess. Sometimes it will guess, sometimes it won't. If possible, it's better to explicitly state what you want. Do what you expect from it. This is how MCPs work. So, with the help of MCP, we got documentation for React. This is especially important if you are working with some less popular libraries, yes, and the neural network, for example, is poorly trained in a specific programming language or knows little about the specific library you are using. And in such a case, you can use, for example, the MCP Contex 7 to request documentation and say: "Ah, how is this done? There are such and such methods for such and such functions, you can use it this way or that way, or here there are such and such components with such and such parameters, they can be displayed this way or that way, specify such and such parameters." In short, this is an example with Kotex 7 MCP, there are many. They are all connected, well, in approximately the same way, or it is written how they are connected. Sometimes you need to run another command in the terminal in parallel for this server to work. For example, for MCPCN, if anything, this is, well, roughly speaking, a component library. There are many components, not only official ones but also user-created ones that users upload there, which you can take and download into your project. And it also has an MCP. To launch it, let's see, what do we need? First, run this command in the terminal, it's done. Second, configure the configuration. In fact, we have already seen a similar one, right? There is an MCP Servers field, which is an object. And, in short, we need to add this to our MCP servers file. That is, we add it, run this command that was shown before. Here it is. And, in fact, we have access to the MCP server. Everything is great. There are a great many MCPs, and you can also make a separate video about them. In general, this is an extension for your neural network. With the help of MCP, you can enable the neural network to open a browser, although the cursor already does this. But there is, for example, Play Wright MCP, which does it differently. It can open a browser, take screenshots, if in the cursor this is, for example, not particularly relevant. There seems to be a browser now, and it can also take screenshots, but, as we saw, it doesn't always work perfectly with it. But, for example, Playgite MCP might work better. Yes. You can use it, for example. Moreover, you can also use it for, like, for tests, yes, in hooks, you can specify that after a new component has been introduced, you need to open the Play WR MCP or the browser in the cursor and see that it is displayed correctly. The neural network will do all this, look, ah, it is displayed correctly, and say it is correct. If not, then, like, it needs to be fixed. Well, write this instruction in hooks, in short. This is how you can do it, for example, yes. Figma also has an MCP. It can also be connected, but in a similar way, and send a link to a component in Figma to the cursor in the chat. There, you can right-click on the component and, like, click link to component, yes, or to section, send it to the cursor, and it, through this MCP, looks at the styles in Figma, yes, and can draw something for you according to the design. In short, there are many MCPs, very many. It's like an extension and, like, you can google, in short, different MCP servers as needed. So, with MCP, I hope we've figured it out. Uh, I'm explaining so concisely because there's already a lot of material. And if I explain everything in detail, it will be difficult, of course. Here. But, at least, you will know in principle about all these possibilities. If you have any special interest in a particular functionality, then you can, in general, google about all this in more detail. Here. But basically, I hope I've told you about all these possibilities according to our plan. We, in principle, well, we've covered the whole base. Let me now try to upload my prepared agents and everything else into our cursor. And I'll tell you a little about it. In general, I've uploaded all the entities I'm currently working on into the project. We have many agents. Let me go through them, just by purpose. Look, there's an architecture reviewer, which looks at the structure of folders, code files, and gives its assessment, says what's better to fix. There's a debugger, which checks for errors. Well, if something breaks, it debugs the project and tries to fix it. There's a documenter. This is an agent that documents changes. Actually, I haven't mentioned documentation throughout the video. Well, first of all, it's really a separate big topic. And if we're analyzing the cursor, then it's not the primary focus. It's more about the development workflow. Here I wanted to analyze the program itself. There is a separate video about documentation, I've already mentioned it. You can watch it. Maintaining documentation is a sufficiently important part of the development process. If you work with AI agents, you need to document it. That is, in one file, you describe the project idea, in another file, you describe how the main page should look, in a third file, you describe some design principles, and so on. That is, you need quite a lot of such descriptions. And this forms the neural network's understanding of what kind of project you are making, how it should look, how it should work. That is, documentation describes everything as you see it. In essence, it's a lot of files that together form a large technical specification. And you can pass these files to the neural network in the context and say, "Look at the technical specification, let's do it." With this approach, in general, development becomes easier, because you don't need to describe to the neural network what you want to do every time. You have all this already documented. Okay, let's move on. The orchestrator is also an interesting agent. The orchestrator should, well, manage these agents, call one, then when it finishes, call the second, and, in general, rotate the cycle if the task is quite large. Then there is the scheduler agent, which breaks down a large task into small ones. The Refactor agent, which refactors code. From time to time, it's worth doing this, running the neural network through the same code that it wrote itself, and asking it to refactor everything, that is, to bring it to a decent state, so to speak, yes. Extract some common components, common code into separate files, fix something, polish it, and so on. That is, so that everything is structured and beautiful. This is what refactoring is. Well, optimizing code, including, yes, speeding up project performance, and so on. Review is a reviewer who simply reviews code. That is, I run it when I need to check a piece of code, some functionality, and I can run it. That is, after each complex implementation, it makes sense to run a separate reviewer who will go through the code that was just written and say: "The code is written well or the code is not written very well and needs to be fixed." There is also a security auditor, which checks security, there is an agent that runs tests, and a verifier, which, well, verifies whether everything is okay or not. It's quite simple. That is, when a task is marked as done, the verifier is launched and says whether everything is okay, whether everything is, like, done or not done. Okay. Nothing has been added to teams. In hooks, yes, a hooks folder has appeared. Here, in general, there are several files - these are scripts. These are scripts, well, which, essentially, are some bash SH scripts. In short, these are commands that are executed in the console, yes, sequentially. They can also launch some agents or write some message to the neural network's chat. Uh, well, let's look, for example, at some, a simple agent. In short, yes, there is a field that is output, this is followup message. That is, this is a message that will be sent to the chat after this hook is executed. So, for example, it can be the documenter. See, yes? This is essentially launching this documenter, like this, yes? It launches this documenter, well, writes this message and says that it is necessary to document some, well, in general, innovation, okay? Or just record some report in the neural network, and so on. That is, there is a set of SH commands. Oh, I don't know if I should dive into them now. Actually, probably not. Just keep in mind that these commands can be written with the help of a neural network, that is, describe to it what you want. And these commands will be executed when you specify them in filhooks.jon. That is, they are simply located in the hooks folder. Well, this is like grouping into a folder, but they don't do anything here on their own. They are executed when you specify them in the hooks.jon file and say when and which script to run. Here. And in these scripts, you can do anything. You can analyze the project, you can run some commands in the console, test, I don't know, code formatting, check something else. Uh, there are a lot of possibilities there, in short. Here, just, well, almost everything you need, you can probably do there. And you can describe it to the neural network and ask it, in fact, to create such a script for you and then add it to the hooks. In principle, you can also add it to Hooks through the neural network. Say, "Add this to my hooks, please, so that it runs at such and such a time." And the neural network, in principle, understands all this normally. In general, what can be done in the end? You can create such an orchestrator, to which you give some huge technical specification, and it runs sub-agents until it completes this technical specification. This is not a new idea. There are probably quite a lot of variations of such cycles. You can write one for yourself, you can look for some ready-made solutions. I will finish these specific files, check them. I don't know how well they will work now. I'll try to give a task now. Damn, I've been filming this video for about 600 hours, maybe even seven in a row. That's why I'm extremely tired. It's late at night for me. I apologize for being so worn out by the end of the video. By the way, for some reason, the new agents didn't load for me. I had to restart the cursor. In short, first, I use the orchestrator agent. I launch it to give it this entire task completely. And now let's come up with some super tough task. In short, a tough idea. Now everyone will be amazed. Look, now we have test pages in the project. Everything needs to be redone. Create full documentation for agents, hooks, rules, skills, and commands in Cursor IDE. Create corresponding sections on the website, create a separate page for each entity, link everything, write full documentation on how to use everything. At the same time, write in the simplest language possible so that even people who are not involved in development understand how to use it. Provide usage examples, examples of each entity, i.e., examples of agents, commands, hooks, rules, skills. And also compile a rating of the top MCP servers on a separate page. This will be our prompt. Only it needs to be slightly edited, some terms of MCP servers. Yes, in principle, otherwise, it's probably fine, right? Let's see how it handles it. Honestly, this is, well, a death-defying act, so to speak. I don't know what will happen now. Let's see. While it's thinking, I'll say a couple more words at the end. Yes, now we will, well, first of all, see what it gives us. In principle, it should, well, by the way, it looked at the Project Structure rules, well done. It started launching some sub-agents. Interesting. Okay. Uh, besides the fact that we have a lot of new things in the cursor folder, I also have an AI Docs folder here. This is my own folder where I store project documentation. I've already said that it's best to document all functions, screens, technical specifications, and so on. I record this in the AI Docs folder. I have three subfolders here. This is Design. Here it is written, well, about design, in short, important things, some style guides, some requirements, and so on. And there is a Marketing folder, which describes marketing information, target audience, go-to-market strategy, and, in general, some marketing documents. Well, we won't look at it for now. And another large folder, Dev, which has a bunch of other folders. There is a Tasks folder, where task files will be stored. This is useful if, for example, we want to create a huge project from scratch, yes, we won't do all this in one chat, even with a bunch of these orchestrators. No, we will record a bunch of tasks from scratch to full project implementation, write some Roadmap, and follow this Roadmap. All this happens in the Tasks folder. For more details on this, well, I don't even know where you can look, but I have a series of videos where I code a service for generating style guides with you. A similar approach is used there. This is a more advanced folder, but nevertheless, everything is analogous. In the Screens folder, ASCII visualizations of some screens are created. Let me show an example now. Here's an example from another project. This is, in fact, my website, which I showed you before. Here, in this format, an ASCII visualization is made, the content of the page, that is, the navbar, then, well, initially there was just a language switcher, then it became a navbar, then there's some gradient, my avatar, my description, cards. Well, in general, if you look at the main page of my website, the structure is absolutely the same. Let's see what else we have. There is a Reports folder. There I store reports from neural networks after completed tasks. There is an Issues folder - this is when I found a problem and need to record it. I'm not ready to fix it now, but it needs to be fixed. In short, I record it in the Issues folder. In the Features folder, some functionality of different features is described. In Components, respectively, UI components. In API, respectively, the API is described. That is, endpoints, requests for getting and editing data, that kind of thing. And here, in general, I store all the documentation in approximately this format. Actually, there are different tools for this that help optimize it in terms of working with documentation, like various spec kits and similar things. Well, you can search for this information, in principle, it's also an option, yes. But I just do it manually out of habit, create the folders I need, or rather, just copy them from pre-prepared ones once, and that's it. And then I work with them. Well, it's convenient for me now. Perhaps after some time, I will switch to some ready-made solution like GitHub Spec Kit or something similar, but this does not negate the functionality, in general, of my own folders, which can be customized. They work quite well. Then you can refer to these documentation files in the rules. This is also an important point, yes, the fact that we just created folders with docs doesn't mean anything has happened. But if we refer to specific documentation, for example, in the rules for the cursor, and say that if you are editing some design, then you must look at the design description of our project, then this will, to some extent, help it. Sometimes you will also need to explicitly specify this directly in the prompt or in some other way. But, at least, it will direct it in this direction a little, and it will look there. Okay. This is probably all the theory for today. While the orchestrator is actively thinking, we can, in fact, look at what it's doing. So far, it seems that, well, I have the orchestrator itself doing all this now. This is probably not very correct. That is, in principle, it should launch additional sub-agents. For now, this is not happening, but I said that these files are still raw for me and they need to be finalized. When I finish this whole chain, I'll upload it all to the site and probably make a separate video for it. But again, this does not negate the fact that, in principle, you can set all this up yourself, as you need it. I've explained all these sections and functions as best I could. So now we'll wait for the orchestrator to do something for us. We'll see what it achieved and whether it achieved anything at all, considering that it started doing all this, it seems, in its context window, that is, without dividing into several sub-agents. I don't know how well it will succeed, but note that the main chat context is only filled by 2.5%. So, well, it's convenient, yes, that sub-agents work like this. The only thing is that several sub-agents should be called here. This is, of course, my oversight for now, yes, but it's all quite feasible. Well, the agent has finished executing the task. Yes, it did not do it the way I expected at all. That is, it did everything in one orchestrator. So, here is the orchestrator's action history. It did not call any additional sub-agents. In short, I need to refine all this. Well, let's see what it achieved. It made such a page. Full guide to the cursor. Start learning. You see, all agents. It added my agents here. That's a trick, of course. Then it made hooks. Here are example hooks. All hooks. Well, listen, it's quite good, considering that it was all done literally with one prompt. Literally, before that, there was just some test placeholder, and you see what it achieved. It formatted everything well, added some system rules, descriptions of how to create them. Cursor rules. Well, essentially, this is what I told you. In short, examples of rules. What else is there? Some project structures. Well, these are already specific rules with their descriptions, how to create rules. Damn, but this is interesting. Define code standards. A unified style for all developers. Set new standards for improving code during refactoring. To obtain documentation Convention. Rules for documentation for AI, as well as for people. Cool. It made skills. MCP servers. Let's see what we have. Voila, by the way, it made a selection of MCP servers. Damn. Well, it's normal, by the way. Here the file system works. Ah, well, only it's not clickable. In principle, it should be clickable by categories. Damn, it's forgivable. It has already done a lot. Well, let's see, yes, what MCP servers are there. There are file systems, databases, yes, for work, for GitHub, for Slack Discord, yes. You can make it send messages, by the way. Yes, you can make it send you a message in Discord or Slack that it has completed some task. So, we also create a hook, connect an MCP server, and add, well, like, to this hook an MCP server so that it calls it. Cool. Testing. Here's playght, which I talked about. For DevOps, there are Docker MCs, for Kubernetes, for Amazon, for Notion documentation, yes, you can use it for monitoring, there is for search, Brai Search, yes, a good MCP, Google. Well, in short, damn, cool, a normal topic. And here's the description, look, it made a description for each MCP. Damn, well, I didn't expect this, of course, but it turned out very well. For commands, it, accordingly, made, well, it took my commands here, probably, yes. These are agent commands that call agents and regular commands. Everything is described normally here. Rules. Ah, well, we've already looked at them. Hooks, we also seemed to have looked at them. Skills GitHub. Well, here's a link to the cursor GitHub. Well, and agents. Damn, hilarious. It made a separate file for each agent. Well done. Even considering that only one sub-agent did all this, it coped with it quite well. Damn, but it turned out to demonstrate what the cursor can do at all, because I gave some stupid examples at the beginning. Well, here, please, one prompt and a full website with documentation. It took about 5-10 minutes, probably. Well, the design is simple, of course, but quite pleasant. Well, that is, it's suitable, it's a normal design, it's perceived, everything is okay. Okay, let's finish. Uh, I'm really tired, [laughter] so to speak, after 7 hours of filming the video. I'm glad that I finally managed to do it. I hope it was useful for you and you learned something new. Of course, there's a lot more you can talk about each of these entities, about all these settings, but, damn, it won't fit into one video at all, in principle. Well, I think I've given the basics. I hope you'll manage further. Regarding the files for orchestration, I'll sort them out, finish them, and upload them. Look for the link either in the video description, I'll add it there. Or subscribe to the Telegram channel, I'll definitely publish it there too. Yes, we have a Telegram channel "Godny Vibe-coding". In it, I publish useful materials on vibe-coding. In particular, I'll upload files like these and so on. I post videos there. We have a vibe-coder chat. In it, you can chat with other vibe-coders, ask questions, get answers. Sometimes they write some project proposals. Well, it happened, yes. In general, join our vibe-coder community. We'll be glad to see everyone. Give a like if you liked this video and want YouTube to recommend more useful content to you. Subscribe to the YouTube channel so you don't miss new videos. Subscribe to Telegram. In general, I'll say goodbye to you here. All good code and see you soon.