laravel-docs
Laravel Docs Search (delegated)
Why delegate
Raw docs chunks are large (~1500 tokens/call) and often include prose you won't reuse. A sub-agent can absorb the full markdown, synthesise a compact answer (method signatures, version notes, gotchas), and hand only that back — keeping your working context clean.
Workflow
- Read
composer.jsonin the project — grablaravel/frameworkversion, normalize tomajor.x(e.g.^13.0→13.x). - Spawn one sub-agent using the Agent tool (
subagent_type: general-purpose) with the prompt template below. Wait for it — you need the answer before writing code. - Use the returned synthesis to write the implementation. If gaps remain after reading the answer, spawn one follow-up sub-agent with the missing queries. Don't exceed 2 sub-agent calls per task.
Agent tool invocation
description: short label, e.g."Laravel docs: <topic>"subagent_type:general-purposeprompt: use the template below, filling in{VERSION}and{QUERIES}
Prompt template for the sub-agent
You are looking up Laravel framework documentation and returning a compact synthesis. Do not do anything else.
Laravel version: {VERSION}
Queries (2-4 word technical terms, already crafted): {QUERIES}
Steps:
1. Call the Laravel docs API in a single request:
curl -sS -X POST https://boost.laravel.com/api/docs \
-H "Content-Type: application/json" \
-d '{"queries": {QUERIES_JSON_ARRAY}, "packages": [{"name":"laravel/framework","version":"{VERSION}"}], "token_limit": 1500, "format": "markdown"}'
2. If the first call misses the target API or returns nothing useful, make at most one follow-up call with refined queries. Hard cap: 2 calls total.
3. Return a synthesis with this structure (markdown, ~150-300 words):
## API
- method/class signatures the caller needs, one per line
- include namespace if non-obvious
## Usage
- 1-3 minimal code snippets showing the canonical pattern
## Version notes
- anything that changed in recent versions, deprecations, or gotchas
- say "no version-specific notes found" if none
## Source
- doc page titles/paths the info came from
Do NOT return raw doc chunks. Do NOT include unrelated methods. If the docs contradict common older patterns, call that out explicitly.
Query crafting rules (apply before sending to sub-agent)
- 2-4 word technical terms — NO natural language questions
- Use Laravel vocabulary: "eloquent" not "database model", "mailable" not "email class"
- Use method/class names when known:
hasMany belongsTo,Cache::remember - Word order matters — prefer natural technical order
- Batch all queries for one topic into a single sub-agent call
Example
Task: user wants to add per-user rate limiting to an API route on Laravel 13.
- Detect
13.xfromcomposer.json. - Spawn sub-agent with queries like
["rate limiting api", "RateLimiter::for", "throttle middleware"]. - Receive synthesis — something like:
## API - RateLimiter::for('api', fn (Request $r) => Limit::perMinute(60)->by($r->user()?->id)) - Route::middleware('throttle:api') ## Usage ... ## Version notes - no version-specific notes found - Write the code using the synthesis — no raw docs in your context.
More from dzmitry-vasileuski/skills
grepai
Semantic code search with grepai CLI — finds code by meaning, not text. Use this skill whenever the user asks to understand how something works, explore unfamiliar code areas, find code that handles a concept, or needs to discover related files across a codebase. Trigger phrases include "how does X work", "find the code for Y", "where is Z handled", "walk me through the flow", "show me how X is implemented". NOT for exact symbol lookups or tracing specific function calls (use grep for those). Assumes grepai is installed and indexed.
1excalidraw
Generate .excalidraw diagram files — flowcharts, architecture diagrams, ER diagrams, sequence diagrams, mind maps, and any other visual diagram. Use this skill whenever the user asks for a diagram, visual, flowchart, architecture diagram, system design, ER diagram, sequence diagram, mind map, or any kind of schematic. Also trigger when the user mentions .excalidraw files, Excalidraw, or asks to visualize relationships, flows, processes, or structures. Even if the user just says 'draw this' or 'make a diagram of' — use this skill.
1