laravel-ai-sdk
Laravel AI SDK for building AI-powered features. Use when creating agents, generating images or audio, working with embeddings, vector search, or testing AI features. Triggers on tasks involving laravel/ai, AI agents, tool-calling, structured output, streaming, embeddings, reranking, or AI faking in tests.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o laravel-ai-sdk.zip https://jpskill.com/download/23221.zip && unzip -o laravel-ai-sdk.zip && rm laravel-ai-sdk.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23221.zip -OutFile "$d\laravel-ai-sdk.zip"; Expand-Archive "$d\laravel-ai-sdk.zip" -DestinationPath $d -Force; ri "$d\laravel-ai-sdk.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
laravel-ai-sdk.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
laravel-ai-sdkフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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
<?php
namespace App\Ai\Agents;
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Promptable;
class SalesCoach implements Agent
{
use Promptable;
public function instructions(): string
{
return 'You are a sales coach, analyzing transcripts and providing feedback.';
}
}
Prompting
use App\Ai\Agents\SalesCoach;
$response = SalesCoach::make()->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
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,333 bytes)
- 📎 README.md (2,040 bytes)