sluggable-development
Skill by spatie
Guides an AI assistant through making Eloquent model fields sluggable with the spatie/laravel-sluggable package. It is for developers building Laravel projects that need stored slugs and slug-based routes.
Install sluggable-development
Built from the published package, never by AI.
git clone --depth 1 https://github.com/spatie/laravel-sluggable /tmp/laravel-sluggable && mkdir -p ~/.claude/skills && cp -r /tmp/laravel-sluggable/resources/boost/skills/sluggable-development ~/.claude/skills/sluggable-developmentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/spatie/laravel-sluggable /tmp/laravel-sluggable && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/laravel-sluggable/resources/boost/skills/sluggable-development ~/.gemini/antigravity-cli/skills/sluggable-developmentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install sluggable-development in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill covers the spatie/laravel-sluggable package for Laravel. It explains how to make a model field sluggable, either with the #[Sluggable] attribute or with the HasSlug trait and SlugOptions. It also covers writing the migration for the slug column, generating unique slugs with options for separator, length, language, scope and uniqueness, and resolving models through the slug column in routes.
It also describes self-healing URLs, which combine the slug with the primary key. Stale slugs redirect with a 308 response, and the redirect can be customized through the SelfHealing facade. The skill further covers scoped bindings, UUID and ULID models, translatable slugs with spatie/laravel-translatable, and overriding default actions in config/sluggable.php. It is aimed at developers working on Laravel projects.
Written from the project's SKILL.md and checked against it.
What it can do
- Sluggable attributeAdds slug generation to a model with the #[Sluggable] attribute on the class.
- HasSlug trait setupConfigures slugs through getSlugOptions() for callables, closures and custom suffix generators.
- Slug column migrationGuides writing the migration for the slug column, including a unique index.
- Self-healing URLsBuilds route keys as slug-id and redirects stale slugs with a 308 response.
- Translatable slugsStores per-locale slugs with HasTranslatableSlug and a JSON slug column.
- UUID and ULID modelsUses combined traits for slug generation with UUID or ULID identifiers.
- Custom stale URL redirectChanges the stale self-healing response through the SelfHealing facade.
- Action overridesSwaps default slug actions by pointing keys in config/sluggable.php at custom classes.
What you need
- A Laravel project
- PHP
- spatie/laravel-sluggable package
- spatie/laravel-translatable package for translatable slugs
Try asking
- Make the title field of my Post model sluggable using the attribute
- Write the migration to add a unique slug column to my posts table
- Enable self-healing URLs on my Post model and redirect stale slugs
Good to know
- Self-healing requires the HasSlug trait, and the attribute alone throws an error.
- Changing the self-healing separator of an existing model changes its URLs.
- Scoped bindings do not redirect stale slugs.
- Self-healing UUID models need a separator that does not occur inside a UUID, such as --.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: resources/boost/skills/sluggable-development/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB
Alternatives to sluggable-development
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sluggable-development: common questions
Does the sluggable package work with UUID or ULID primary keys?
Yes. The source lists combined traits such as HasSlugWithUuids and HasSlugWithUlids for those identifier types. Translatable variants are also listed.
What happens to old URLs when a slug changes?
With self-healing enabled, a stale slug triggers a 308 redirect to the canonical URL. The default behavior can be replaced through the SelfHealing facade.
Can I use the attribute instead of the trait?
Yes, for most models. The source says the attribute is suited to most models, but features like findBySlug(), translatable slugs and self-healing need the trait.
How do I install sluggable-development?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sluggable-development free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sluggable-development safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sluggable-development?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
