Advanced Claude Code: Agents, Custom Commands and Workflow Automation

Introduction

I'm very quickly going to walk you through the journey from Clarified Autocomplete with the early versions of GitHub Copilot to what we have today, which is already pretty amazing.

Let's start.

From Autocomplete to Assistants: Early Copilot Era

So in 2021, we had GitHub Copilot, and that was the first glimpse of how AI could actually assist exist coding workflows in various ways, but it was relatively limited compared to what we have today.

It really was glorified autocomplete. You could get multiline suggestions, you could have some stuff generated, you could maybe generate some tests or some comments on top of your functions.

And the context awareness that it had was the couple of lines of code before and after where your cursor was, so it wasn't that great.

But it was basically basically the start of a movement and it changed expectations of what AI could do in terms of coding.

It was also controversial because a lot of people even back then were not very pleased that apparently GitHub was training AI models on their open source code and this is going on to this day of course.

There's a large fraction of people who are not happy It was that we have AI at all and the way it's doing, but I assume that most of you are not these people, so let's simply pretend they don't exist.

The Chatbot Breakthrough: GPT-3.5 and Code Interpreter

We then, in 2022, had the start of the JetGPT era in, I think, November it was, when JetGPT 3 .5 was released, and that came as a shock for many people because it was actually really really good.

It was the first time you had a chatbot that should keep the context at least for a small while and you had a feeling to really were able to have something on the other side that you could interact with in some meaningful way.

What we did back then was we were copy pasting code from our IDEs back to the chat window back and forth and And we thought that was quite the trick, but compared to what we have today, it was still pretty lame.

There was a little, something that was a little bit better was when OpenAI launched Code Interpreter a couple of months after JTPT was released. least you could at least then have it create a couple of files, ask it to give you a download of a zip file in the end and then keep working but it was still pretty basic.

But then we

IDE Integration Matures

suddenly had relatively good IDE integration. In Visual Studio Code itself we had the code pilot as a sidebar and we then had a bit more capable IDs like windsurf or cursor

and the form factor there was that you would you have your code the the editor and the main window and then at the sidebar you would have a the chat assistant and you could talk back and forth it had some context awareness it

would know what files are open it could read the contents of some of your property inspectors there were still a lot of things in the beginning you had had to do right like in early versions of GitHub Copilot.

Yeah, maybe open the two tabs next to the one you're working at and if you're lucky then it makes it into the context and that stuff.

But it kept getting better and I remember that the switch from Visual Studio Code to Cursor was pretty mind blowing for me.

I was for quite a while then pretty obsessed with Cursor. And that changed all completely

The CLI Revolution: Enter Claude Code

when Cloud Code was released because suddenly you had, at least my experience was that this is what I always wanted. I spent most of my time in the CLI anyway and suddenly you had a real companion there that could do everything that you could do, that could run all the

bash commands you would run, that could figure out what's going on in your code and being agentic in a way that it would go on its own way to figure out how it could complete a certain task that you ask it to do or it would make suggestions and this is where we are today.

It's still, it is, I'm really amazed every day.

I'm using Cloud Code almost exclusively exclusively now and pretty much no other coding AI tools anymore.

I use Cursor because it has the nice tab autocomplete but I haven't opened the Cursor agent for months because Cloud Code is just too good.

How I Use Claude Code Day to Day

And what I'm going to do today is I'm going to show you a couple of things that I've, the way I use Cloud Code and more and also basically just some Cloud Code tips and tricks that in case you're using it yourself you can make use of.

Just out of curiosity, how many of you are using cloud code? Okay, so there are actually quite a few people, so I'm happy that's not going to be too boring, hopefully.

So, yeah,

Looking Back and Ahead

as a recap, we moved from the glorified autocomplete to agent within the space of four years, and the pace of innovation, as you probably know, it's increasing. So I fully expect that the

The craft of software development as it exists today will be very, very different in a couple of years.

There's still a lot of holdouts and people who say, then I'm not going to use AI. But I'm almost certain that they will have no chance but to change their mind at some point because they will simply be out -competed.

We already have models at a level where, well, my work has certainly been three or four Xs since I'm using that and maybe I was a little slow before but certainly I'm not now.

Okay,

Claude Code Essentials and Daily Features

so let's talk about Cloud Code a little bit more. So Cloud Code has a couple of features I'm only highlighting a few that I find myself using almost every day.

There's much more than that so this is really just the tip of the iceberg and I'm aware we only have a few minutes to walk through all this.

Slash Commands: Reusable Prompted Workflows

So there are slash commands. Slash commands in cloud code are basically just md files that you can put in your cloud folder which is something

like the dot here so it has a couple of folders and you can have agents, you can have commands, this one actually doesn't have commands that's the project level but I have some more cloud So it looks like this.

So you can create commands and these commands really just describe how they are being called and then you define what Cloud should do if this command is used. So it's basically like a prompt template.

You can get creative with telling it about different arguments. You can make it mimic command line arguments and stuff like that.

Example: Generating High-Quality Git Commit Messages

And that's something that I'm using all the time because all the time, for example, I want to have a nice commit message. So I have a command that I'm using, which is called git command staged. And this command is something where I showed Claude to, hey, whenever I call this, there's a couple of flags that are not, like, like maybe also include unstaged files or check if they're unstaged files that are thematically

related to what I've been working on, so maybe I forgot it. Then I give a pretty comprehensive description of how I want my commit message to be called, like with a small word at the beginning that characterizes what kind of commit it is. Then the message and then some some more comprehensive message to start and what happens when I run this for example,

if I'm in a project where I have some files which are staged, let me just check if I actually have something that can be committed. These are all real life projects, I'm not making anything up but I'm just looking to find that's data input, is that the right one? Now let's go to, sorry about that, let's see the website.

So there's a couple of things that I recently worked on and I haven't staged it. I'm just simply going to add them all because I know they were all part of the same work I've been doing. What I was doing here was adding some some visualisation for some data.

So what I can do now is I can here say, git commit staged. So basically all the commands you define you have them here and you get them as autocomplete. If I start with git you can see their user level commands, their project check level commands, I'm now going to say git commit staged and what Cloud is now doing

it's basically going through the, it's running a couple of bash commands which you don't even have to prompt it to because it knows exactly what to do when you ask it to look for staged files. So it has now created a relatively nice commit message for me which all of it looks good. It also tells me what kind of files were in there.

That's part of the prompt. Basically, I told it, commit the message, then present it for approval with a list of all the staged and unstaged files and so on. It calls me Captain because I have it impersonate Commander data from Star Trek Next Generation, in case you wonder.

What I can do now is I can just say yes and then it will go ahead and push it. You can see see at the moment these files are all staged and waiting to be committed and then very soon if this one is done, so it's just doing its thing now. Okay, sometimes it's trying to do something that it can't but in a second it's going to have it done and now it's basically created the commit.

Yeah, these all the files are gone. Now here we can see that here's the commit and now I could push it from here.

Quick Bash Mode for One-off Commands

One other nice thing you can do with Cloud code you can go into bash mode so you can just enter the bang and then you can just say git push from here and that is basically just executing a bash command in that folder.

So that's just one little helper that I literally use like two dozen times a day and I'm very happy that I have something.

Custom Agents: Extending Your Workspace

Another helper is something that I'm going to show.

So what I've also done and what's very easy to do is sometimes I don't want to switch context and I want to send a co -worker a message that basically says,

hey, let's meet in Discord or something in a couple of minutes, and I don't want to switch the app. I don't want to go to Slack and search for the channel,

Example: Slack Messenger Agent

so I have an agent, which is defined in the agents folder. We're going to go there. And this agent is called Slack Messenger, and the Slack Messenger agent is simply triggered by when I say tell,

I'm going to tell myself because otherwise I'm going to message somebody else. Tell Markus I'm giving a talk right now.

What this does is now it will figure out that oh the user wants me, it says oh I'm going to launch the Slack messenger to send this. It will now check a config file where it can find some web hooks and it will know that

that Markus is connected to a certain Slack channel and now it's going to send the message and very soon I should get a Slack notification that this message has been sent. And that's of course a relatively, oh yeah, I don't get a Slack message because I'm going

to have a Slack also. That's basically the message that was just sent to me giving a talk right now. now.

Notify on Long-running Tasks

What you can also do and that might be a bit more useful than this is very often you have a long running agent task so you can set up a hook that basically sends a message to a Slack channel that you are now done, that Claude has done with the task.

When I started with Claude Cote I was quite obsessed with it and whenever I even went to the kitchen and made myself a coffee I thought oh I can't go away for five minutes and I'm wasting time

because i'm not sending cloud on a mission to do something in those five minutes where i'm gone it's it's better now but in the beginning i felt super stressed out because i really thought if i don't have a cloud agent running all the time working on something i'm basically wasting my my

valuable uh tokens that are already paid anthropic for okay so that's just two little uh examples for how you can extend cloud and make your life easier.

We just saw an example of a custom agent.

Other Handy Agent Ideas

Another good example for agents are things like, hey, update all the packages of the versions of that package in my monorepo or give me a list of all the GitHub issues and let's talk about what to work on next.

I quickly want to show the agent creation

Creating Agents: Models, Tools, and Context Windows

creation interface that basically looks like this. You just say agent, agents, and then Cloud shows you all the agents that it already has.

There are project level agents and user level agents.

Or you can say, you know, I want to create a new agent, and then it wants to know at which level, personal or project.

Let's create a project, and then you can either manually if you already know what you want, or you have an MD file, because an agent is really also just an MD file, but it has some specific features that the commands don't have.

The most interesting one is that you can say this agent should use a certain model. For example, this agent should always use run Haiku because I don't need the full power of Sonnet.

It's just a little, I don't know, it's just something that reads the tail of a log file, so I don't really care if it's Sonnet, but I want it to be super low latency, so I'm using Haiku because that's the fastest one. So that's something you can do here.

So you basically when you say generate with cloth then it walks you through a little process.

So I say I want an agent to create talk slides. And then it will ask a couple of more questions about how you want this agent to function.

Maybe I do something else real quick because because I wanted to show that before.

Managing Context Wisely

So one of the important things about cloud is of

course the context window. With the slash context command you can see how cloud is currently using its context.

You can see that there's already, even if you haven't done anything at all, there's already almost half of the tokens used because there's the system prompt from cloud, then there's a couple of tools, then there's my MCP tools, then custom agents

and memory files, these are basically the CloudMD files in your project. I'm not going to have time to talk about that today, but there's a lot of things to do right or wrong

when it comes to creating project -level descriptions for Cloud. So these CloudMD files are really quite important.

Okay, but let's just go back here. So I'm in the agent creation tool.

Now what you can do when you go for advanced options, You can have here a list of tools where you exactly tell Claude which tools it should have access to for that particular agent. Because if it's not an agent that's going to write any file, then you don't need to give it any access to editing tools. It only needs read -only tools.

If you already know that it's really just supposed to be a wrapper around an MCP server, you can just get the MCP tools and so on. on.

In our case now we just say hey let's just use them all and so I just pressed the wrong button, I have to do that again. So basically you can set all the tools it's supposed to use or have access to then you can define which model it should use and one reason why

sometimes it's advantageous to have an agent over a slash command is that agents will use use their own context window, so the agent itself will use up a few tokens in the context window, but all the messages that the agent creates are happening in a different context window than the cloud context window.

So if you have a couple of agents doing stuff, you are not wasting the context of your actual conversation with cloud for that moment. moment.

So now here you can see you can define what model the agent should use and here we can just say haiku, you can say the color and that's it. And now Cloud suggests the

description of an agent like use this agent when the user requests the creation of presentation slides and so on. Let's just say hey we want to save this and now basically we have a new agent.

So that's Cloud Agent. I mean, yeah, we could really fill an evening to talk about any of those features, but I have to run through this real quick.

Streamlining Permissions and Sandboxing

So another thing that's important with Cloud is the way you can grant it permissions. You can basically lose a lot of time by being asked all the time, oh, am I allowed to use this bash command?

Am I allowed to use this folder so what you want to do for this is twofold. The one thing that's relatively new

there's a command called slash sandbox and with this slash sandbox you can ask, you can tell cloud that it's actually able to run bash in a sandbox environment and then this will massively reduce the number of times you get asked whether or not it's allowed allowed to do a certain thing.

You can blacklist and whitelist URLs and bash tools. But this is something that is extremely useful.

What happens once you've set it up is that inside of your cloud settings file, which is like this is my user cloud, so this is your cloud folder.

And in here, you can see that somewhere down there I have the sandbox enabled. And then there are certain things that you can exclude from being sent boxed.

And then the other thing you can do is up here in the permissions, you can basically, so whenever Claude asks you, hey, am I allowed to read this file or folder, then it would usually, when you allow it and say always allow on this project, then it creates an entry in the settings .local file.

And in the settings .local file you then then we'll see that you have a lot to do a certain web request or read a certain folder. But what you can do is you can go down here to your settings file and already allow all

the things that you already know you're always happy with Claude just doing it can always pet or cat or whatsoever and then if you do this, these will be inherited by your project file so you don't need to do that again for every new project you set up because you've already done that on the root level.

So that's something that's quite useful because it's getting old really quick. There's nothing worse than walking away from your desk and

thinking cloud is going to work for 10 minutes on something and you come back and all you see is a prompt, hey, am I allowed to read this file and it didn't even start because it was still waiting for your initial permission to even get started. So that's the permissions.

Must-have MCP Servers for Developers

Let's not even go to skills because I'm running out of time, but I want to mention two MCP servers that you probably want to use when you are doing development work. One is Context7 and the other is the Chrome DevTools. Both are extremely useful.

Context7: Up-to-date Docs in Your Workflow

Context7 is a service by Upstash that has pretty much every relevant development tool as an icon zoomable, let's just go here real quick, as an icon so you can see you have all those libraries and whatnot and when you look at it you can see that it's, oh shit I didn't want to click this, sorry. sorry, I wanted to open it here, so you can see this is basically an LLM digestible, usually a markdown version of that library's documentation and it's very, very well maintained and up

to date and what's usually good is that, so for example, I created for things I'm working working with a lot. I have skills, the solar expert for example, the solar expert knows that it's supposed to use the, it's allowed to use this MCP server from context 7 to retrieve the solar docs and then figure out how a certain command is supposed to run, how a certain interface looks like and this really drastically reduces the amount of hallucinations you get get when it just suggests to use that certain property on an object which doesn't even exist. So I cannot recommend it highly enough.

It does, it's not kind to your context window I have to say when it's loading that stuff a lot. But if you want, on the other hand the tradeoff is that it really reduces the amount of times where it's generating some some code that it then realizes is not really working code with that library because that also fills up your context window, it has to retry stuff and it's actually even messier.

Chrome DevTools MCP: Browser Automation and Debugging

The other one is the other MCP server that I want to really quickly mention is the Chrome DevTools.

This is only really relevant for you mostly when you do a lot of, when you write a lot of code that runs in the browser because the chrome dev tools mcp server can

well you know what i can just show it so uh i have this tool here um wait i have a github repo this is basically the one the one for my slide yeah and now i can i can ask it to open the chrome Chrome, to open Chrome and retrieve this and basically look at, well it can look at the

network panel, it can basically look at your API responses and it can read the console output, it can find what's going on, open Chrome with this and tell me how many slides slides there are, okay.

And so this should now, if all works well, open a, so that's the Sandbox Chrome that it's doing. It's now figuring out by itself so it can interact with it.

It's like Playwright. It can click links. It can look at stuff. And while it's doing that, it's not actually clicking anything.

But I could ask it to, okay, it shows me that there are 13 slides, okay.

Click through the slides, click through the slides, close slowly, slowly, like once, one per second, or per two seconds, that's not slowly, but it's fine. And you should be able to do that as well, because it should be able to figure out where the next button is and then do that.

And you can imagine that when you do it very often, And so it's doing that now. It's clicking through the slides once every two seconds.

So that's a very useful thing, because you can also automate tests like that. I mean, you could always do that with Playwright and

stuff, but now you have it more integrated in your actual tool. So that is really, really useful.

And so these two MCP servers, even if you don't use anything else, use this one, because this one is really, really great.

Claude Code for the Web: Working On the Go

Do we have any more time? A few more minutes, basically pizza hasn't arrived yet, so.

Okay so if pizza hasn't arrived then let me just show one final thing which is there's now cloud code for the web and in cloud code for the web I did something that is quite nice because you can work with it on the go.

So what I just did before we started here, I created a GitHub repo with this talk, basically basically that contains the HTML file that contains the slide.

And then I asked Claude to create a couple of issues that we could maybe work on to improve the slides, to improve my slides.

Let me just quickly show you how that's working. And that's a different form factor than working in the IDE and I just quickly want to show that as well. I think it's quite useful.

Issue-driven PRs from Anywhere

So let me click here. And now let's look at the, where are my repositories? So yeah, so there's a couple of issues that I created. And maybe let's do this one.

Let's And it will just do that, work on this issue and create a PR. Well, actually, you don't need to tell it to create a PR. That's exactly what it would do anyhow.

But what it will now do is, yeah, see, it's creating a new thing. And what it's doing here, it's actually spinning up a virtual machine.

It's going to check out the repo, and it's going to do all the work. And it can do that, and you can give it five different tasks, and then the next time.

So I've actually done that the other day when I was on the train. I did this one here I asked a customer want to send me a picture with hey put that image on a contact section and I just did that while I while I was on the go and when I came back the contact page was already done and I Just had to had a look and I found it good and then I sent it to the to the customer So that's something something that's really nice as well.

So this one is now going to Going to do the do the stuff. It's going to add a comparison slide At some point, it's going to create a PR, and then we will check it out. We will merge it in and see if it did well. And then this will hopefully conclude my talk.

Q&A

While it's doing that, I could already take questions. So are there any questions?

I have some.

So is there a reason that you stage all the commits and then get it to do the committing from there? there, because what I do is I just get it to go and look at what happened, and I get it to do all the commits for me that I'm staging.

I have a command for that as well. I actually have a command that says, hey, look at all the stuff and create thematically grouped sets of changes and commit those.

The thing is since I let it do more and more of the coding, this is my last line of defense. Actually going through all the changes and then staging hunks from here and there, this is my way way of making sure that I'm still in control in a way.

So that's basically the one thing I still like to do. I always like to stage all those hangs from those files and make the commits tell a story.

And what I do now is I do all the staging myself and this is the one real interaction I have with the code. Otherwise I trust it with a lot of stuff already.

And then this is the one where I look at everything and I also sometimes, ah, no, look, I don't like how it did it. So this is my last line of defense. So it's a design choice to do it this way.

But I know what you're saying and I also have like, I have some specific commands for git commit core, you know, to do like package updates and documentation updates and all that.

But yeah, this git commit stage is really, I, that's the way I prefer to do it basically. It's definitely not the only way to do it but that's the way I do it.

On Staging vs. Auto-committing

Do you ever use dangerously skipped permissions instead of worrying about the old permissions?

I have never done it. I have not, I don't know. No.

So there's a flag that you can basically put Claude into YOLO mode and say, hey, whatever, just go, have fun, go to town.

I've never done it. I don't know.

I'm not, I'm probably a little bit too timid for that kind of thing. But, I mean, respect that you do that. Yeah, wouldn't be for me.

Any other questions?

On Excel, Files, and Claude Skills

It could be an iteration between Excel and Cloud. Sorry. It could be an iteration between Excel and Cloud.

So, well, we can make an agent for, for example, extrapolate some data and make Cloud and then in Excel with field. And if you suggest, you can make that.

So you mean, have an agent that lets Clot generate data? An Excel file. An Excel file. Oh yeah, you can do that.

What Anthropic introduced was something they called skills. You can do that directly in Clot now. Clot can create Excel files and PowerPoints and PDFs.

With Clot code you can do that too, too, but for that you would probably want to go straight to Claude and use the skills from Claude. Claude.

Yeah, so Claude has these things built in if you go to, like, oh shit, sorry, yeah, so this is basically Claude for the desktop, so that's just the normal anthropic Claude, And this has all these things in here now where you can now create, where is it? Where are the skills? Bloody hell.

Okay, I have all my projects. Well, there's something here they call skills now and with that you can do that. Honestly, I'm not spending most of my time here anymore, but there is a way to create Excel directly from here.

You can also give it access to your hard drive. You can tell it, hey go to this folder and reorganize all those files in there. Let me just go back to this one

Live PR Demo and Wrap-up

here because this one should be done. Okay, so this one has created a PR. So if we go back to our talk here, we should find that there is a new PR for, oh wait, there is a in UPR for this one.

So it's added a new slide 6 comparing cloud code with co -pilot, cursor, windsurf and so on. I'm now going to be like Rob and just YOLO it and say hey yeah whatever just merge it in. So let's just do that.

I would then go back here to my GitHub and I I have to pull this now, so let's pull it, oh no, I want to pull, okay, so now it tells me that I have to stash some changes before, yeah, whatever, so and now I can pull it, and now I should have that new slide, so let's see if that worked.

What did it say? It said it was slide 6 now, so if we go all the way back to the first page, there should be a new one that compares cloud code to the others. Oh yeah, that's the one.

See, that's the one it created and it's not too bad. It just did that. That's not so bad and you can see I was just standing here and then prompting cloud for the web.

You can just do things these days. That was good. Well, that's it.

Conclusion

As I said, this is not even the tip of the iceberg it's the tip of the tip there's so much more you can do for now glad you you came to listen to that and get in touch if you want and have a nice day

Finished reading?