Agent skill
inertia-vue-development
Develops Inertia.js v2 Vue client-side applications. Activates when creating Vue pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions Vue with Inertia, Vue pages, Vue forms, or Vue navigation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/inertia-vue-development
SKILL.md
Inertia Vue Development
When to Apply
Activate this skill when:
- Creating or modifying Vue page components for Inertia
- Working with forms in Vue (using
<Form>oruseForm) - Implementing client-side navigation with
<Link>orrouter - Using v2 features: deferred props, prefetching, or polling
- Building Vue-specific features with the Inertia protocol
Documentation
Use search-docs for detailed Inertia v2 Vue patterns and documentation.
Basic Usage
Page Components Location
Vue page components should be placed in the resources/js/Pages directory.
Page Component Structure
Important: Vue components must have a single root element.
Client-Side Navigation
Basic Link Component
Use <Link> for client-side navigation instead of traditional <a> tags:
Link with Method
Prefetching
Prefetch pages to improve perceived performance:
Programmatic Navigation
Form Handling
Form Component (Recommended)
The recommended way to build forms is with the <Form> component:
<input type="email" name="email" />
<div v-if="errors.email">{{ errors.email }}</div>
<button type="submit" :disabled="processing">
{{ processing ? 'Creating...' : 'Create User' }}
</button>
<div v-if="wasSuccessful">User created!</div>
</Form>
Form Component With All Props
<button type="submit" :disabled="processing">
{{ processing ? 'Saving...' : 'Save' }}
</button>
<progress v-if="progress" :value="progress.percentage" max="100">
{{ progress.percentage }}%
</progress>
<div v-if="wasSuccessful">Saved!</div>
</Form>
Form Component Reset Props
The <Form> component supports automatic resetting:
resetOnError- Reset form data when the request failsresetOnSuccess- Reset form data when the request succeedssetDefaultsOnSuccess- Update default values on success
Use the search-docs tool with a query of form component resetting for detailed guidance.
<button type="submit" :disabled="processing">
Submit
</button>
</Form>
Forms can also be built using the useForm composable for more programmatic control. Use the search-docs tool with a query of useForm helper for guidance.
useForm Composable
For more programmatic control or to follow existing conventions, use the useForm composable:
<input type="email" v-model="form.email" />
<div v-if="form.errors.email">{{ form.errors.email }}</div>
<input type="password" v-model="form.password" />
<div v-if="form.errors.password">{{ form.errors.password }}</div>
<button type="submit" :disabled="form.processing">
Create User
</button>
</form>
Inertia v2 Features
Deferred Props
Use deferred props to load data after initial page render:
Polling
Automatically refresh data at intervals:
WhenVisible (Infinite Scroll)
Load more data when user scrolls to a specific element:
<WhenVisible
v-if="users.next_page_url"
data="users"
:params="{ page: users.current_page + 1 }"
>
<template #fallback>
<div>Loading more...</div>
</template>
</WhenVisible>
</div>
Server-Side Patterns
Server-side patterns (Inertia::render, props, middleware) are covered in inertia-laravel guidelines.
Common Pitfalls
- Using traditional
<a>links instead of Inertia's<Link>component (breaks SPA behavior) - Forgetting that Vue components must have a single root element
- Forgetting to add loading states (skeleton screens) when using deferred props
- Not handling the
undefinedstate of deferred props before data loads - Using
<form>without preventing default submission (use<Form>component or@submit.prevent) - Forgetting to check if
<Form>component is available in your Inertia version
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
riot-games
Manage Riot Games account, track stats across League, Valorant, and more
parcel
Provides comprehensive guidance for Parcel bundler including zero-configuration setup, asset handling, hot module replacement, and production builds. Use when the user asks about Parcel, needs to set up a build tool quickly, or work with Parcel's automatic configuration.
bbs
Manage issues with The Fold's CAS-native BBS (Bulletin Board System). Use for creating, updating, searching, and tracking issues. Invoke when the user wants to create tickets, find work, check issue status, or manage dependencies.
jito-bundles-and-priority-fees
Master Jito bundles for MEV protection and priority fee optimization on Solana - bundle submission, tip strategies, and transaction landing. Use for trading bots, high-priority transactions, and MEV-aware applications.
observability-monitoring-monitor-setup
You are a monitoring and observability expert specializing in implementing comprehensive monitoring solutions. Set up metrics collection, distributed tracing, log aggregation, and create insightful da
makefile-review
Didn't find tool you were looking for?