AI Assistant Skills
Give AI coding assistants context about this package
AI Assistant Skills
When you work with an AI coding assistant (Claude Code, JetBrains Junie) in a project that uses
oi-laravel-insee, the assistant benefits from knowing how the package is meant to be used — that the
SIRENE client is resolved through the Insee facade / Client / app('insee'), the available lookup
methods, the q search syntax, and the dirigeant injection behavior.
The package ships a canonical skill file that communicates this context.
Installing the skill
The recommended way is the unified oi:skills command, provided by the oi-lab/oi-laravel-development
package. It discovers the skills shipped by every installed oi-lab/* package and lets you pick which to
install, in the current project or your Claude Code user profile:
php artisan oi:skillsTo install only this package's skill non-interactively:
php artisan oi:skills oilab-laravel-insee --project # or --globalThis copies the skill to .claude/skills/oilab-laravel-insee/SKILL.md (Claude Code) and
.junie/skills/oilab-laravel-insee/SKILL.md (JetBrains Junie), and adds (or refreshes) an
=== oi-lab/oi-laravel-insee rules === section in your project's CLAUDE.md.
A package-local command
php artisan oi-insee:install-ai-skillis still available for projects that don't useoi-lab/oi-laravel-development, but it is deprecated in favor ofoi:skills.
Keeping it up to date automatically
To refresh the skill whenever the package is updated, add the command to your application's composer.json:
"scripts": {
"post-autoload-dump": [
"@php artisan oi:skills oilab-laravel-insee --project --quiet"
]
}Requires
oi-lab/oi-laravel-development.
What the skill tells the assistant
The skill file instructs the assistant to:
- Resolve the client through the
Inseefacade, dependency injection onClient, orapp('insee')— never instantiateClientmanually. - Use
findSiret,findSiren,searchCompanies,searchEstablishments, andgetApiStatus, and read responses as arrays (checkingheader.statut). - Build searches with INSEE's
field:valueqsyntax (AND/OR/*). - Expect the injected
dirigeantkey for natural persons, and its absence for legal entities. - Read configuration via
config('oi-laravel-insee.*'), notenv().
Customizing the skill
The source of truth is resources/stubs/ai-skill.md. Maintainers re-sync the committed skill copies with:
composer sync-ai-skillsThis also runs automatically on post-autoload-dump inside the package repository.