plugins/laravel-expert/skills/laravel-scout/SKILL.md
Implement full-text search with Laravel Scout. Use when adding search to Eloquent models with Meilisearch, Algolia, or database driver.
npx skillsauth add fusengine/agents laravel-scoutInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
| Component | Purpose | |-----------|---------| | Searchable Trait | Makes Eloquent models searchable | | Search Drivers | Meilisearch, Algolia, database, collection | | Indexing | Automatic sync on model changes | | Search Builder | Fluent search API with filters |
Which driver?
├── Production (recommended) → Meilisearch (fast, self-hosted, free)
├── Managed service → Algolia (hosted, pay per search)
├── Small dataset → database (no extra infra)
└── Testing → collection (in-memory, no engine)
composer require laravel/scout
composer require meilisearch/meilisearch-php http-interop/http-factory-guzzle
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://127.0.0.1:7700
MEILISEARCH_KEY=masterKey
$results = Article::search('laravel tutorial')->paginate(15);
toSearchableArray() to control indexed dataSCOUT_QUEUE=true for performancesearchable() for bulk import after setupScout::withoutSyncing()| Need | Reference | |------|-----------| | Searchable trait, indexing, conditions | searchable.md | | Driver setup, Meilisearch, Algolia | drivers.md |
SCOUT_QUEUE=true)toSearchableArray()Pour la recherche sémantique (embeddings) sur PostgreSQL, Laravel 13 expose Schema::ensureVectorExtensionExists() et whereVectorSimilarTo() via la skill dédiée [[laravel-vector-search]]. Scout reste pertinent pour le full-text (Meilisearch/Algolia) ; pour la similarité vectorielle, utiliser pgvector directement sans driver Scout.
// Hybride : Scout pour full-text, pgvector pour similarité
$keyword = Post::search($query)->get();
$semantic = Post::whereVectorSimilarTo('embedding', $embedding, limit: 10)->get();
testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.