Laravel Migrations And Factories
Generates Laravel database migration files and factory seed data, streamlining development by automating schema creation & initial data population.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-migrations-and-factories npx -- -y @trustedskills/laravel-migrations-and-factories
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-migrations-and-factories": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-migrations-and-factories"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill enables AI agents to generate Laravel migration files and factories for database seeding. It automates the creation of these essential components, streamlining development workflows and ensuring consistent data setup. The agent can create migrations with specified columns and datatypes, as well as factories for creating realistic test data.
When to use it
- Rapid Prototyping: Quickly set up a new Laravel project's database schema when starting a new feature or application.
- Database Refactoring: Generate migration files to modify existing database tables based on evolving requirements.
- Test Data Creation: Easily create factories for populating databases with realistic data for testing purposes.
- Team Onboarding: Standardize the process of creating migrations and factories for new developers joining a Laravel project.
Key capabilities
- Generation of migration files with specified column names, datatypes, and constraints.
- Creation of factory classes to generate fake data for seeding databases.
- Support for common database column types (e.g., string, integer, boolean).
- Automated generation of timestamps in migration files.
Example prompts
- "Create a Laravel migration file for a 'users' table with columns: id (integer, primary key), name (string, 255), email (string, unique)."
- "Generate a factory class for the 'posts' model."
- “Write a migration to add an index on the ‘email’ column of the users table.”
Tips & gotchas
- Ensure you have a basic understanding of Laravel migrations and factories to effectively utilize this skill.
- The agent relies on accurate input regarding desired database schema; double-check generated code for correctness.
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.