Skills & AI

Every OI Laravel package ships an AI-assistant skill and injects rules into your CLAUDE.md, so your coding assistant knows how to use it

Skills & AI

Every OI Laravel package is built to be used with an AI coding assistant. To make that reliable, each package teaches the assistant how it works — and keeps that knowledge in sync automatically. There are two moving parts: a skill and a set of rules.

What every package ships

  • An AI skill — a single canonical document (resources/stubs/ai-skill.md, ~150–250 lines) describing the package's core concepts, public API with real code snippets, artisan commands, configuration keys and a host-integration checklist. It's the assistant's reference manual for the package.
  • CLAUDE.md rules — a short block (resources/stubs/claude-rules.md, ~13 lines) injected into your application's CLAUDE.md as a === oi-lab/<slug> rules === section. One paragraph on what the package is for, plus an IMPORTANT: Activate <skill-slug> when … line listing the concrete triggers that should wake the skill.
  • Synced copies — the skill is mirrored into .claude/skills/<skill-slug>/ and .junie/skills/<skill-slug>/ so both Claude Code and Junie can discover it.

Skill directories follow the naming rule: the package slug with oi-laravel- replaced by oilab-laravel- — for example oi-laravel-inseeoilab-laravel-insee.

How it stays in sync

Each package wires a small sync script (scripts/sync-ai-skills.php) into Composer's post-autoload-dump hook. So on every composer install / composer update, the committed skill copies are refreshed from the canonical stub — the assistant's context can never silently drift from the code.

json
"scripts": {
    "sync-ai-skills": ["@php scripts/sync-ai-skills.php"],
    "post-autoload-dump": ["@php scripts/sync-ai-skills.php"]
}

Packages also declare their skill in composer.json under extra.oi-lab.skills, which lets host-side tooling discover and install it:

json
"extra": {
    "oi-lab": {
        "skills": [{
            "name": "oilab-laravel-insee",
            "description": "…",
            "path": "resources/stubs/ai-skill.md",
            "rules": "resources/stubs/claude-rules.md",
            "section": "oi-lab/oi-laravel-insee rules"
        }]
    }
}

Installing skills into your app

Use the oi:skills command (provided by oi-laravel-development) to install a package's skill and its CLAUDE.md rules into your project:

bash
php artisan oi:skills oilab-laravel-insee --project

Once installed, the skill activates automatically when you work in that package's domain — the assistant reads the API reference before writing code, instead of guessing.

Rich skills

Simple packages ship a single-file skill. More complex ones (for example oi-laravel-documentation) ship a rich variant under resources/skills/<skill-slug>/ with a SKILL.md plus assets/ and references/ — the same idea, with room for templates and deeper reference material.

Beyond skills: the MCP server

Skills teach an assistant about a package it's already working with. The MCP server goes further: it lets your assistant search and read this entire documentation site from any project, over the Model Context Protocol — no local checkout required.

Project under MIT License.
Design by