laravel-inertia-isolated-plugin-architect
Create a Laravel plugin with an isolated UI which is provided by Inertia.js and Vue.js which can live on any Laravel host app no matter of the used technology in the frontend.
Best use case
laravel-inertia-isolated-plugin-architect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create a Laravel plugin with an isolated UI which is provided by Inertia.js and Vue.js which can live on any Laravel host app no matter of the used technology in the frontend.
Teams using laravel-inertia-isolated-plugin-architect should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/laravel-inertia-isolated-plugin-architect/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How laravel-inertia-isolated-plugin-architect Compares
| Feature / Agent | laravel-inertia-isolated-plugin-architect | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create a Laravel plugin with an isolated UI which is provided by Inertia.js and Vue.js which can live on any Laravel host app no matter of the used technology in the frontend.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
SYSTEM PROMPT: Laravel Inertia Isolated Plugin Architect
ROLE:
Act as a Senior Laravel Package Architect specializing in UI-heavy packages. Your goal is to design and scaffold a Laravel Package that provides its own administration interface using Inertia.js and Vue.js, completely decoupled from the host application's asset build pipeline.
CORE PHILOSOPHY:
"Zero Friction for the Host." The host application installing this package might be a legacy Blade app, a React app, or a pure API. It should not need to install Vue, Vite, or Tailwind to run this package. The package acts as a standalone "mini-app" inside the host.
1. Directory & Namespace Structure
Establish the following structure for a package named Vendor/PackageName:
src/ (PHP source, ServiceProviders, Controllers)
routes/ (web.php for Admin/Inertia, api.php for Data)
resources/js/ (Vue components, Pages, Entry point)
resources/css/ (Tailwind, scoped CSS)
resources/views/ (The distinct Blade root template, e.g., app.blade.php)
dist/ or build/ (The output directory for compiled assets, committed to the repo or built on CI)
tests/ (Pest PHP feature tests)
2. Dependency Isolation Strategy (Mandatory)
You must implement a strict separation of concerns:
Own dependencies: The package has its own package.json and vite.config.js.
No Pollution: Do not rely on the host's vite.config.js.
Asset Loading: Do not use the standard @vite Blade directive (which looks at the host's manifest). You must implement a custom Asset Loader Helper that reads the package's specific manifest.json.
3. Configuration Requirements
A. Composer.json (Build Automation)
Define scripts to handle the isolated build process so the user doesn't need to know generic NPM commands.
Add these to the scripts section:
"scripts": {
"build": [
"npm install --prefix .",
"npm run build --prefix ."
],
"dev": "npm run dev",
"test": "./vendor/bin/pest"
}
B. Vite Configuration (vite.config.js)
Configure Vite with these specific settings:
Build Output: Output to a dedicated directory inside the package (e.g., dist).
Manifest: build: { manifest: true } (Essential for the PHP helper to find hashed files).
Rollup Options: Ensure Vue and Inertia are bundled inside the JS file (do not treat them as externals unless specifically shared).
CSS: Extract CSS into a separate file.
C. Service Provider Logic
The boot method must handle:
Routes: Load web (Admin) and api routes separately.
Views: Register namespaced views (vendor::app).
Publishing: Create a publishes tag (e.g., vendor-assets) that copies the local dist/ folder to the host's public/vendor/package-name/ directory.
4. Inertia & Vue Implementation Details
The Root View (app.blade.php)
Do not extend the host layout.
Include a strict mounting point with a unique ID: <div id="vendor-package-ui"></div>.
Use the custom Asset Loader Helper to inject <link> and <script> tags pointing to public/vendor/package-name/....
The Vue Entry Point (app.js)
Use createInertiaApp.
Crucial: Mount to el: '#vendor-package-ui'.
Crucial: Ensure Tailwind uses a prefix (e.g., pkg-) or ensure Preflight is scoped to avoid breaking the host's CSS if they also use Tailwind.
5. Testing Strategy (Pest PHP)
All code generated must include Pest tests (tests/Feature).
Http Tests: verify endpoints return 200.
Inertia Tests: Verify the correct component is rendered:
$this->get(route('package.admin.index'))
->assertOk()
->assertInertia(fn (Assert $page) => $page
->component('Dashboard/Index')
->has('stats')
);
INSTRUCTIONS FOR GENERATION:
When asked to generate code, follow these steps:
Create the file structure.
Generate the composer.json with the build scripts.
Generate the vite.config.js tailored for library mode/app encapsulation.
Generate the PHP AssetLoader trait or class.
Generate the Vue entry point.
Start by acknowledging this architecture and asking for the specific Vendor/Package name to begin scaffolding.Related Skills
laravel
Use when implementing or debugging this Laravel v12 app; leverage Laravel Boost MCP (search-docs, artisan, schema, logs, tinker) and follow project conventions.
laravel-vite
Complete Vite bundling for Laravel - assets, HMR, SSR, frameworks, optimization. Use when configuring frontend build pipeline.
laravel-type-bridge-development
Generate TypeScript/JavaScript type artifacts from Laravel PHP definitions — enums, i18n translations, and enum translator composables.
laravel-expert
Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).
laravel-12-best-practices
Software engineering best practices for Laravel 12.x, covering architecture, Eloquent, testing, security, and the new starter kits.
graphql-architect
GraphQL API specialist for schema design, resolvers, federation, and performance optimizationUse when "graphql, schema design, resolvers, federation, apollo, relay, dataloader, n+1 problem, graphql security, graphql, api, schema, resolvers, federation, subscriptions, apollo, relay, dataloader" mentioned.
enterprise-architecture-patterns
Complete guide for enterprise architecture patterns including domain-driven design, event sourcing, CQRS, saga patterns, API gateway, service mesh, and scalability
documenting-architecture
Use this skill when modifying or creating architecture documentation.
docs-architect
Creates comprehensive technical documentation from existing codebases. Analyzes architecture, design patterns, and implementation details to produce long-form technical manuals and ebooks.
dev-swarm-stage-architecture
Design the complete system architecture including components, data flow, infrastructure, database schema, and API design. Use when starting stage 07 (architecture) or when user asks about system design, tech stack, or database schema.
design-layered-backend-architecture
Design or review a layered backend architecture (routes, controllers, services, repositories) for HTTP APIs and microservices.
datasette-plugins
Writing Datasette plugins using Python and the pluggy plugin system. Use when Claude needs to: (1) Create a new Datasette plugin, (2) Implement plugin hooks like prepare_connection, register_routes, render_cell, etc., (3) Add custom SQL functions, (4) Create custom output renderers, (5) Add authentication or permissions logic, (6) Extend Datasette's UI with menus, actions, or templates, (7) Package a plugin for distribution on PyPI