← 返回 Skills 市场
relunctance

Laravel Docs Reader

作者 Gao.QiLin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
95
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laravel-docs-reader
功能描述
Provides instant Laravel documentation, auto-detects project version, generates PSR-12 Laravel code, and highlights differences across Laravel 10 to 12 versi...
使用说明 (SKILL.md)

Laravel Docs Reader — Skill Specification

Overview

Skill Name: Laravel Docs Reader Type: Development Reference Skill Target: OpenClaw Agent and Laravel developers Version: 1.0.0


Core Objectives

  1. Provide instant, accurate access to official Laravel documentation during coding
  2. Auto-detect the local Laravel version and serve the correct docs
  3. Generate standard Laravel code that conforms to Laravel best practices and PSR-12
  4. Highlight version differences across Laravel 10 / 11 / 12
  5. Keep references up to date via GitHub Actions auto-PR

Version Support

Version Status Notes
Laravel 12 ✅ Default Latest stable
Laravel 11 ✅ Supported Full reference
Laravel 10 ✅ Supported Full reference

Version Detection (Auto-Switch)

When the agent runs on a project, it auto-detects Laravel version:

  1. composer.json"laravel/framework": "^12.x"
  2. artisan --version
  3. vendor/laravel/framework/src/Illuminate/Foundation/Application.phpVERSION constant

Detection path: references/version-detection.md


CLI Tool

php laradoc.php \x3Ccommand> [args]
Command Args Description
search \x3Cquery> Natural language search (with Package Search cross-link)
version [path] Detect local Laravel version
current Show default version
config \x3Cfile> Config reference (database/cache/mail/...)
facade \x3Cname> Facade method signatures
artisan \x3Ccmd> Artisan command help
diff \x3Cfeature> Version diff (auth/routing/middleware/exception)
generate \x3Ctype> \x3Cname> Code skeleton (controller/model/job/middleware)
lang \x3Cquery> Blade directive lookup
psr [topic] PSR-12 quick reference (full/arrays/naming/methods)
cache Show local cache status
update Force-refresh cache from GitHub
subscribe Show subscription / auto-update status

Search Coverage

Category Topics
Routing Basic routes, route groups, resource routes, named routes, middleware
Controllers CRUD, REST, API, single-action, dependency injection
Models Eloquent, relationships (12 types), mutators, scopes
Migrations Schema builder, foreign keys, indexes, modifiers
Validation Form requests, inline validation, custom rules
Auth Breeze, Sanctum, Gates, Policies, JWT
Queues Jobs, dispatching, failed job handling, Laravel Horizon
Cache Store API, tags, atomic locks
Mail Markdown, attachments, queuing
Notifications Multi-channel, database notifications
Testing Feature tests, unit tests, Pest, factories
Events Listeners, broadcasting, queueable events
Storage Local/S3/FTP, temporary URLs, uploads
Scheduling Cron, recurring jobs, prevention of overlap
Service Container Binding, singletons, contextual binding
Facades All 30+ facades with method signatures
Broadcasting Private/public channels, presence channels
Configuration database, cache, mail, queue, auth, session

Code Generation

The generate command outputs standard Laravel code for:

  • controller — RESTful API controller
  • model — Eloquent model with fillable/casts/relationships
  • job — Queueable job with failed handler
  • middleware — HTTP middleware
  • request — Form Request validation
  • notification — Multi-channel notification
  • factory — Model factory for testing

All output follows PSR-12 and Laravel conventions.


Version Diff

Feature Laravel 10 Laravel 11 Laravel 12
Auth scaffolding laravel new --auth Breeze Breeze (minimal)
Middleware registration Kernel.php bootstrap/app.php bootstrap/app.php
Route registration RouteServiceProvider bootstrap/app.php bootstrap/app.php
Exception handling app/Exceptions/Handler bootstrap/app.php bootstrap/app.php
Cycle tasks app/Console/Kernel.php routes/console.php routes/console.php
Broadcast channels routes/channels.php routes/channels.php routes/channels.php

Auto-Update Mechanism

A GitHub Actions workflow runs weekly to:

  1. Fetch latest laravel/framework version from Packagist
  2. Compare against the skill's default version
  3. If new version detected → auto-create a PR with updated references
.github/workflows/update-docs.yml
  ├── Schedule: Every Sunday 00:00 UTC
  └── Creates PR: updates SKILL.md + version-detection.md

Anyone using this skill can review the auto-PR and merge after verification.


File Structure

laravel-docs-reader/
├── SKILL.md                          # This file
├── README.md                          # English (default)
├── README.zh-CN.md                    # Chinese
├── .github/
│   └── workflows/
│       └── update-docs.yml            # Auto-update PR workflow
├── .cache/                          # Local doc cache (auto-created)
├── references/
│   ├── version-detection.md           # Version detection logic
│   ├── version-diff.md                # Version diff table (10/11/12)
│   ├── psr-12.md                    # PSR-12 quick reference
│   ├── api-index.md                  # Full API index
│   ├── artisan-commands.md           # All artisan commands
│   ├── facades.md                   # Facade method signatures
│   ├── blade-directives.md           # All Blade directives
│   ├── config-ref.md               # Config file reference
│   └── examples/
│       ├── controller.md
│       ├── model.md
│       ├── migration.md
│       ├── middleware.md
│       ├── queue-job.md
│       ├── notification.md
│       └── testing.md
└── scripts/
    └── laradoc.php                  # CLI tool (14 commands)

PSR-12 Quick Reference

Built-in PSR-12 standard reference — no external formatter needed:

php laradoc.php psr                  # Full PSR-12 table (rules + examples)
php laradoc.php psr arrays          # Arrays rule
php laradoc.php psr naming          # Naming conventions (class/method/var/const)
php laradoc.php psr methods         # Visibility + method rules
php laradoc.php psr namespace       # use statements
php laradoc.php psr operators       # Operator spacing

Topics: arrays, naming, methods, control, namespace, operators

Local Cache (Offline Mode)

The skill stores docs in .cache/ for fast, offline access:

php laradoc.php cache  # Show cache status, size, age, offline availability
php laradoc.php update  # Force-refresh from GitHub

Cache is created automatically on first search. All bundled reference files work without internet.

Auto-Update & Subscription

GitHub Actions runs weekly (Sunday 00:00 UTC):

  • Detects new laravel/framework version from Packagist
  • Auto-creates PR updating SKILL.md, version-detection.md, version-diff.md
  • User reviews PR → merges when ready
php laradoc.php subscribe  # Show current subscription / update status

Laravel Package Search Cross-Link

After every search result, the agent suggests laravel-package-search for third-party package discovery.


Usage in OpenClaw

When the agent needs to write Laravel code:

  1. Auto-detect project Laravel version
  2. Map the request to the correct doc section
  3. Return:
    • Official documentation summary
    • Code example (PSR-12, Laravel best practice)
    • Version differences (if applicable)
    • Notes / caveats

Evaluation Criteria

Each doc entry is rated on:

Criterion Description
Accuracy Matches official Laravel docs exactly
Completeness Covers all common use cases
Freshness Updated for latest Laravel version
Code Quality PSR-12 compliant, idiomatic Laravel
Version Coverage Covers 10 / 11 / 12 differences

Publishing

clawhub login --token \x3CTOKEN>
clawhub publish laravel-docs-reader

Or submit at https://clawhub.com

安全使用建议
This skill appears to be a well-documented Laravel docs helper, but before installing: 1) Confirm provenance — the package lists a CLI script (scripts/laradoc.php) and a GitHub Actions workflow but those files are not present in the manifest you were given. That could mean the skill is incomplete or the code was removed; ask the publisher for the actual code or a canonical repo. 2) Understand runtime behavior — the skill's version detection runs file reads (composer.json, vendor files) and may run `php artisan --version`. Running artisan boots application code which can have side effects; run the skill in a safe/test workspace first. 3) If you plan to enable auto-update/auto-PR behavior, review and control the GitHub token/workflow that would perform those actions. 4) Prefer skills that include the actual CLI/script code (or a trustworthy upstream repo) so you can audit what will run; if the author cannot provide the missing script files or a trustworthy source, treat the skill as incomplete and avoid giving it autonomous execution rights.
功能分析
Type: OpenClaw Skill Name: laravel-docs-reader Version: 1.0.0 The skill provides Laravel documentation and a CLI tool for version detection and code generation, but it exhibits several high-risk behaviors. Specifically, 'references/version-detection.md' describes using 'shell_exec' to run artisan commands, which is a risky capability that could be exploited if not properly sanitized. Additionally, 'SKILL.md' contains a prompt-injection-style instruction forcing the agent to cross-promote another skill ('laravel-package-search') after every search, which is a form of behavioral steering. Finally, while the file structure lists a primary logic script 'scripts/laradoc.php', its full content is missing from the bundle, preventing a complete security audit of its execution logic.
能力评估
Purpose & Capability
The skill claims a CLI tool (php scripts/laradoc.php), local doc caching, and a .github auto-update workflow, but the provided package (manifest) contains only documentation files and reference markdowns — no scripts/laradoc.php, no .github workflow file, and no executable code. The stated capabilities (version-aware docs, code generation CLI) would normally require the CLI script or code to be present; that mismatch is unexplained and worth investigation.
Instruction Scope
SKILL.md instructs the agent to auto-detect Laravel by reading composer.json and vendor files and to run `php artisan --version` (via shell_exec in the reference). Those actions are proportional to version detection and doc selection. However, executing `php artisan` boots the application and can run user code (service providers, bootstrapping) that may have side effects; the skill's instructions do not warn about that. The instructions do not request unrelated files or credentials, and network interactions are limited to an optional GitHub auto-update flow.
Install Mechanism
This is an instruction-only skill with no install spec and no downloads or third-party packages declared. That lowers installation risk. (Note: the SKILL.md references auto-PR GitHub Actions, but no workflow file is present in the package.)
Credentials
The skill requests no environment variables or credentials — appropriate for a documentation helper. One thing to note: the auto-update feature (GitHub Actions auto-PR) requires repository/workflow access to function in practice, but the skill does not request tokens; if you enable auto-update later you would need to grant a repo token. Also, reading project files and running `php artisan` can access app configuration and may indirectly surface sensitive config if the agent prints it — the skill does not request secrets but may access files in the project workspace.
Persistence & Privilege
The skill does not request always:true, does not require persistent system-wide changes, and does not claim to modify other skills. Autonomous invocation is allowed (platform default) — combine that with the notes above about executing `php artisan` when deciding whether to enable autonomous runs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laravel-docs-reader
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laravel-docs-reader 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Laravel Docs Reader 1.0.0 – Initial Release - Instantly access official Laravel documentation via CLI, auto-detecting local Laravel version (supports 10, 11, 12). - Offers natural language search, artisan help, config and facade references, code skeleton generation, Blade/PSR-12 lookup, and version diff. - Provides offline doc cache and auto-update mechanism via GitHub Actions with weekly PRs for fresh docs and version support. - All code generated follows Laravel best practices and PSR-12 standards. - Includes support for multi-language README and comprehensive documentation references in the package.
元数据
Slug laravel-docs-reader
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Laravel Docs Reader 是什么?

Provides instant Laravel documentation, auto-detects project version, generates PSR-12 Laravel code, and highlights differences across Laravel 10 to 12 versi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 95 次。

如何安装 Laravel Docs Reader?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install laravel-docs-reader」即可一键安装,无需额外配置。

Laravel Docs Reader 是免费的吗?

是的,Laravel Docs Reader 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Laravel Docs Reader 支持哪些平台?

Laravel Docs Reader 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Laravel Docs Reader?

由 Gao.QiLin(@relunctance)开发并维护,当前版本 v1.0.0。

💬 留言讨论