Install
$ agentstack add skill-asyrafhussin-agent-skills-laravel-ai-sdk ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Laravel AI SDK
Comprehensive guide for building AI-powered features with the Laravel AI SDK (laravel/ai). Contains 17 rules across 7 categories covering agents, tools, media generation, embeddings, vector stores, and testing.
When to Apply
Reference these guidelines when:
- Creating AI agents with instructions, tools, and structured output
- Prompting agents with conversation context
- Streaming or queueing agent responses
- Generating images, audio, or transcriptions
- Creating and querying vector embeddings
- Building RAG (retrieval-augmented generation) features
- Testing AI features with fakes and assertions
Rule Categories by Priority
| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Agents | CRITICAL | agent- | | 2 | Tools | HIGH | tool- | | 3 | Embeddings & Search | HIGH | embed- | | 4 | Media Generation | MEDIUM | media- | | 5 | Files & Storage | MEDIUM | files- | | 6 | Infrastructure | MEDIUM | infra- | | 7 | Testing | HIGH | test- |
Quick Reference
1. Agents (CRITICAL)
agent-create-configure- Create agents with artisan, PHP attribute configurationagent-prompting- Prompt agents, conversation context, RemembersConversationsagent-structured-output- Structured output with JSON schemaagent-streaming-async- Streaming, broadcasting, and queueing responsesagent-middleware- Agent middleware pipelineagent-anonymous- Anonymous agents for quick interactions
2. Tools (HIGH)
tool-create- Create custom tools with schema and handle methodtool-provider- Provider tools: WebSearch, WebFetch, FileSearch, SimilaritySearch
3. Embeddings & Search (HIGH)
embed-generate-cache- Generate, store, and cache vector embeddingsembed-rerank- Rerank documents and collections by relevance
4. Media Generation (MEDIUM)
media-images- Generate, store, and queue imagesmedia-audio-transcription- Text-to-speech and speech-to-text
5. Files & Storage (MEDIUM)
files-vector-stores- File storage and vector stores for RAG
6. Infrastructure (MEDIUM)
infra-failover- Automatic provider failover for resilience
7. Testing (HIGH)
test-agents- Fake agents, assert prompts, prevent stray promptstest-media- Fake images, audio, and transcriptionstest-data- Fake embeddings, reranking, files, and vector stores
Essential Patterns
Creating an Agent
prompt('Analyze this sales transcript...');
return (string) $response;
Generating Images
use Laravel\Ai\Image;
$image = Image::of('A donut sitting on the kitchen counter')
->landscape()
->generate();
$path = $image->store();
Generating Embeddings
use Illuminate\Support\Str;
$embeddings = Str::of('Napa Valley has great wine.')->toEmbeddings();
Testing
use App\Ai\Agents\SalesCoach;
SalesCoach::fake(['First response', 'Second response']);
SalesCoach::make()->prompt('Analyze this...');
SalesCoach::assertPrompted('Analyze this...');
How to Use
Read individual rule files for detailed explanations and code examples.
Each rule file contains:
- YAML frontmatter with metadata (title, impact, tags)
- Brief explanation of why it matters
- Bad Example with explanation
- Good Example with explanation
- Laravel 13 and PHP 8.3 specific context and references
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: AsyrafHussin
- Source: AsyrafHussin/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.