laravel-scout
БесплатноБез исполняемых скриптовНе проверенImplement full-text search with Laravel Scout. Use when adding search to Eloquent models with Meilisearch, Algolia, or database driver.
от Fusengine★ 36 звёзд на GitHubОб этом скилле
Laravel Scout
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Analyze existing model and search patterns
- fuse-ai-pilot:research-expert - Verify Scout docs via Context7
- mcp__context7__query-docs - Check search and indexing patterns
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
| 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 |
Decision Guide: Search Driver
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)
Quick Setup
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);
Critical Rules
- Use
toSearchableArray()to control indexed data - Queue indexing with
SCOUT_QUEUE=truefor performance - Use
searchable()for bulk import after setup - Pause indexing during seeders with
Scout::withoutSyncing()
Reference Guide
| Need | Reference |
|---|---|
| Searchable trait, indexing, conditions | searchable.md |
| Driver setup, Meilisearch, Algolia | drivers.md |
Best Practices
DO
- Use Meilisearch for production (fast, typo-tolerant)
- Queue indexing operations (
SCOUT_QUEUE=true) - Limit indexed fields with
toSearchableArray()
DON'T
- Index sensitive data (passwords, tokens)
- Forget to import existing records after setup
- Use collection driver in production
Laravel 13 Notes
Native pgvector vector search
For semantic search (embeddings) on PostgreSQL, Laravel 13 exposes Schema::ensureVectorExtensionExists() and whereVectorSimilarTo(), covered by the dedicated laravel-vector-search skill. Scout remains relevant for full-text (Meilisearch/Algolia); for vector similarity, use pgvector directly without a Scout driver.
// Hybrid: Scout for full-text, pgvector for similarity
$keyword = Post::search($query)->get();
$semantic = Post::whereVectorSimilarTo('embedding', $embedding, minSimilarity: 0.4)->limit(10)->get();
Scout 11 (current 11.9, L13 compatible)
where()accepts comparison operators:User::search('*')->where('age', '>', 30)->get()- Custom engines:
$builder->wheresbecomes a list of['field', 'operator', 'value'] - Algolia uses
filters(instead ofnumericFilters);scout:delete-all-indexes(Meilisearch) only deletes indexes with theSCOUT_PREFIXprefix
Установить laravel-scout в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл laravel-scout?
Implement full-text search with Laravel Scout. Use when adding search to Eloquent models with Meilisearch, Algolia, or database driver.
Как установить скилл laravel-scout?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл laravel-scout запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub