Skill: relunctance/laravel-package-search (version 2.0.3)

--- name: laravel-package-search description: Real-time Laravel package search via Packagist API with local cache. Supports 22 scenes, quality scoring, and cross-references to laravel-docs-reader for official documentation. --- # Laravel Package Search - Skill Specification ## Overview **Skill Name**: Laravel Package Search **Type**: Development Assistant Skill **Target**: Laravel developers seeking efficient plugin selection **Engine**: OpenClaw Agent --- ## 1. Core Objectives - **Real-time Packagist API** — data never stale, always fresh - Local cache (1 hour TTL) — fast repeat queries - Score packages by: stars × downloads × activity × Laravel compatibility - Support **22 scene categories** including AI/LLM, rate-limit, Stripe, SMS - Cross-reference to **laravel-docs-reader** for official Laravel documentation - Provide install commands + config snippets --- ## 2. Scene Categories ### Supported Scenes | Scene | Chinese | Description | |-------|---------|-------------| | `auth` | 认证/权限 | Authentication, authorization, roles, permissions | | `payment` | 支付/订单 | Payment gateways, Stripe, Alipay, WeChat Pay | | `multitenancy` | 多租户 | Multi-tenant SaaS applications | | `excel` | Excel/导入导出 | Spreadsheet import/export, data processing | | `media` | 媒体/文件 | File uploads, media management, CDN | | `wechat` | 微信 | WeChat SDK, Mini Program | | `queue` | 队列/任务 | Job queues, Laravel Horizon | | `admin` | 后台管理 | Admin panels, Filament | | `search` | 搜索/全文检索 | Full-text search, Algolia, Scout | | `logging` | 日志/审计 | Logging, audit trails | | `api` | API/SDK | REST API, GraphQL, Sanctum | | `testing` | 测试 | Pest, PHPUnit | | `cache` | 缓存 | Redis, cache management | | `security` | 安全 | Security headers, CSRF | | `devtools` | 开发工具 | Debug, Telescope, Debugbar | | `email` | 邮件 | Mailgun, notifications | | `storage` | 存储 | S3, cloud storage | | `ui` | 前端/UI | Vue, React, Inertia, Breeze | | `ai` | AI/LLM集成 | OpenAI, LLM, chatbot | | `ratelimit` | 限流 | Rate limiting, throttle | | `stripe` | Stripe支付 | Stripe subscriptions & payments | | `sms` | 短信 | Twilio, SMS notifications | --- ## 3. Package Evaluation Criteria Each package is scored in real-time via Packagist API (live data): | Criterion | Weight | Source | |----------|--------|--------| | GitHub Stars | 15% | Packagist API (github_stars field) | | Packagist Downloads | 20% | Packagist API (downloads.total) | | Favorites | 10% | Packagist API (favers) | | Maintenance Activity | 30% | Last commit time (≤30d=100, ≤1y=40, >2y=0) | | Laravel Compatibility | 15% | composer.json require (10/11/12) | | Description Quality | 10% | Non-empty description = 100 | ### Real-time Scoring ``` Score = min(100, stars/500)*0.15 + min(100, log10(downloads)*15)*0.20 + min(100, favers/200)*0.10 + activityScore*0.30 + (hasLaravelVersion ? 100 : 0)*0.15 + (hasDescription ? 100 : 0)*0.10 ``` > Data fetched live from Packagist API. Cached for 1 hour in `scripts/.cache.json`. --- ## 4. Top 20 Laravel Packages Run `php search.php top 20` for live rankings --- ## 5. Smart Recommendation Logic When a user describes their needs: 1. **Parse Intent** → Map to scene category 2. **Match Packages** → Find packages in that scene 3. **Filter** → Remove incompatible versions 4. **Sort** → By recommendation score 5. **Output** → Top 3 recommendations with reasoning ### Output Template ``` ## 🎯 Recommended for: [User's Scenario] **Top Pick**: [Package Name] - **Why**: [Recommendation Reason] - **Alternative**: [Alternative Package] - **Caution**: [Any concerns] - **Install**: `composer require [package]` - **Compatibility**: Laravel X / Y / Z --- **Alternative 1**: [Name] ... **Alternative 2**: [Name] ... ``` --- ## 6. Installation & Configuration Each package entry includes: ```bash composer require vendor/package ``` ```php // config/services.php or dedicated config file 'package' => [ 'key' => env('PACKAGE_KEY'), ], ``` ```php // app/Providers/AppServiceProvider.php public function register(): void { $this->mergeConfigFrom(...); } ``` --- ## 7. Version Compatibility | Laravel | Compatible Packages | |---------|-------------------| | Laravel 12 | Packages updated after 2024-Q4 | | Laravel 11 | Packages updated after 2023-Q2 | | Laravel 10 | Packages updated after 2022-Q1 | Always verify: `composer show vendor/package --tree | grep laravel/framework` --- ## 8. CLI Tool (scripts/search.php) Real-time Packagist API with local caching. No static data. ### Commands ```bash php search.php <command> [args] ``` | Command | Args | Description | |---------|------|-------------| | `search` | `<scene> [limit]` | Search by scene (auth, payment, ai...) | | `compare` | `<pkg1> <pkg2>` | Compare two packages | | `recommend` | `<requirement>` | Natural language recommendation | | `top` | `[limit]` | Show Top N packages (default 10) | | `scenes` | — | List all 22 scene categories | ### Examples ```bash # Search AI packages php search.php search ai 3 # Compare two auth packages php search.php compare spatie/laravel-permission laravel/sanctum # Natural language recommendation php search.php recommend "I need WeChat Pay for Laravel 11" php search.php recommend "I need AI chat for Laravel" php search.php recommend "I need rate limiting" # Top 20 packages php search.php top 20 # All scenes php search.php scenes ``` ### Caching ``` Cache file: scripts/.cache.json (auto-created) TTL: 1 hour ``` ### Integration with OpenClaw Agent When the agent receives a package query, it calls `php search.php` and formats the output. If the user asks about Laravel official docs, it cross-references `laravel-docs-reader` skill. --- ## 8b. laravel-docs-reader Cross-Reference This skill automatically cross-references Laravel official documentation for known packages: ``` Package → Official Laravel Docs spatie/laravel-permission → Authorization docs laravel/scout → Database Search docs laravel/horizon → Queues docs laravel/telescope → Debugging docs laravel/sanctum → SPA Authentication docs laravel/cashier → Billing docs laravel/fortify → Authentication docs filament/filament → filamentphp.com/docs maatwebsite/excel → docs.laravel-excel.com ``` For packages not in the map, the output includes: ``` 📖 Laravel Docs: Run `laravel-docs-reader` to search official docs for this package ``` ### Workflow 1. User asks: "recommend a Laravel auth package" 2. This skill returns ranked packages with install commands 3. Output includes: `📖 Laravel Docs: Run laravel-docs-reader to search official docs` 4. User can then ask: "search laravel-docs-reader for sanctum setup" 5. laravel-docs-reader handles the official documentation query --- ### Activation Keywords - "帮我找个 Laravel 插件" - "Laravel package for XXX" - "推荐 Laravel 认证插件" - "Laravel auth package recommendation" - "帮我评估这个包" - "compare Laravel packages" ### Workflow 1. User describes requirement (Chinese or English) 2. Skill identifies scene category 3. Skill searches Top20 + scene database 4. Skill returns ranked recommendations 5. User selects → Skill provides install + config --- ## 10. Data Sources - **Packagist API**: `https://packagist.org/api/search.json?q=` - **GitHub API**: `https://api.github.com/repos/{vendor}/{package}` - **GitHub Trending**: Community activity - **Official Laravel Packages**: laravel.com/packages --- ## 11. File Structure ``` laravel-package-search/ ├── SKILL.md # This file ├── references/ │ └── scene-index.md # Scene category index └── scripts/ └── search.php # Real-time Packagist CLI (v3) ``` --- ## 12. Publishing to Skills Market ```bash clawhub login clawhub publish laravel-package-search ``` Or submit to ClawHub website for review. --- ## 13. Maintenance - Update Top 20 quarterly - Add new scenes as Laravel ecosystem evolves - Track deprecated packages and mark them - Update compatibility for new Laravel releases

path: references/scene-index.md
content: # Scene Category Index

每个场景都有 Packagist 搜索链接，直接点击即可查看所有相关包。

## 场景列表

| Code | Scene (EN) | Scene (CN) | Packagist 搜索 |
|------|-----------|------------|----------------|
| `auth` | Authentication & Authorization | 认证/权限 | [→ 搜索 laravel+auth](https://packagist.org/search?q=laravel+authentication+rbac&type=library) |
| `payment` | Payment & Billing | 支付/账单 | [→ 搜索 laravel+payment](https://packagist.org/search?q=laravel+payment+stripe&type=library) |
| `multitenancy` | Multi-tenancy | 多租户/SaaS | [→ 搜索 laravel+multi-tenant](https://packagist.org/search?q=laravel+multi-tenant+saas&type=library) |
| `excel` | Excel Import/Export | Excel导入导出 | [→ 搜索 laravel+excel](https://packagist.org/search?q=laravel+excel+spreadsheet&type=library) |
| `media` | Media & Files | 媒体/文件管理 | [→ 搜索 laravel+media+upload](https://packagist.org/search?q=laravel+media+file+upload&type=library) |
| `wechat` | WeChat / Mini Program | 微信/小程序 | [→ 搜索 laravel+wechat](https://packagist.org/search?q=laravel+wechat&type=library) |
| `queue` | Queue & Jobs | 队列/任务调度 | [→ 搜索 laravel+queue+horizon](https://packagist.org/search?q=laravel+queue+horizon&type=library) |
| `admin` | Admin Panel | 后台管理 | [→ 搜索 laravel+admin+filament](https://packagist.org/search?q=laravel+admin+panel&type=library) |
| `search` | Full-text Search | 全文检索 | [→ 搜索 laravel+search+scout](https://packagist.org/search?q=laravel+search+scout&type=library) |
| `logging` | Logging & Audit | 日志/审计 | [→ 搜索 laravel+log+activity](https://packagist.org/search?q=laravel+log+activity&type=library) |
| `api` | API & SDK | API开发 | [→ 搜索 laravel+api+rest](https://packagist.org/search?q=laravel+api+rest&type=library) |
| `testing` | Testing | 测试 | [→ 搜索 laravel+testing+pest](https://packagist.org/search?q=laravel+testing+pest&type=library) |
| `cache` | Caching | 缓存 | [→ 搜索 laravel+redis+cache](https://packagist.org/search?q=laravel+redis+cache&type=library) |
| `security` | Security | 安全防护 | [→ 搜索 laravel+security](https://packagist.org/search?q=laravel+security&type=library) |
| `devtools` | Developer Tools | 开发工具 | [→ 搜索 laravel+debug+telescope](https://packagist.org/search?q=laravel+debug+telescope&type=library) |
| `email` | Email & Notifications | 邮件/通知 | [→ 搜索 laravel+mail+notification](https://packagist.org/search?q=laravel+mail+notification&type=library) |
| `storage` | Cloud Storage | 云存储 | [→ 搜索 laravel+storage+s3](https://packagist.org/search?q=laravel+storage+s3+flysystem&type=library) |
| `ui` | Frontend UI | 前端UI | [→ 搜索 laravel+ui+vue+inertia](https://packagist.org/search?q=laravel+vue+inertia+breeze&type=library) |
| `ai` | AI / LLM Integration | AI大模型集成 | [→ 搜索 laravel+openai+llm](https://packagist.org/search?q=laravel+openai+ai+llm&type=library) |
| `ratelimit` | Rate Limiting | 限流 | [→ 搜索 laravel+rate+limit+throttle](https://packagist.org/search?q=laravel+rate+limit+throttle&type=library) |
| `stripe` | Stripe Payments | Stripe支付 | [→ 搜索 laravel+stripe](https://packagist.org/search?q=laravel+stripe+billing&type=library) |
| `sms` | SMS Notifications | 短信通知 | [→ 搜索 laravel+sms](https://packagist.org/search?q=laravel+sms+twilio&type=library) |

---

## 场景 → Top 包速查

| 场景 | 最推荐 | 备选 |
|------|--------|------|
| 认证权限 | [spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission) | [laravel/sanctum](https://packagist.org/packages/laravel/sanctum) |
| 支付 | [yansongda/pay](https://packagist.org/packages/yansongda/pay)（支付宝/微信） | [laravel/cashier](https://packagist.org/packages/laravel/cashier)（Stripe） |
| Excel | [maatwebsite/excel](https://packagist.org/packages/maatwebsite/excel) | [phpoffice/phpspreadsheet](https://packagist.org/packages/phpoffice/phpspreadsheet) |
| 搜索 | [laravel/scout](https://packagist.org/packages/laravel/scout) | [elastic/elasticsearch-laravel](https://packagist.org/packages/elastic/elasticsearch-laravel) |
| 后台 | [filament/filament](https://packagist.org/packages/filament/filament) | [laravel-admin](https://packagist.org/packages/encore/laravel-admin) |
| 微信 | [overtrue/laravel-wechat](https://packagist.org/packages/overtrue/laravel-wechat) | [yansongda/pay](https://packagist.org/packages/yansongda/pay) |
| 队列 | [laravel/horizon](https://packagist.org/packages/laravel/horizon) | — |
| 日志 | [spatie/laravel-activitylog](https://packagist.org/packages/spatie/laravel-activitylog) | — |
| 多租户 | [stancl/tenancy](https://packagist.org/packages/stancl/tenancy) | — |
| AI | [openai-php/laravel](https://packagist.org/packages/openai-php/laravel) | — |
| 限流 | 内置 Laravel Throttle | [stevebailey/laravel-throttle](https://packagist.org/packages/stevebailey/laravel-throttle) |
| 测试 | [pestphp/pest](https://packagist.org/packages/pestphp/pest) | [phpunit/phpunit](https://packagist.org/packages/phpunit/phpunit) |
| 媒体 | [spatie/laravel-medialibrary](https://packagist.org/packages/spatie/laravel-medialibrary) | [intervention/image](https://packagist.org/packages/intervention/image) |
| 备份 | [spatie/laravel-backup](https://packagist.org/packages/spatie/laravel-backup) | — |
| PDF | [barryvdh/laravel-dompdf](https://packagist.org/packages/barryvdh/laravel-dompdf) | [barryvdh/laravel-snappy](https://packagist.org/packages/barryvdh/laravel-snappy) |
| Redis | [predis/predis](https://packagist.org/packages/predis/predis) | [phpredis/phpredis](https://packagist.org/packages/phpredis/phpredis) |

---

> 💡 运行 `php scripts/search.php scenes` 可查看所有场景，`search <scene>` 可实时搜索对应包。


path: references/top20-packages.md
content: # Top 20 Laravel Packages (2025)

> Run `php scripts/search.php top 20` for **live** rankings with real-time Packagist data.

| Rank | Package | Stars | Downloads | Updated | Use Case |
|------|---------|-------|-----------|---------|----------|
| 1 | **[laravel/framework](https://packagist.org/packages/laravel/framework)** | 30k+ | 50M+ | 2026-03 | Core framework |
| 2 | **[spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission)** | 25k | 15M | 2026-01 | RBAC permissions |
| 3 | **[laravel/scout](https://packagist.org/packages/laravel/scout)** | 13k | 8M | 2026-02 | Full-text search |
| 4 | **[barryvdh/laravel-dompdf](https://packagist.org/packages/barryvdh/laravel-dompdf)** | 12k | 10M | 2025-11 | PDF generation |
| 5 | **[maatwebsite/excel](https://packagist.org/packages/maatwebsite/excel)** | 13k | 6M | 2025-12 | Excel import/export |
| 6 | **[spatie/laravel-activitylog](https://packagist.org/packages/spatie/laravel-activitylog)** | 10k | 4M | 2026-02 | Activity logging |
| 7 | **[laravel/horizon](https://packagist.org/packages/laravel/horizon)** | 7k | 3M | 2026-03 | Queue monitoring |
| 8 | **[barryvdh/laravel-debugbar](https://packagist.org/packages/barryvdh/laravel-debugbar)** | 18k | 5M | 2025-10 | Debug toolbar |
| 9 | **[spatie/laravel-backup](https://packagist.org/packages/spatie/laravel-backup)** | 12k | 3M | 2025-11 | Database backup |
| 10 | **[tymon/jwt-auth](https://packagist.org/packages/tymon/jwt-auth)** | 13k | 4M | 2025-09 | JWT authentication |
| 11 | **[laravel/fortify](https://packagist.org/packages/laravel/fortify)** | 8k | 2M | 2026-01 | Authentication backend |
| 12 | **[filament/filament](https://packagist.org/packages/filament/filament)** | 25k | 1M | 2026-03 | Admin panel (Livewire) |
| 13 | **[socialiteproviders/manager](https://packagist.org/packages/socialiteproviders/manager)** | 10k | 2M | 2026-01 | Social OAuth (50+ providers) |
| 14 | **[predis/predis](https://packagist.org/packages/predis/predis)** | 12k | 20M | 2025-08 | Redis client |
| 15 | **[guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle)** | 25k | 100M+ | 2025-07 | HTTP client |
| 16 | **[laravel/telescope](https://packagist.org/packages/laravel/telescope)** | 12k | 2M | 2026-01 | Debugging assistant |
| 17 | **[spatie/laravel-medialibrary](https://packagist.org/packages/spatie/laravel-medialibrary)** | 10k | 2M | 2026-01 | Media management |
| 18 | **[laravel/breeze](https://packagist.org/packages/laravel/breeze)** | 10k | 1M | 2026-02 | Auth starter kit |
| 19 | **[yansongda/pay](https://packagist.org/packages/yansongda/pay)** | 6k | 500k | 2026-02 | Alipay + WeChat Pay (CN) |
| 20 | **[pestphp/pest](https://packagist.org/packages/pestphp/pest)** | 11k | 3M | 2026-03 | Elegant testing framework |

---

## Quick Reference

| Need | Top Pick (Packagist) | Alternative |
|------|----------------------|------------|
| RBAC / Permissions | [spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission) | [bouncer](https://packagist.org/packages/silber/bouncer) |
| Full-text Search | [laravel/scout](https://packagist.org/packages/laravel/scout) | [elastic/elasticsearch-laravel](https://packagist.org/packages/elastic/elasticsearch-laravel) |
| Excel Import/Export | [maatwebsite/excel](https://packagist.org/packages/maatwebsite/excel) | [phpoffice/phpspreadsheet](https://packagist.org/packages/phpoffice/phpspreadsheet) |
| PDF Generation | [barryvdh/laravel-dompdf](https://packagist.org/packages/barryvdh/laravel-dompdf) | [barryvdh/laravel-snappy](https://packagist.org/packages/barryvdh/laravel-snappy) |
| Admin Panel | [filament/filament](https://packagist.org/packages/filament/filament) | [laravel-admin](https://packagist.org/packages/encore/laravel-admin) |
| JWT Auth | [tymon/jwt-auth](https://packagist.org/packages/tymon/jwt-auth) | [laravel/sanctum](https://packagist.org/packages/laravel/sanctum) |
| Queue Monitor | [laravel/horizon](https://packagist.org/packages/laravel/horizon) | — |
| Activity Log | [spatie/laravel-activitylog](https://packagist.org/packages/spatie/laravel-activitylog) | — |
| Database Backup | [spatie/laravel-backup](https://packagist.org/packages/spatie/laravel-backup) | — |
| Media Files | [spatie/laravel-medialibrary](https://packagist.org/packages/spatie/laravel-medialibrary) | [intervention/image](https://packagist.org/packages/intervention/image) |
| Social Login | [socialiteproviders/manager](https://packagist.org/packages/socialiteproviders/manager) | [laravel/socialite](https://packagist.org/packages/laravel/socialite) |
| Redis | [predis/predis](https://packagist.org/packages/predis/predis) | [phpredis/phpredis](https://packagist.org/packages/phpredis/phpredis) |
| WeChat Pay (CN) | [yansongda/pay](https://packagist.org/packages/yansongda/pay) | [overtrue/laravel-wechat](https://packagist.org/packages/overtrue/laravel-wechat) |
| Testing | [pestphp/pest](https://packagist.org/packages/pestphp/pest) | [phpunit/phpunit](https://packagist.org/packages/phpunit/phpunit) |
| Debug | [laravel/telescope](https://packagist.org/packages/laravel/telescope) | [barryvdh/laravel-debugbar](https://packagist.org/packages/barryvdh/laravel-debugbar) |
| Stripe Billing | [laravel/cashier](https://packagist.org/packages/laravel/cashier) | — |
| Multi-tenancy | [stancl/tenancy](https://packagist.org/packages/stancl/tenancy) | — |
| AI / LLM | [openai-php/laravel](https://packagist.org/packages/openai-php/laravel) | — |

---

**所有链接直接跳转到 Packagist 包页面，可直接 `composer require`。**


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)