LongCut logo

Mastering AI with VS Code's New Agent Customizations

By James Montemagno

Summary

Topics Covered

  • Slash commands auto-generate agents and instructions
  • The /init command keeps agents aligned with your evolving code

Full Transcript

VS Code is your home for agent development.

It is packed full of different capabilities to help you boost your AI development, such as, you know, custom agents skills, instructions, prompts, hooks, plugins, and so much more.

And the brand new chat customizations brings them all together into a central location.

And there's streamlined ways to create them all with AI as well.

So what I wanna do today is dive into this brand new feature and capability that really streamlines the entire process and really helps you in every single day development.

So let's get into it.

All right, here I am inside of VS. Code.

I'm in one of my Azure functions, which actually runs the GitHub change log.

Uh, so this actually does automation and calls out to Microsoft Foundry.

Whole bunch of goodies.

Now previously, if you were looking to set up your chat customizations, you'd have to go through this dot GitHub folder.

Inside of here.

We'd have things like agents, instructions, prompts, skills, and of course your other GitHub things like workflows, for example.

Now, on top of actual customizations, inside of the actual project, you might have sort of user setting, different agents or instructions or prompts as well, and you have to go figure out where those are at and bring them all together.

Well now you can just go into this gear over here, which is gonna be in the chat, and you'll see open customizations.

And when you do that, you're gonna see the brand new chat customization.

I'm gonna make it pretty big here just so we can zoom in and see it.

And what we're gonna see on the left hand side are agents skills instructions prompts.

Hooks, MCP servers and plugins.

Now, I'm not gonna walk through all of them inside of here, and if you want to break down of these different things, I'll actually link over to Kayla Cinnamon's video on this.

It was absolutely epic.

So definitely check that out.

But I also wanna point out here that you are able to see local.

Copilot, CLI and clot as well.

So these are able to bring these all in, and that's the Claude code agent inside of the chat agent here as well.

So you can see that here.

So if you're wondering, when you come down here under local, you'll see copilot, CLI, and then you'll see clot as well.

So that means that you're able to see all of those customizations and you're able to see which ones are available just for the copilot CLI and what are available there.

So that's really, really nice.

I'm gonna focus on Locus here, but what we can see is that first we have agents and I wanna break down here and show you that they're not just ones that are inside of your folder.

And this is what's so important about this chat.

Customization.

It is showing me here the custom agents that I have, the debug mode.

If I tap on that, I can see the deep debug mode to come in here to actually solve problems when I'm in that.

Specific agent, task researcher.

And then we're gonna see some that are from extensions and that are built in.

So here of course, we see that I have the T .NET, uh, upgrade, assistant modernization tool thingy here.

That gives me ways to easily migrate my projects.

And then I have built in ones such as Ask Explore, which is a subagent and plan.

I can come over to the top right and I can see, I can generate an agent.

Uh, which is using an AI prompt, or here I can say new agent here as well.

So if I say a new agent, it's gonna bring me over into the chat over here and I can see slash create.

And it's gonna say, what job should this agent do?

And how, and I say, this agent should only focus on Azure functions in C sharp.

I'm gonna send that off.

Now what this is doing is this is sending off a prompt, and in fact, if you go back to the chat customizations and you go to prompts, we can see that if I go down to Built In, we have a bunch of prompts that are from the team, such as Create Agent, create Hook, create instructions, create Prompt, create Skill, and My Favorite in it, and of course, plan as well.

So there's all these ones that are built in.

Now if we look at that create agent, we can see exactly what the VS code team had in mind here.

So what it's gonna do is it's gonna create a custom agent for a specific job, and it's gonna ask you specifically what job to do.

It's gonna go find a bunch of things specifically here, clarify needs, and create a custom agent for me.

So let's see.

So it says, should this agent appear, uh, only in the agent picker or a subagent only, I wanna say show and picker only.

Do you want the terminal execution enabled?

Yes.

I'll say refuse outta scope here and then this is gonna go and create my agent file for me automatically.

So this is really, really cool.

So if you're looking to have a customization, especially if one, one that already knows and understands your code, you can go ahead and create that.

So this has gone ahead and created a brand new one for me.

So if I go back to check customizations back to agent, I have my C Azure function specialist here, which gives me a bunch of information here, which is really, really nice.

I could go ahead and refine that and add more information.

Now let's go dive into skills here.

'cause these again, are coming not only from the workspace.

So these are ones that are in the project, and I can see that I can go over and I can copy the path to this, or I can delete this right from here.

I can see that here.

I have some that are coming from plugins that I'm using, such as the copilot, SDK, some from the dot .NET, uh, plugin system here.

Some from extensions.

So if you've been wondering, oh, what skills do I have available or what are 17 skills?

Well extensions can contribute skills or instructions or prompts, and we see a bunch that are plugged in here as well, such as, uh, troubleshoot for example.

Same with instructions here we have two different instructions.

One for the main agent instruction and one that is specific guidance, uh, based on just like C. So I have a C function guidance here that I've given, given this as well, that is scoped to specific context.

And then again, I can tap on one of those.

I can see everything that goes into there.

And of course I can go in and I can create a new instruction, a new instruction for the user space, or even a new agents.md file as well.

So if you're using multiple agents as well and don't wanna co-pilot instruction, you can do that.

And of course, if you hit this button here, this is gonna auto generate it as well for you, which is super nice.

Same with prompts.

Prompts are all built in.

I have a bunch here.

I have a bunch of, uh, different work items in Azure, DevOps, and I have a bunch of prompts here to help me specify those so I can go in, see all this information that you would expect as well, and then create one as well, which is really nice.

I do wanna point out one here, which is in it, which is built in from the team.

This is really, really nice and something that you can use over and over again as your project evolves.

And what this will do is it'll continuously either create.

Or update workspace instructions for AI coding agents over here as well.

So this will create this here, either in your copilot instruction or agents md. So if I come back over here into my chat and I just say slash in it,

md. So if I come back over here into my chat and I just say slash in it, I'll say, update my instructions based on recent changes to the project.

Now what's great here is that this is gonna go off, it's gonna go take a look on that system prompt.

So if we take a look here again.

At that slash in it, we can see that we have, uh, discoverability of any conventions.

It's gonna explore the code base, break down different functionality, generate or merge, iterate.

It's gonna ask for feedback, clarify those different instructions as well.

And now it's going through and seeing if there's anything that needs to be updated inside of here.

So this is a really, really cool understanding.

What's in the project.

So as your project evolves or maybe you add more projects, uh, that maybe are for tests or for something else, you wanna update these different instructions.

And the team has really been focusing and narrowing on making nice, tight instructions specifically, uh, for those co-pilot instructions or agents that md So I'm gonna go ahead and let this cook here and let's see the update that it has.

Okay perfect.

Here we go.

So here we can see that it updated a little bit here, expanded manual validation guidance.

Let's take a look at the changes here.

Pretty minimal, but it added a little bit of code specifically that you know, if there's automated tests, gave it additional clarification, different posting modes, which is very, very nice.

And anything that might have been a little outdated there.

We can also see if we keep scrolling that it gave us some important notes, maybe to continue further on.

See, it says here that there's a new function, like should we ignore that?

Should we do something else on it?

And then it also gives us these, uh, suggestions for the next customizations, like create instructions for the notifier flow or validate flow, or change log formatting, for example.

So this is really, really nice that it's automatically giving me hints on maybe what I want to do next.

All right, let's pop back over here into hooks.

Now, I actually don't have any hooks here.

And hooks allow you to go in and actually create different lifecycle events.

So if I say create hooks here, I could for example, say, uh, let's create a hook win.

Uh, uh, this finishes a turn to prompt me to commit the code, right?

And if I go ahead and look at my different hooks in my project.

So if I go over here.

I can see that.

I can say configure hooks and I have a bunch of different hooks for both local and the copilot CLI and ones that are unique as well.

So whenever the session starts, a user prompt has been submitted.

Uh, preto use post tool use, sub-agent stops, and I can even see compaction events as well.

So those are pretty advanced.

I haven't really do dove deep.

Into the, uh, hooks yet, but we can see that it's gonna go ahead and create this hooks file for me.

And you could also just ask it, what hooks should you create, for example.

So here it's gonna remind me, you know, to do a commit on stop, for example, and, and go ahead and rev that for me, which is really, really nice.

And it can run different scripts, so that's pretty cool.

All right, let's side back in while that's finishing up and I want to show off MCP servers and plugins 'cause there's some unique functionality here.

First we can see that I have my GitHub and my Microsoft Docs MCP server and some coming from the extensions for the copilot mod for dot .NET.

I can, uh, go ahead and right click on this.

For example, it's coming in on the user space, and I can disable this for the workspace if I want to.

That's really nice.

If you had a global MCP server, you can disable it for a specific workspace if you desire right from there.

And you can also start, you can show the configuration, configure model access, and a lot more.

You can of course add one, which will bring this up.

And did you know that you can drag this around?

If it's up here, you can move it to the middle, for example.

Whereas where I like it and it'll snap, that's pretty cool.

And you can go and add it.

You can also browse the marketplace, which will show you all of the different MCP servers coming from the GitHub registry.

So things like playwright, uh, unity Fire Crawl Notion, the Azure MCP server super base, and a lot more.

So if you wanna just go through, dive through, you can one click.

Get more information, install or install in the workspace, which is super cool.

Now finally, I'll show off plugins 'cause there's some additional functionality here too.

Plugins are sort of like a collection of different agents skills, instructions, prompts, hooks, and all these things together that you can get.

So for example, if I go over here and I said, uh, T .NET slash skills.

That's a repo that has a bunch of different plugins available.

One's for do .NET data diagnostics, MS. Build Newgate, upgrade, MAUI ai, and a lot more too.

And this is ever-growing, and you can see that I have some installed here.

I can also enable or disable these for the workspace.

For example, like for example here, I might go in and say, you know what?

I can disable this for the workspace because I'm not using the copilot SDK on this project.

So I can manage that right from here.

I can also browse the marketplace.

So I can add things like work IQ and different Azure ones and awesome copilot and a bunch of ones that are coming here from different sort of plugin marketplaces.

And you can add your own marketplace.

So if you wanted to add like, I think there's like the Versal marketplace or the the skills different marketplace out there, you can add them as well and pull them in, which is super cool and it really brings these all together.

And again, you can dive through for the co-pilot, CLI or Claude.

This is really gonna be your home for all things with the chat and AI together, and I really absolutely love it.

Not only is it just, here's what it is, but you can dive in deeper and understand exactly everything that's going on.

Make modifications here.

And of course you can even make it full screen, pop it out, do ever what you want, which is so, so nice when working with this.

And that is a complete overview of chat customizations.

I love it.

Dive through it and definitely give the team feedback.

All right.

There you go.

That's the brand new chat customizations available today inside of VS. Code.

All you gotta do is hit that gear and you are off to the races.

I love this thing and not only does it give you that unified view, but at the same time you are now.

Easily able to browse the different CPS or plugins, for example, and even easily create them and prompt create them as well.

I really love this and I'm starting to see these different sort of slash commands come up and be prompted after I create one thing inside of the chat, and every single time I do this, it really helps me streamline my process.

So if you're looking to get started, hit that gear button, but even before that, just.

Do slash in it on your project.

It's gonna take care of everything for you to set up those custom instructions and walk you through some other chat customizations.

Alright, that's gonna do it for this video.

If you liked it, thumbs up, jam that subscribe button.

Until then, happy coding and thanks for watching.

I.

Loading...

Loading video analysis...