[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BX8WZVC6XZMAXP4087RYTH":3,"skill-same:01M6BX8WZVC6XZMAXP4087RYTH":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":26,"frontMatter":27,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M6BX8WZVC6XZMAXP4087RYTH","medialibrary-development",null,"Build and work with spatie\u002Flaravel-medialibrary features including associating files with Eloquent models, defining media collections and conversions, generating responsive images, and retrieving media URLs and paths.","karuhun-developer\u002Ftemplate-laravel-livewire","karuhun-developer","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F169523822?v=4","01M6BX5G1VG24QZX7D5GJBT0NG","Karuhun Developer","01M6BX5G667YMVBX9YKY797ZKA",6,"MIT","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmedialibrary-development\u002FSKILL.md",[],[19,20,21,22],"development","medialibrary development","Media","laravel","2026-11-10 10:12:30",false,"---\nname: medialibrary-development\ndescription: Build and work with spatie\u002Flaravel-medialibrary features including associating files with Eloquent models, defining media collections and conversions, generating responsive images, and retrieving media URLs and paths.\nlicense: MIT\nmetadata:\n  author: Spatie\n---\n\n# Media Library Development\n\n## Overview\n\nUse spatie\u002Flaravel-medialibrary to associate files with Eloquent models. Supports image\u002Fvideo conversions, responsive images, multiple collections, and various storage disks.\n\n## When to Activate\n\n- Activate when working with file uploads, media attachments, or image processing in Laravel.\n- Activate when code references `HasMedia`, `InteractsWithMedia`, the `Media` model, or media collections\u002Fconversions.\n- Activate when the user wants to add, retrieve, convert, or manage files attached to Eloquent models.\n\n## Scope\n\n- In scope: media uploads, collections, conversions, responsive images, custom properties, file retrieval, path\u002FURL generation.\n- Out of scope: general file storage without Eloquent association, non-Laravel frameworks.\n\n## Workflow\n\n1. Identify the task (model setup, adding media, defining conversions, retrieving files, etc.).\n2. Read `references\u002Fmedialibrary-guide.md` and focus on the relevant section.\n3. Apply the patterns from the reference, keeping code minimal and Laravel-native.\n\n## Core Concepts\n\n### Model Setup\n\nEvery model that should have media must implement `HasMedia` and use the `InteractsWithMedia` trait:\n\n```php\nuse Spatie\\MediaLibrary\\HasMedia;\nuse Spatie\\MediaLibrary\\InteractsWithMedia;\n\nclass BlogPost extends Model implements HasMedia\n{\n    use InteractsWithMedia;\n}\n```\n\n### Adding Media\n\n```php\n$blogPost->addMedia($file)->toMediaCollection('images');\n$blogPost->addMediaFromUrl($url)->toMediaCollection('images');\n$blogPost->addMediaFromRequest('file')->toMediaCollection('images');\n```\n\n### Defining Collections\n\n```php\npublic function registerMediaCollections(): void\n{\n    $this->addMediaCollection('avatar')->singleFile();\n    $this->addMediaCollection('downloads')->useDisk('s3');\n}\n```\n\n### Defining Conversions\n\n```php\nuse Spatie\\MediaLibrary\\MediaCollections\\Models\\Media;\nuse Spatie\\Image\\Enums\\Fit;\n\npublic function registerMediaConversions(?Media $media = null): void\n{\n    $this->addMediaConversion('thumb')\n        ->fit(Fit::Contain, 300, 300)\n        ->nonQueued();\n}\n```\n\n### Retrieving Media\n\n```php\n$url = $model->getFirstMediaUrl('images');\n$thumbUrl = $model->getFirstMediaUrl('images', 'thumb');\n$allMedia = $model->getMedia('images');\n```\n\n## Do and Don't\n\nDo:\n- Always implement the `HasMedia` interface alongside the `InteractsWithMedia` trait.\n- Use `?Media $media = null` as the parameter for `registerMediaConversions()`.\n- Call `->toMediaCollection()` to finalize adding media.\n- Use `->nonQueued()` for conversions that should run synchronously.\n- Use `->singleFile()` on collections that should only hold one file.\n- Use `Spatie\\Image\\Enums\\Fit` enum values for fit methods.\n\nDon't:\n- Don't forget to run `php artisan vendor:publish --provider=\"Spatie\\MediaLibrary\\MediaLibraryServiceProvider\" --tag=\"medialibrary-migrations\"` before migrating.\n- Don't use `env()` for disk configuration; use `config()` or set it in `config\u002Fmedia-library.php`.\n- Don't call `addMedia()` without calling `toMediaCollection()` — the media won't be saved.\n- Don't reference conversion names that aren't registered in `registerMediaConversions()`.\n\n## References\n\n- `references\u002Fmedialibrary-guide.md`\n","# Media Library Development\n\n## Overview\n\nUse spatie\u002Flaravel-medialibrary to associate files with Eloquent models. Supports image\u002Fvideo conversions, responsive images, multiple collections, and various storage disks.\n\n## When to Activate\n\n- Activate when working with file uploads, media attachments, or image processing in Laravel.\n- Activate when code references `HasMedia`, `InteractsWithMedia`, the `Media` model, or media collections\u002Fconversions.\n- Activate when the user wants to add, retrieve, convert, or manage files attached to Eloquent models.\n\n## Scope\n\n- In scope: media uploads, collections, conversions, responsive images, custom properties, file retrieval, path\u002FURL generation.\n- Out of scope: general file storage without Eloquent association, non-Laravel frameworks.\n\n## Workflow\n\n1. Identify the task (model setup, adding media, defining conversions, retrieving files, etc.).\n2. Read `references\u002Fmedialibrary-guide.md` and focus on the relevant section.\n3. Apply the patterns from the reference, keeping code minimal and Laravel-native.\n\n## Core Concepts\n\n### Model Setup\n\nEvery model that should have media must implement `HasMedia` and use the `InteractsWithMedia` trait:\n\n```php\nuse Spatie\\MediaLibrary\\HasMedia;\nuse Spatie\\MediaLibrary\\InteractsWithMedia;\n\nclass BlogPost extends Model implements HasMedia\n{\n    use InteractsWithMedia;\n}\n```\n\n### Adding Media\n\n```php\n$blogPost->addMedia($file)->toMediaCollection('images');\n$blogPost->addMediaFromUrl($url)->toMediaCollection('images');\n$blogPost->addMediaFromRequest('file')->toMediaCollection('images');\n```\n\n### Defining Collections\n\n```php\npublic function registerMediaCollections(): void\n{\n    $this->addMediaCollection('avatar')->singleFile();\n    $this->addMediaCollection('downloads')->useDisk('s3');\n}\n```\n\n### Defining Conversions\n\n```php\nuse Spatie\\MediaLibrary\\MediaCollections\\Models\\Media;\nuse Spatie\\Image\\Enums\\Fit;\n\npublic function registerMediaConversions(?Media $media = null): void\n{\n    $this->addMediaConversion('thumb')\n        ->fit(Fit::Contain, 300, 300)\n        ->nonQueued();\n}\n```\n\n### Retrieving Media\n\n```php\n$url = $model->getFirstMediaUrl('images');\n$thumbUrl = $model->getFirstMediaUrl('images', 'thumb');\n$allMedia = $model->getMedia('images');\n```\n\n## Do and Don't\n\nDo:\n- Always implement the `HasMedia` interface alongside the `InteractsWithMedia` trait.\n- Use `?Media $media = null` as the parameter for `registerMediaConversions()`.\n- Call `->toMediaCollection()` to finalize adding media.\n- Use `->nonQueued()` for conversions that should run synchronously.\n- Use `->singleFile()` on collections that should only hold one file.\n- Use `Spatie\\Image\\Enums\\Fit` enum values for fit methods.\n\nDon't:\n- Don't forget to run `php artisan vendor:publish --provider=\"Spatie\\MediaLibrary\\MediaLibraryServiceProvider\" --tag=\"medialibrary-migrations\"` before migrating.\n- Don't use `env()` for disk configuration; use `config()` or set it in `config\u002Fmedia-library.php`.\n- Don't call `addMedia()` without calling `toMediaCollection()` — the media won't be saved.\n- Don't reference conversion names that aren't registered in `registerMediaConversions()`.\n\n## References\n\n- `references\u002Fmedialibrary-guide.md`\n",{"name":5,"license":15,"metadata":28,"description":7},{"author":29},"Spatie","main","e9bff297aa5ec90d4815836383d540f20dee6717",".claude\u002Fskills\u002Fmedialibrary-development",1,"https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer","https:\u002F\u002Fkaruhundeveloper.com","2026-11-05 11:36:48",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill medialibrary-development",{"tool":44,"command":45},"bunx","bunx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill medialibrary-development",{"tool":47,"command":48},"pnpm","pnpm dlx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill medialibrary-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmedialibrary-development\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fmedialibrary-guide.md","REFERENCE","参考文档",14647,"https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmedialibrary-development\u002Freferences\u002Fmedialibrary-guide.md",[59,84,115,128,142,147],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":70,"publishedAt":23},"01M6BXAN772630D3MJ7GJHJH4A","testing-best-practices","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[65],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[71,72,73,22,74,75,76,77,78,79,80,81,82,83],"testing","testing best practices","best practices","data","search","docs","framework","http","test","performance","security","design","review",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":96,"publishedAt":23},"01M6BXAJ8TFJXYH8XVWXJ5F5ZJ","tailwindcss-development","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[90,93],{"categoryNo":91,"categoryName":92,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":94,"categoryName":95,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000010","后端与接口",[97,19,98,99,100,101,102,103,104,105,106,107,108,109,110,111,22,112,113,114],"tailwindcss","tailwindcss development","api","javascript","components","component","core","product","database","file","ui","templates","Tailwind","build tool","tool","pricing","writing","css",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":23},"01M6BXAFCFVQZQTR4V0XQ90Z9G","sluggable-development","Use when making a field on an Eloquent model sluggable, generating the migration for a slug column, switching to self-healing URLs, or resolving a model from its slug in a route. Trigger when the request mentions slugs, permalinks, the spatie\u002Flaravel-sluggable package, the HasSlug or HasTranslatableSlug trait, the #[Sluggable] attribute, SlugOptions, findBySlug, self-healing URLs, or stale slug redirects in a Laravel project. Covers choosing between the attribute and the trait, generating unique slugs, configuring separator\u002Flength\u002Flanguage\u002Fscope\u002Funiqueness, preventing slug overwrites, translatable slugs via spatie\u002Flaravel-translatable, route model binding through the slug column, self-healing route keys, customizing the 308 redirect through the SelfHealing facade, and overriding the default actions via config\u002Fsluggable.php. Do not use for one-off URL-safe strings, signed URLs, or Laravel's built-in Str::slug helper when the result is not stored on a model.","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsluggable-development\u002FSKILL.md",[],[122,19,22,123,124,125,126,127],"sluggable development","safe","config","package","actions","php",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":23},"01M6BXACFB94RP29K94ZQB37KN","pulse-development","Handles Laravel Pulse setup, configuration, and custom card development. Activates when installing Pulse; configuring the dashboard or authorization gate; setting up recorders and filtering; building custom Livewire cards; optimizing with Redis ingest or sampling; or when the user mentions \u002Fpulse, pulse:check, pulse:work, Pulse::record(), or application monitoring.","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpulse-development\u002FSKILL.md",[],[135,19,136,137,138,139,140,22,141],"pulse development","dashboard","setup","monitoring","redis","authorization","livewire",{"skillNo":143,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":23},"01M6BXA9NM9N2HCN4FA0E6W3SC","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmedialibrary-development\u002FSKILL.md",[],[20,19,21,22],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":23},"01M6BXA6VT29ACMHYG8W2J4ZSB","livewire-development","Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC\u002FMFC\u002Fclass-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire.","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Flivewire-development\u002FSKILL.md",[153],{"categoryNo":91,"categoryName":92,"taxonomyType":68,"taxonomyTypeDesc":69},[155,141,19,101,156,102,157,158,159,107,160,161,162,163,164,22,80],"livewire development","react","debugging","validation","issues","vue","Optimization","real-time","js","performance optimization"]