Laravel Boost skill | laravel-sluggable | Spatie

 SPATIE

laravel-sluggable
=================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-sluggable](https://spatie.be/docs/laravel-sluggable/v4)  Laravel Boost skill

 Version   v4

 Other versions for crawler [v4](https://spatie.be/docs/laravel-sluggable/v4)

- [ Introduction ](https://spatie.be/docs/laravel-sluggable/v4/introduction)
- [ Support us ](https://spatie.be/docs/laravel-sluggable/v4/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-sluggable/v4/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-sluggable/v4/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-sluggable/v4/questions-issues)
- [ Translatable slugs ](https://spatie.be/docs/laravel-sluggable/v4/translatable-slugs)
- [ Laravel Boost skill ](https://spatie.be/docs/laravel-sluggable/v4/laravel-boost-skill)
- [ Changelog ](https://spatie.be/docs/laravel-sluggable/v4/changelog)

Basic usage
-----------

- [ Using the Sluggable attribute ](https://spatie.be/docs/laravel-sluggable/v4/basic-usage/using-the-attribute)
- [ Using the HasSlug trait ](https://spatie.be/docs/laravel-sluggable/v4/basic-usage/using-the-has-slug-trait)
- [ Using slugs in routes ](https://spatie.be/docs/laravel-sluggable/v4/basic-usage/using-slugs-in-routes)
- [ Finding models by slug ](https://spatie.be/docs/laravel-sluggable/v4/basic-usage/finding-models-by-slug)

Configuration
-------------

- [ Source fields ](https://spatie.be/docs/laravel-sluggable/v4/configuration/source-fields)
- [ Separator, length, and language ](https://spatie.be/docs/laravel-sluggable/v4/configuration/separator-length-and-language)
- [ Uniqueness ](https://spatie.be/docs/laravel-sluggable/v4/configuration/uniqueness)
- [ When slugs are generated ](https://spatie.be/docs/laravel-sluggable/v4/configuration/generation-rules)
- [ Scoped uniqueness (trait only) ](https://spatie.be/docs/laravel-sluggable/v4/configuration/scopes)

Self-healing URLs
-----------------

- [ Overview ](https://spatie.be/docs/laravel-sluggable/v4/self-healing-urls/overview)
- [ Customizing the redirect ](https://spatie.be/docs/laravel-sluggable/v4/self-healing-urls/customizing-the-redirect)

Advanced usage
--------------

- [ Overriding the underlying actions ](https://spatie.be/docs/laravel-sluggable/v4/advanced-usage/overriding-actions)

 Laravel Boost skill
===================

###  On this page

1. [ Discovery ](#content-discovery)
2. [ What the skill covers ](#content-what-the-skill-covers)

This package ships a [Laravel Boost](https://github.com/laravel/boost) skill that teaches any Boost-aware AI assistant (Claude Code, Cursor, Copilot CLI, Gemini CLI, and others supported by Boost) how to use `laravel-sluggable` correctly.

Discovery
-----------------------------------------------------------------------------------

When your project has both `spatie/laravel-sluggable` and `laravel/boost` installed, Boost's `SkillComposer` automatically discovers the skill at `vendor/spatie/laravel-sluggable/resources/boost/skills/sluggable-development/`. No extra configuration is required.

Running Boost's install command writes the skill into your configured agent's skills directory (for example, `.claude/skills/sluggable-development/` for Claude Code or `.agents/skills/sluggable-development/` for Gemini CLI).

What the skill covers
-----------------------------------------------------------------------------------------------------------------------

The skill activates when a query mentions slugs, permalinks, the `HasSlug` trait, the `HasTranslatableSlug` trait, the `#[Sluggable]` attribute, `SlugOptions`, `findBySlug`, self-healing URLs, or stale slug redirects. It guides the assistant through:

- Choosing between the `#[Sluggable]` attribute and the `HasSlug` trait for a given model.
- Generating the migration for a slug column, including the `nullable` then unique backfill pattern and the JSON column requirement for translatable slugs.
- Configuring separator, length, language, uniqueness behavior, and scope.
- Wiring implicit route binding through the slug column.
- Enabling self-healing URLs, customizing the separator, and overriding the `301` redirect through the `Sluggable` facade.
- Swapping the default action classes via `config/sluggable.php`.

The full skill content lives at [`resources/boost/skills/sluggable-development/SKILL.md`](https://github.com/spatie/laravel-sluggable/blob/main/resources/boost/skills/sluggable-development/SKILL.md) in the package repository.
