Agent skill
wayfinder-development
Activates whenever referencing backend routes in frontend components. Use when importing from @/actions or @/routes, calling Laravel routes from TypeScript, or working with Wayfinder route functions.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/wayfinder-development
SKILL.md
Wayfinder Development
When to Apply
Activate whenever referencing backend routes in frontend components:
- Importing from
@/actions/or@/routes/ - Calling Laravel routes from TypeScript/JavaScript
- Creating links or navigation to backend endpoints
Documentation
Use search-docs for detailed Wayfinder patterns and documentation.
Quick Reference
Generate Routes
Run after route changes if Vite plugin isn't installed:
php artisan wayfinder:generate --no-interaction
For form helpers, use --with-form flag:
php artisan wayfinder:generate --with-form --no-interaction
Import Patterns
// Named imports for tree-shaking (preferred)... import { show, store, update } from '@/actions/App/Http/Controllers/PostController'
// Named route imports... import { show as postShow } from '@/routes/post'
Common Methods
// Get route object... show(1) // { url: "/posts/1", method: "get" }
// Get URL string... show.url(1) // "/posts/1"
// Specific HTTP methods... show.get(1) store.post() update.patch(1) destroy.delete(1)
// Form attributes for HTML forms... store.form() // { action: "/posts", method: "post" }
// Query parameters... show(1, { query: { page: 1 } }) // "/posts/1?page=1"
Wayfinder + Inertia
Use Wayfinder with the <Form> component:
Verification
- Run
php artisan wayfinder:generateto regenerate routes if Vite plugin isn't installed - Check TypeScript imports resolve correctly
- Verify route URLs match expected paths
Common Pitfalls
- Using default imports instead of named imports (breaks tree-shaking)
- Forgetting to regenerate after route changes
- Not using type-safe parameter objects for route model binding
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?