بنقرة واحدة
laravel-expert
Deep expertise in Laravel - Eloquent, patterns, performance, security, testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Deep expertise in Laravel - Eloquent, patterns, performance, security, testing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,' 'LinkedIn ads,' 'ad budget,' 'cost per click,' 'ad spend,' or 'should I run ads.' Use this for campaign strategy, audience targeting, bidding, and optimization. For bulk ad creative generation and iteration, see ad-creative. For landing page optimization, see cro.
Persistent engineering knowledge vault with semantic search. Save decisions, patterns, debug solutions, and insights as Zettelkasten notes in Obsidian with automatic embedding indexing for semantic retrieval. Use this skill whenever the user says "/memo", "запомни это", "сохрани в базу", "save this", "remember this", "добавь в базу знаний", "log this pattern", or any variation of wanting to persist knowledge. Also trigger for "/memo find", "/memo search", "что я решал по X", "find in vault", "search vault", "найди в базе" to search notes — both keyword and semantic. Trigger for "/memo dedup", "/memo stats", "/memo project", "/memo reindex". This is the bridge between Claude Code sessions and long-term engineering memory across all projects.
Use when starting any new task to select the right GSD mode (fast/quick/plan-phase) and the right model tier (Haiku/Sonnet/Opus) for subagents — prevents 5-10× cost overpay on routine work
Pack the whole repo (or a remote one) into one AI-friendly file via Repomix. Use for architectural reviews, cross-repo handoff, full-codebase audits — not for single-file lookups. Triggers on "pack repo", "feed codebase to AI", "снапшот", "analyze remote repo".
花叔Design(Huashu-Design)——用HTML做高保真原型、交互Demo、幻灯片、动画、设计变体探索+设计方向顾问+专家评审的一体化设计能力。HTML是工具不是媒介,根据任务embody不同专家(UX设计师/动画师/幻灯片设计师/原型师),避免web design tropes。触发词:做原型、设计Demo、交互原型、HTML演示、动画Demo、设计变体、hi-fi设计、UI mockup、prototype、设计探索、做个HTML页面、做个可视化、app原型、iOS原型、移动应用mockup、导出MP4、导出GIF、60fps视频、设计风格、设计方向、设计哲学、配色方案、视觉风格、推荐风格、选个风格、做个好看的、评审、好不好看、review this design、带解说的动画、解说视频、概念解释视频、长视频科普、配音动画、voiceover、narration、TTS+动画、5分钟讲清楚什么是XX。**主干能力**:Junior Designer工作流(先给假设+reasoning+placeholder再迭代)、反AI slop清单、React+Babel最佳实践、Tweaks变体切换、Speaker Notes演示、Starter Components(幻灯片外壳/变体画布/动画引擎/设备边框/解说Stage)、App原型专属守则(默认从Wikimedia/Met/Unsplash取真图、每台iPhone包AppPhone状态管理器可交互、交付前跑Playwright点击测试)、Playwright验证、HTML动画→MP4/GIF视频导出(25fps基础 + 60fps插帧 + palette优化GIF + 6首场景化BGM + 自动fade)、**带解说的长动画pipeline**(豆包TTS生人声+实测时长生timeline.json+NarrationStage驱动画面+ducking混音→交付HTML实播+发布MP4双形态;铁律:整片是一个连续的运动叙事,禁PowerPoint切换)。**需求模糊时的Fallback**:设计方向顾问模式——从5流派×20种设计哲学(Pentagram信息建筑/Field.io运动诗学/Kenya Hara东方极简/Sagmeister实验先锋等)推荐3个差异化方向,展示24个预制showcase(8场景×3风格),并行生成3个视觉Demo让用户选
Use BEFORE coding any new feature, MVP, pricing/billing change, launch, or pivot. Acts as a product validation gate for solo founders — validates target user, JTBD, pain intensity, current alternative, success metric, distribution channel, structural advantage vs competitors, unit economics with SaaS-graveyard gate, cheapest experiment, and top risk. RIGID — do not proceed to technical planning until product context is documented in `.planning/product/<slug>.md` or risk is explicitly accepted. Triggers on "build", "ship", "add feature", "MVP", "launch", "pivot", "pricing", "billing", before /plan, /tdd, /gsd-plan-phase, /gsd-discuss-phase, or when user describes a feature without naming a measurable success metric.
| name | Laravel Expert |
| description | Deep expertise in Laravel - Eloquent, patterns, performance, security, testing |
This skill provides deep Laravel expertise including Eloquent optimization, architectural patterns, security best practices, and testing strategies.
// ❌ N+1 — 1 + N queries
foreach (Site::all() as $site) {
echo $site->owner->name;
}
// ✅ Eager loading — 2 queries
foreach (Site::with('owner')->get() as $site) {
echo $site->owner->name;
}
// ✅ Nested
Site::with(['owner', 'checks.results'])->get();
// ✅ Conditional
Site::with(['checks' => fn($q) => $q->failed()])->get();
// ❌ CRITICAL
protected $guarded = [];
// ❌ Sensitive fields in fillable
protected $fillable = ['name', 'email', 'is_admin'];
// ✅ Safe
protected $fillable = ['name', 'email', 'bio'];
// Use forceFill() for admin fields with explicit check
// When to use Query Builder:
// - Bulk operations
// - Complex aggregations
// - Performance critical paths
DB::table('sites')
->where('status', 'active')
->update(['checked_at' => now()]);
// When to use Eloquent:
// - CRUD with relationships
// - Model events needed
// - Accessors/mutators
$site = Site::find($id);
$site->update(['status' => 'active']);
// app/Actions/Sites/CreateSite.php
namespace App\Actions\Sites;
use App\Models\Site;
use App\Models\User;
class CreateSite
{
public function __construct(
private AnalyzerService $analyzer
) {}
public function execute(array $data, User $user): Site
{
$site = Site::create([
...$data,
'owner_id' => $user->id,
'status' => 'pending',
]);
$this->analyzer->queueCheck($site);
return $site;
}
}
// Stateless, injected via DI
class AnalyzerService
{
public function __construct(
private HttpClient $http,
private CacheManager $cache
) {}
public function analyze(Site $site): AnalysisResult
{
$cacheKey = "analysis.{$site->id}";
return $this->cache->remember(
$cacheKey,
now()->addHour(),
fn() => $this->performAnalysis($site)
);
}
private function performAnalysis(Site $site): AnalysisResult
{
$response = $this->http->get($site->url);
return new AnalysisResult($response);
}
}
// Use when need to swap implementations or testing
interface SiteRepositoryInterface
{
public function findActive(): Collection;
public function create(array $data): Site;
}
class EloquentSiteRepository implements SiteRepositoryInterface
{
public function findActive(): Collection
{
return Site::where('status', 'active')->get();
}
public function create(array $data): Site
{
return Site::create($data);
}
}
// Migration
Schema::table('sites', function (Blueprint $table) {
$table->index('status');
$table->index(['owner_id', 'status']);
$table->index('created_at');
});
// Select only needed columns
Site::select(['id', 'name', 'url'])->get();
// Use exists() instead of count()
if (Site::where('url', $url)->exists()) { }
// Chunking for large datasets
Site::chunk(100, function ($sites) {
foreach ($sites as $site) {
// Process
}
});
// Cursor for memory efficiency
foreach (Site::cursor() as $site) {
// One at a time
}
// Simple cache
$sites = Cache::remember("user.{$userId}.sites", 3600, function () use ($userId) {
return Site::where('owner_id', $userId)->with('latestCheck')->get();
});
// Tagged cache (Redis only)
$sites = Cache::tags(['sites', "user.{$userId}"])
->remember('list', 3600, fn() => Site::all());
// Invalidate
Cache::tags(['sites'])->flush();
Cache::forget("user.{$userId}.sites");
// app/Http/Requests/StoreSiteRequest.php
class StoreSiteRequest extends FormRequest
{
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'url' => ['required', 'url', 'max:2048', 'unique:sites,url'],
'interval' => ['nullable', 'integer', 'min:1', 'max:1440'],
];
}
public function messages(): array
{
return [
'url.unique' => 'This site is already being monitored.',
];
}
}
// app/Policies/SitePolicy.php
class SitePolicy
{
public function viewAny(User $user): bool
{
return true;
}
public function view(User $user, Site $site): bool
{
return $user->id === $site->owner_id
|| $user->hasRole('admin');
}
public function update(User $user, Site $site): bool
{
return $user->id === $site->owner_id;
}
public function delete(User $user, Site $site): bool
{
return $user->id === $site->owner_id;
}
}
// Usage
$this->authorize('update', $site);
// or
Gate::authorize('update', $site);
// routes/web.php
Route::middleware(['throttle:api'])->group(function () {
Route::post('/sites', [SiteController::class, 'store']);
});
// Custom rate limiter in AppServiceProvider
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
class SiteTest extends TestCase
{
use RefreshDatabase, WithFaker;
}
// database/factories/SiteFactory.php
class SiteFactory extends Factory
{
public function definition(): array
{
return [
'name' => $this->faker->company(),
'url' => $this->faker->url(),
'status' => 'active',
'owner_id' => User::factory(),
];
}
public function inactive(): static
{
return $this->state(['status' => 'inactive']);
}
}
// Usage
Site::factory()
->for(User::factory(), 'owner')
->has(Check::factory()->count(5))
->create();
$this->mock(AnalyzerService::class, function ($mock) {
$mock->shouldReceive('analyze')
->once()
->with(Mockery::type(Site::class))
->andReturn(new AnalysisResult(['score' => 85]));
});