Introducing Laravel Simplifier0:09
All right, so now that we know how to build our own code analyzer skill, as it turns out, Claude Code actually open sourced their version, and then Taylor Twell converted it to Laravel. So have a look. Here is the open source version from Claude, and if I go back here is where Taylor, uh, converted it. So let's have a look. We can add it through the Claude marketplace, and then we can install Laravel simplifier. But first, before we do this, I just want you
Reviewing Agent Markdown0:31
and then we can install Laravel simplifier. But first, before we do this, I just want you to take a look at what the markdown file is. So here's the repository, here's the Laravel simplifier, and yeah, all I want you to notice is that within agents, we have a single markdown file. That's all these things are. It's, it's kind of wild, but it's just a markdown file. So we have our YAML front matter that we've learned about, and yeah, it's just, just, it's,
Installing via Marketplace0:52
So we have our YAML front matter that we've learned about, and yeah, it's just, just, it's, it's just a prompt at the end of the day. So it's saying, your a Laravel expert, look over these things, simplify it, focus on elegance and clarity, exactly what you'd expect. Alright, so if you wanna use this, here's how we can install it. So from the terminal, let's boot up Claude. And we're gonna go to the plugin command.
So from the terminal, let's boot up Claude. And we're gonna go to the plugin command. And if I expand this, we're gonna switch over to the marketplaces tab app. And I, I can literally hit tab to switch over to that. We're gonna add a new marketplace, and I can reference the repository name. So in this case, on GitHub, it's Laravel, of course, and the name of the repo is cloud code. So that will add the marketplace. And here are the plugins.
Running on Real Project1:31
and the name of the repo is cloud code. So that will add the marketplace. And here are the plugins. So let's take a look at that. Simplifies and refines layer L code for clarity, consistency, and maintainability. Let's install and we're all set to go. That's it. Okay, so now, uh, here's what I wanna show you. If I open a new tab and run, get status, I'm currently working on this video pipeline feature.
and run, get status, I'm currently working on this video pipeline feature. It is, uh, quite a massive dashboard, and I'm very much letting AI drive. Uh, but I've noticed as it's doing its thing over time, the code quality just kind of deteriorates. You end up with some, some weird stuff. So why don't we see if we can run this code analyzer to improve the clarity. So here's how I'm gonna run the agent's command to see all
to improve the clarity. So here's how I'm gonna run the agent's command to see all of the agents that we have installed, and we should have one for, Hmm, I don't see it. You know what? Maybe I need to refresh it. Let's boot it up again since I just installed it. Let's run agent. And yeah, there it is. So here is the plugin agent, and that is our code analyzer. Okay, so I can just copy this and I can ask AI to use it. Use the Laravel simplifier agent to review all changed files
Okay, so I can just copy this and I can ask AI to use it. Use the Laravel simplifier agent to review all changed files and git, uh, and then clean things up while confirming that the test still continue to pass. All right, let's give that around and it'll take maybe a moment or so. All right. And very quickly, if I switch to full screen, sure enough, it is reaching for that agent. All right, so we're gonna have this get started.
Assessing Cleanup Results2:58
sure enough, it is reaching for that agent. All right, so we're gonna have this get started. All right, that's done. Uh, I'm not gonna lie, I'm a little bit excited here. Uh, and a quick note that took a good five minutes or so because it, it, it's quite extensive, this section that I'm working on. Uh, so let's see. Review and cleaned up all the changed files. So it added a reusable trait
and cleaned up all the changed files. So it added a reusable trait that eliminates repetitive error handling across all five pipeline jobs. Cool. It extracted common logic. It improved clarity, it added proper return types. Yeah, so you get the idea. It's not gonna be a magic bullet though. That's the important thing to understand. And all of the tests continue to pass,
Reviewing Pipeline Controller3:32
That's the important thing to understand. And all of the tests continue to pass, although always confirm that by the way. Sometimes it'll say the test pass and then you run the test and they do not pass. Uh, so, um, nonetheless though, this is pretty cool. And maybe we can take a look at one of the files. Maybe let's have a look at pipeline controller together. Don't worry about the code specifically other than whether it's clear or not.
Don't worry about the code specifically other than whether it's clear or not. Uh, and a quick note pipeline. Uh, this, this corresponds to our video pipeline at lyca. It's internal stuff. It's how we prepare a course. If you think about it, for every course we have on the site, we have to, um, generate a bunch of stuff, thumbnails. Um, we have to upload each episode to S3. We have to enhance it. We have to extract the audio, we have
We have to enhance it. We have to extract the audio, we have to generate transcripts, uh, from the transcripts. We then further generate, uh, summaries and markdown articles and things like that. Anyway, so here's where we can view the dashboard, which is what this focused on. Uh, so yeah, you can see it grabs all of our pending series. It determines, um, if we have any filters. It could also just use win there, um, sets up the various
It determines, um, if we have any filters. It could also just use win there, um, sets up the various stats, and then it loads, um, the corresponding page. I mean, this is fine. I might do a couple things differently, but that's okay. I will tell you this is quite a bit more clean than what we started with. But yeah, really that's mostly it. So now you know, if you want, you can pull in a Laravel specific code analyzer
So now you know, if you want, you can pull in a Laravel specific code analyzer through the marketplace.
