DEV Community

Cover image for Teaching Claude Code to Think Like a Laravel Developer: Introducing agent-skills
Nasrul Hazim Bin Mohamad
Nasrul Hazim Bin Mohamad

Posted on

Teaching Claude Code to Think Like a Laravel Developer: Introducing agent-skills

I've been building with Claude Code for a while now, and one thing kept bothering me: every new project started from zero context. Claude doesn't know I use Pest over PHPUnit, that I'm opinionated about Action classes, or that my baseline stack is Livewire 4 + Flux UI. I had to re-explain the same things across sessions, every time.

The fix wasn't to write longer prompts. It was to build skills.

What Are Claude Code Skills?

Claude Code supports a SKILL.md convention — a structured Markdown file that tells Claude how to behave in a specific domain before it starts generating code. Think of it like a system prompt scoped to a task, packaged as a reusable module.

A skill lives at either:

  • ~/.claude/skills/ — globally available across all your projects
  • .claude/skills/ — scoped to a specific project

When Claude Code encounters a relevant request, it reads the matching skill and follows its instructions. The skill can include frontmatter metadata, trigger phrases, step-by-step workflows, and even reference files like templates and pattern libraries.

Why I Built agent-skills

I maintain 20+ open-source Laravel packages and have been training Laravel developers since 2015. After years of writing the same architecture — contracts, traits, action classes, service providers — I realized I wasn't just repeating code. I was repeating decisions.

agent-skills is my way of encoding those decisions into Claude Code. Instead of prompting Claude from scratch, I give it the same mental model I use when I sit down to build something.

What's Inside

The repo currently covers four areas:

Development & Quality

  • pest-testing — Generates Pest tests with Livewire support, architecture testing, and factory patterns. It knows I want arch()->preset()->laravel() checks, not just feature tests.
  • code-quality — Automates the PHPStan + Pint + Rector workflow. Run it before a PR, not after.
  • php-best-practices — PHP 8.2+ modernization and code review, flagging things like missing readonly properties, untyped parameters, and constructor promotion opportunities.
  • design-patterns — Laravel-specific pattern guidance with a decision matrix. Should this be a Job, an Action, or a Pipeline? The skill helps Claude answer that in context.
  • livewire-flux — Component patterns for Livewire 4 with Flux UI. No more explaining my component structure from scratch.

Project Lifecycle

  • project-docs — Full SDLC documentation toolchain, from product spec to post-mortem.
  • project-requirements — SRS, user stories, proposals, and wireframes. Useful when a client brief arrives and you need structured output fast.
  • roadmap-generator — Phase-based roadmaps in Markdown and styled HTML. I use this when pitching to clients or planning sprints.
  • api-lifecycle — API design through governance. Covers versioning, deprecation policies, and OpenAPI documentation patterns.

Deployment & Ops

  • ci-cd-pipeline — GitHub Actions + Docker workflow automation. Includes Laravel-specific steps like php artisan optimize and migration safety checks.
  • package-dev — Laravel package scaffolding, testing, and release automation. This one's personal — it encodes the same structure I use across all my Cleanique Coders packages.

Business & Design

  • sales-planner — Pricing, quotation generation, marketing copy, and financial planning. Especially handy for solopreneurs who need to go from client brief to proposal quickly.
  • svg-logo-system — SVG logo design with multi-platform export. Useful when you're the dev and the designer.

Meta

  • self-update — Auto-updates CLAUDE.md with corrections, preferences, and gotchas learned during a session. This one compounds over time.

The Skill Structure

Every skill follows a consistent format:

skills/[skill-name]/
├── SKILL.md              # Skill definition with YAML frontmatter + instructions
└── references/           # Templates, patterns, examples
    ├── template-a.md
    └── patterns-b.md
Enter fullscreen mode Exit fullscreen mode

The SKILL.md frontmatter looks like this:

---
name: pest-testing
metadata:
  compatible_agents: [claude-code]
  tags: [testing, pest, laravel, livewire]
description: ">"
  Generates Pest PHP tests for Laravel applications.
  Trigger phrases: "write tests", "generate test", "tulis test"...
---
Enter fullscreen mode Exit fullscreen mode

Notice the description includes trigger phrases in both English and Bahasa Malaysia. That's intentional — I code-switch constantly, and I want my skills to respond to either.

Installing in 30 Seconds

# Install all skills globally
curl -fsSL https://raw.githubusercontent.com/nasrulhazim/agent-skills/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

This drops everything into ~/.claude/skills/, making all skills available across every project on your machine. If you only need one:

cp -r skills/pest-testing /path/to/your-project/.claude/skills/
Enter fullscreen mode Exit fullscreen mode

The Kickoff.my Baseline

Many skills assume the Kickoff.my bootstrap stack as a starting point:

  • Livewire 4 + Flux UI
  • Pest with arch testing
  • PHPStan / Larastan
  • Rector + Laravel Pint
  • GitHub Actions CI
  • Spatie Permission, Activity Log, Media Library

Rather than re-scaffolding what Kickoff already provides, skills build on top of it. If you're not using Kickoff, the skills still work — you'll just want to adjust a few assumptions in the reference files.

Seeing It in Action

Here are three skills I ran this morning — no extra prompting, just invoking the slash command and letting the skill do its job.

project-docs: Documentation Health Report

Documentation Health Report

This is the project-docs skill running a health check on the agent-skills repo itself. It scored 18/100 — which sounds brutal, but that's exactly the point. It audited the folder structure, badge compliance, SDLC coverage, and surfaced specific HIGH priority gaps: missing docs/ directory, no product spec, no API docs, no support workflow. And then it handed me a prioritized action list.

No vague "your docs could be better." Just a score, a breakdown, and five concrete next steps. That's a skill doing real work.

/svg-logo-system: Brand Brief Intake

Claude Code terminal showing /svg-logo-system slash command being invoked

I ran /svg-logo-system inside the Kickoff project. The skill immediately launched into brand brief intake — asking about name, audience, personality keywords, color direction, and style preference. I answered casually in a paragraph (mixing English and Bahasa Malaysia, as usual), and it extracted everything it needed.

Brand Brief Extraction → 25 SVG Concepts

Claude Code showing brand brief extraction with emerald color palette and dark mode direction

From my casual paragraph, the skill structured a complete brand brief: Kickoff, Laravel developers, minimal + developer-focused personality, Emerald #059669 primary, #0B1120 dark background, clean sans-serif inspired by Figtree. Then it went straight to generating 25 SVG logo concepts in parallel.

That's the workflow: one slash command, one casual brief, 25 concepts ready to review. No back-and-forth, no re-explaining the stack.

The Output: 25 Concepts in an Interactive Gallery

Kickoff — 25 logo concepts displayed in a dark-mode interactive grid

This is what the skill generated — a fully interactive HTML gallery with 25 distinct concepts, all respecting the emerald + dark navy palette. Rocket Wordmark, Bracket Code, Terminal Prompt, Abstract K Paths, Terminal Window showing actual composer commands — every concept is on-brand and developer-native. You can toggle between dark and light mode right in the preview.

Same gallery with #21 Speed Lines selected, status bar showing refinement prompt

Click a concept and the skill tells you exactly what to say next: "Selected: #21 — Speed Lines. Tell Claude 'go with #21' to proceed to refinement." The entire workflow — brief intake, concept generation, selection, refinement — is guided by the skill with zero ambiguity about the next step.


The Bigger Picture

Skills are how I'm thinking about AI-assisted development going forward. Not give Claude a long prompt, but give Claude a reusable module of expertise.

The same way we don't write raw SQL when we have Eloquent, we shouldn't re-explain our conventions every time we open a new session.

This also feeds directly into my 2026 training program on Claude Code for solopreneurs. The goal is to show that AI isn't just a code autocomplete — it's a system you can configure to reflect your own architectural judgment.

If you're a Laravel developer who's tired of re-explaining your stack, give agent-skills a try. And if you have skills of your own worth sharing, PRs are open.

Repository: github.com/nasrulhazim/agent-skills

Top comments (0)