Laravel Adjacency List
This Laravel skill generates an adjacency list database schema from your Eloquent models, simplifying relationships and improving query performance.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-adjacency-list npx -- -y @trustedskills/laravel-adjacency-list
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-adjacency-list": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-adjacency-list"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill allows AI agents to generate Laravel adjacency list relationships within a database. It can create and manage many-to-many relationships between models, automatically handling the necessary pivot tables and foreign keys. The agent can also retrieve and manipulate these relationships based on provided criteria.
When to use it
- Building complex relational databases in Laravel where multiple entities need to be linked together.
- Automating the creation of database migrations for many-to-many relationships, saving development time.
- Generating seed data that establishes connections between different models within a Laravel application.
- Quickly prototyping and testing database relationship structures.
Key capabilities
- Generates adjacency list relationships in Laravel.
- Creates pivot tables automatically.
- Manages foreign keys for relational integrity.
- Retrieves and manipulates existing relationships.
Example prompts
- "Create a many-to-many relationship between the 'Post' and 'Tag' models."
- "Generate a migration to create a pivot table linking 'Product' and 'Category'."
- "Show me all tags associated with the post titled 'My First Post'."
Tips & gotchas
- Requires a working Laravel development environment.
- The agent assumes familiarity with Laravel model structures; providing clear model names is crucial for accurate relationship generation.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.