whatisgithub

What is laravel-ai-skills?

foodlz/laravel-ai-skills — explained in plain English

Analysis updated 2026-06-24

19PHPAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Laravel PHP package that lets you give AI agents reusable behavior guides, like a refund policy or tone guide, that the agent can look up on demand instead of bloating every request with instructions.

Mindmap

mindmap
  root((repo))
    What it does
      Adds Skills to Laravel AI
      Guides agent behavior
      Separate from Tools
    Delivery Modes
      OnDemand tool call
      Full system prompt
      Lite meta-tools
    Features
      Artisan scaffolding
      Database-driven skills
      Prefix cache ordering
      Skill fake for tests
    Requirements
      PHP 8.3+
      Laravel 12+
      laravel/ai 0.6+
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a reusable refund policy or customer support tone guide as a Skill so your AI agent only loads it when the conversation makes it relevant.

USE CASE 2

Use OnDemand mode to expose guidance as a zero-argument tool the model calls itself, keeping your system prompt short for most requests.

USE CASE 3

Switch to Lite mode when you have many skills so the model first fetches a list of available guides before picking the one it needs.

USE CASE 4

Store behavior guides in your database via Eloquent so non-technical team members can update AI instructions without a code deploy.

What is it built with?

PHPLaravel

How does it compare?

foodlz/laravel-ai-skillsiamjohnwhite/bricks-floating-panelsvscommonbot/vs-ir-eval
Stars192121
LanguagePHPPHPPHP
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdesignerpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires PHP 8.3+, Laravel 12+, and laravel/ai 0.6 or later, package is experimental RFC infrastructure.

So what is it?

Laravel AI Skills is a PHP package that adds a "Skills" concept to the Laravel AI SDK. The Laravel AI SDK already has the idea of "tools": PHP classes that do something, like looking up a database record or calling an external API. This package argues there is a second type of thing an AI agent often needs: guidance on how to behave in a situation, not an action to take. The package calls these Skills and gives them a proper abstraction: their own base class, their own artisan scaffolding command, their own attribute for registration, and their own delivery modes. A Skill is a PHP class with a guide() method that returns text. That text might be a tone guide for customer support replies, a refund policy, or an escalation procedure. When the AI agent needs to respond to something relevant, it can call the skill to retrieve that guidance, rather than having the guidance baked into every request whether it is needed or not. There are three delivery modes. OnDemand (the default) exposes each skill as a zero-argument tool that the model calls when it decides the guidance is relevant. Full injects the skill content directly into the system prompt on every request, suitable for rules that always apply. Lite is for agents with many skills: it exposes two meta-tools (one that lists available skills, one that fetches a specific skill by name) to keep the tool list short, at the cost of requiring two round-trips before the model has the content it needs. The package includes a helper for structuring the system prompt in the order that benefits AI provider prefix caching: static instructions first, then Full-mode skill content, then any per-request dynamic content like the current user plan. Skills can also be database-driven (returning an Eloquent query result), injected with runtime context, and cached. A Skill::fake() helper makes unit testing straightforward. The package is described as experimental RFC infrastructure: the author is using it in production to gather real-world feedback before proposing the Skills concept as a first-class feature to the laravel/ai maintainers. It requires PHP 8.3+, Laravel 12+, and laravel/ai version 0.6 or later.

Copy-paste prompts

Prompt 1
I'm building a Laravel AI chatbot for customer support. Show me how to create a Skill for my refund policy using laravel-ai-skills so the agent only pulls it in when needed.
Prompt 2
How do I use laravel-ai-skills Lite mode to handle 20+ skills without overloading the model's tool list? Walk me through the two meta-tools and how many round-trips they add.
Prompt 3
I want my AI agent's tone guide to always be injected into the system prompt. How do I set a Skill to Full delivery mode in laravel-ai-skills?
Prompt 4
Show me how to write a unit test for a laravel-ai-skills Skill using the Skill::fake() helper.
Prompt 5
How does laravel-ai-skills order the system prompt to maximize AI provider prefix caching? Give me an example with static instructions, Full skills, and dynamic per-request content.

Frequently asked questions

What is laravel-ai-skills?

A Laravel PHP package that lets you give AI agents reusable behavior guides, like a refund policy or tone guide, that the agent can look up on demand instead of bloating every request with instructions.

What language is laravel-ai-skills written in?

Mainly PHP. The stack also includes PHP, Laravel.

How hard is laravel-ai-skills to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is laravel-ai-skills for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.