[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X71AWK64P1MY0FS7YEF6HY":3,"skill-same:01M6X71AWK64P1MY0FS7YEF6HY":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":59,"ownerDescription":61,"updatedAt":62,"install":63,"resources":75},"01M6X71AWK64P1MY0FS7YEF6HY","laravel-migration",null,"Use when creating a Laravel migration — table prefixes, column naming, multi-tenant awareness, php artisan make:migration. Other stacks: use stack-native migration tooling.","event4u-app\u002Fagent-config","event4u-app","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199339632?v=4","01M6X5TWBNCQCE1VDKT4E9KF7N","event4u.app","01M6X5TWF4HRM266RG2Q5VVH1X",19,"MIT","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Flaravel-migration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"laravel migration","laravel","migration","professional","when","tenant","artisan","true","naming","native","make","multi","engineering","false","column","tooling","use","table","stack","awareness","2026-11-10 10:12:30",false,"---\nmodel_tier: medium\nname: laravel-migration\ndescription: \"Use when creating a Laravel migration — table prefixes, column naming, multi-tenant awareness, php artisan make:migration. Other stacks: use stack-native migration tooling.\"\ndomain: engineering\nframework: laravel\nworkspaces:\n  - engineering\npacks:\n  - laravel\ntrust:\n  level: professional\ninstall:\n  default: false\n  removable: true\ntriggers:\n  - phrase: \"make:migration\"\n  - phrase: \"laravel migration\"\n---\n\n# laravel-migration\n\n## When to use\n\nUse this skill when the user asks to create a database migration, add a column, create a table, or modify the schema.\n\n## Procedure: Create a migration\n\n1. **Read conventions** — Check `.\u002Fagents\u002F` and `AGENTS.md` for table prefixes, column naming, multi-tenant setup.\n2. **Generate migration** — `php artisan make:migration create_xyz_table` (or add_column, etc.).\n3. **Write schema** — Follow naming conventions, add indexes for WHERE\u002FJOIN columns, use `decimal` for money.\n4. **Verify** — Run migration (`php artisan migrate`), then rollback (`php artisan migrate:rollback`) to confirm reversibility.\n\n## All projects\n\n- Use `decimal` for money — never `float`.\n- Add indexes for columns used in WHERE clauses and JOINs.\n- Match existing column naming patterns in the same table or domain.\n- Declare recovery: a reversible `down()`, or a roll-forward plan in the file\n  (see § The recovery contract below). Silence is the violation.\n\n## Laravel projects\n\n### Multi-database architecture\n\nSome projects use multiple database connections. Check `config\u002Fdatabase.php` for connections.\n\n| Check | How |\n|---|---|\n| Available connections | `config\u002Fdatabase.php` → `'connections'` array |\n| Migration directories | `database\u002Fmigrations\u002F` (default), check for additional directories |\n| Custom migrate commands | `php artisan list migrate` — look for project-specific commands |\n\n**Always determine which database the table belongs to before creating a migration.**\n\n### API database migration\n\n```bash\nphp artisan make:migration create_example_table\n```\n\n```php\nreturn new class extends Migration {\n    public function up(): void\n    {\n        Schema::connection('api_database')->create('example_table', function (Blueprint $table): void {\n            $table->id();\n            \u002F\u002F Choose the referential action; never inherit it from a\n            \u002F\u002F template. See \"Referential action is a decision\" below.\n            $table->foreignId('customer_id')->constrained()\n                ->cascadeOnDelete(); \u002F\u002F rows here are expendable WITHOUT their customer\n            $table->string('name');\n            $table->boolean('is_active')->default(true); \u002F\u002F no index: a boolean alone rarely earns one\n            $table->timestamps();\n            $table->softDeletes();\n        });\n    }\n\n    public function down(): void\n    {\n        Schema::connection('api_database')->dropIfExists('example_table');\n    }\n};\n```\n\n### Other connections\n\nTable prefixes and custom `make:migration:*` generators are project conventions — read them from the project's `agents\u002F` docs.\n\n### Adding a column (with explicit connection)\n\n```php\nreturn new class extends Migration {\n    public function up(): void\n    {\n        Schema::connection('my_connection')->table('example', function (Blueprint $table): void {\n            $table->unsignedInteger('new_column')->after('existing_column');\n        });\n    }\n\n    public function down(): void\n    {\n        Schema::connection('my_connection')->table('example', function (Blueprint $table): void {\n            $table->dropColumn('new_column');\n        });\n    }\n};\n```\n\n### Running migrations\n\n```bash\n# Default connection\nphp artisan migrate                           # development\nphp artisan migrate --env=testing             # testing\n\n# Multi-tenant \u002F custom — check AGENTS.md or module docs for project-specific commands\n# Example: php artisan migrate:tenants, php artisan migrate --database=tenant\n```\n\n## Composer \u002F legacy projects\n\n- Check where existing migrations live (e.g. `core\u002Fmigrations\u002F`).\n- Use the existing migration format and naming conventions in the project.\n\n## Column conventions\n\n- Foreign keys: `{entity}_id` (e.g. `customer_id`, `user_id`)\n- Booleans: `is_` prefix (e.g. `is_active`, `is_default`)\n- Dates: descriptive suffix (e.g. `upload_date`, `deleted_at`)\n- Always use `unsignedBigInteger` for foreign keys referencing `id()` columns\n- Use `->after('column')` to place new columns logically\n\n## Output format\n\n1. Migration file with up() and down() methods\n2. Model updates if columns or relationships changed\n\n### The recovery contract — one obligation, two branches\n\nEvery migration declares **one** of these, and silence is the violation:\n\n1. a `down()` that restores the prior state; **or**\n2. a **roll-forward recovery plan, written in the migration file itself**, for\n   the cases where restoration is genuinely impossible — a completed\n   destructive backfill, a dropped column whose data is gone.\n\nThe second branch is not a lighter obligation. A migration taking it records, in\nits own file comments, all three of:\n\n1. **why restoration is impossible**, with the evidence — the data was checked\n   and is unrecoverable, not assumed to be;\n2. **the ordered recovery procedure** — the steps, the inputs each needs, and\n   the criteria that say recovery succeeded;\n3. **the responsible recovery owner**.\n\nVague intent or missing detail is the violation. The plan lives in the migration\nfile and lands in the same diff, because a plan documented \"later\" somewhere else\nis a plan nobody can review at the moment it matters.\n\n## Referential action is a decision\n\nThe template above labels its `onDelete('cascade')` as **one branch**, not a\ndefault. Copying it unchanged is how a delete of one customer silently removes\nrecords that had independent value.\n\n| The child row, without its parent, is | Action | What happens |\n|---|---|---|\n| **expendable** — it only means something as part of the parent | `cascade` | deleted with the parent |\n| **self-valued** — it is a record in its own right (an invoice, an audit row, a payment) | `restrict` (or `no action`) | the parent delete FAILS until the child is dealt with |\n| **survivable** — it outlives the parent with the link removed | `set null` | the column is nulled; requires a nullable column |\n\nTwo consequences worth stating because they are the ones missed:\n\n- `restrict` is the safe default for anything a finance, audit, or legal reader\n  would expect to still exist. A failed delete is a conversation; a cascaded\n  delete is a recovery.\n- `set null` needs the foreign-key column to be nullable, and it needs the\n  application to handle the orphan state. Choosing it without both is choosing a\n  constraint error later.\n\nSoft deletes do **not** interact with this: `onDelete` fires on a real `DELETE`,\nso a soft-deleting parent never triggers it. If the model soft-deletes, the\nreferential action describes what happens on a force-delete or a purge, and that\nis the case to decide against. A unique column on a soft-deleting table needs the\nengine-specific form in\n[`eloquent.md` § Unique constraints under soft delete](..\u002F..\u002F..\u002Fdocs\u002Fguidelines\u002Fphp\u002Feloquent.md#unique-constraints-under-soft-delete).\n\n## Gotcha\n\n- Always check if the table\u002Fcolumn already exists before creating the migration — the model doesn't always check.\n- Multi-tenant migrations need special handling — customer tables use different prefixes.\n- Don't modify existing migrations that have been deployed — create a new migration instead.\n- The model forgets `->after('column')` for column ordering — MariaDB respects it, and it matters for readability.\n\n## Do NOT\n\n- Do NOT create migrations without specifying the correct connection when multiple databases exist.\n- Do NOT create tables without checking the project's naming conventions (prefixes, casing).\n- Do NOT use raw SQL in migrations when Schema builder works.\n- Do NOT leave recovery undeclared — ship a `down()` that restores the prior\n  state, or the three-part roll-forward plan in the migration file. Neither is\n  optional; choosing between them is.\n- Do NOT use `float` for money — use `decimal`.\n- Do NOT forget indexes on foreign keys and frequently filtered columns.\n\n## Adversarial review\n\nBefore finalizing a migration, run the **`adversarial-review`** skill.\nFocus on the \"Database migrations\" attack questions: Can this destroy data? Is rollback possible?\n\n## Auto-trigger keywords\n\n- database migration\n- create migration\n- table prefix\n- column naming\n- add column\n- create table\n","# laravel-migration\n\n## When to use\n\nUse this skill when the user asks to create a database migration, add a column, create a table, or modify the schema.\n\n## Procedure: Create a migration\n\n1. **Read conventions** — Check `.\u002Fagents\u002F` and `AGENTS.md` for table prefixes, column naming, multi-tenant setup.\n2. **Generate migration** — `php artisan make:migration create_xyz_table` (or add_column, etc.).\n3. **Write schema** — Follow naming conventions, add indexes for WHERE\u002FJOIN columns, use `decimal` for money.\n4. **Verify** — Run migration (`php artisan migrate`), then rollback (`php artisan migrate:rollback`) to confirm reversibility.\n\n## All projects\n\n- Use `decimal` for money — never `float`.\n- Add indexes for columns used in WHERE clauses and JOINs.\n- Match existing column naming patterns in the same table or domain.\n- Declare recovery: a reversible `down()`, or a roll-forward plan in the file\n  (see § The recovery contract below). Silence is the violation.\n\n## Laravel projects\n\n### Multi-database architecture\n\nSome projects use multiple database connections. Check `config\u002Fdatabase.php` for connections.\n\n| Check | How |\n|---|---|\n| Available connections | `config\u002Fdatabase.php` → `'connections'` array |\n| Migration directories | `database\u002Fmigrations\u002F` (default), check for additional directories |\n| Custom migrate commands | `php artisan list migrate` — look for project-specific commands |\n\n**Always determine which database the table belongs to before creating a migration.**\n\n### API database migration\n\n```bash\nphp artisan make:migration create_example_table\n```\n\n```php\nreturn new class extends Migration {\n    public function up(): void\n    {\n        Schema::connection('api_database')->create('example_table', function (Blueprint $table): void {\n            $table->id();\n            \u002F\u002F Choose the referential action; never inherit it from a\n            \u002F\u002F template. See \"Referential action is a decision\" below.\n            $table->foreignId('customer_id')->constrained()\n                ->cascadeOnDelete(); \u002F\u002F rows here are expendable WITHOUT their customer\n            $table->string('name');\n            $table->boolean('is_active')->default(true); \u002F\u002F no index: a boolean alone rarely earns one\n            $table->timestamps();\n            $table->softDeletes();\n        });\n    }\n\n    public function down(): void\n    {\n        Schema::connection('api_database')->dropIfExists('example_table');\n    }\n};\n```\n\n### Other connections\n\nTable prefixes and custom `make:migration:*` generators are project conventions — read them from the project's `agents\u002F` docs.\n\n### Adding a column (with explicit connection)\n\n```php\nreturn new class extends Migration {\n    public function up(): void\n    {\n        Schema::connection('my_connection')->table('example', function (Blueprint $table): void {\n            $table->unsignedInteger('new_column')->after('existing_column');\n        });\n    }\n\n    public function down(): void\n    {\n        Schema::connection('my_connection')->table('example', function (Blueprint $table): void {\n            $table->dropColumn('new_column');\n        });\n    }\n};\n```\n\n### Running migrations\n\n```bash\n# Default connection\nphp artisan migrate                           # development\nphp artisan migrate --env=testing             # testing\n\n# Multi-tenant \u002F custom — check AGENTS.md or module docs for project-specific commands\n# Example: php artisan migrate:tenants, php artisan migrate --database=tenant\n```\n\n## Composer \u002F legacy projects\n\n- Check where existing migrations live (e.g. `core\u002Fmigrations\u002F`).\n- Use the existing migration format and naming conventions in the project.\n\n## Column conventions\n\n- Foreign keys: `{entity}_id` (e.g. `customer_id`, `user_id`)\n- Booleans: `is_` prefix (e.g. `is_active`, `is_default`)\n- Dates: descriptive suffix (e.g. `upload_date`, `deleted_at`)\n- Always use `unsignedBigInteger` for foreign keys referencing `id()` columns\n- Use `->after('column')` to place new columns logically\n\n## Output format\n\n1. Migration file with up() and down() methods\n2. Model updates if columns or relationships changed\n\n### The recovery contract — one obligation, two branches\n\nEvery migration declares **one** of these, and silence is the violation:\n\n1. a `down()` that restores the prior state; **or**\n2. a **roll-forward recovery plan, written in the migration file itself**, for\n   the cases where restoration is genuinely impossible — a completed\n   destructive backfill, a dropped column whose data is gone.\n\nThe second branch is not a lighter obligation. A migration taking it records, in\nits own file comments, all three of:\n\n1. **why restoration is impossible**, with the evidence — the data was checked\n   and is unrecoverable, not assumed to be;\n2. **the ordered recovery procedure** — the steps, the inputs each needs, and\n   the criteria that say recovery succeeded;\n3. **the responsible recovery owner**.\n\nVague intent or missing detail is the violation. The plan lives in the migration\nfile and lands in the same diff, because a plan documented \"later\" somewhere else\nis a plan nobody can review at the moment it matters.\n\n## Referential action is a decision\n\nThe template above labels its `onDelete('cascade')` as **one branch**, not a\ndefault. Copying it unchanged is how a delete of one customer silently removes\nrecords that had independent value.\n\n| The child row, without its parent, is | Action | What happens |\n|---|---|---|\n| **expendable** — it only means something as part of the parent | `cascade` | deleted with the parent |\n| **self-valued** — it is a record in its own right (an invoice, an audit row, a payment) | `restrict` (or `no action`) | the parent delete FAILS until the child is dealt with |\n| **survivable** — it outlives the parent with the link removed | `set null` | the column is nulled; requires a nullable column |\n\nTwo consequences worth stating because they are the ones missed:\n\n- `restrict` is the safe default for anything a finance, audit, or legal reader\n  would expect to still exist. A failed delete is a conversation; a cascaded\n  delete is a recovery.\n- `set null` needs the foreign-key column to be nullable, and it needs the\n  application to handle the orphan state. Choosing it without both is choosing a\n  constraint error later.\n\nSoft deletes do **not** interact with this: `onDelete` fires on a real `DELETE`,\nso a soft-deleting parent never triggers it. If the model soft-deletes, the\nreferential action describes what happens on a force-delete or a purge, and that\nis the case to decide against. A unique column on a soft-deleting table needs the\nengine-specific form in\n[`eloquent.md` § Unique constraints under soft delete](..\u002F..\u002F..\u002Fdocs\u002Fguidelines\u002Fphp\u002Feloquent.md#unique-constraints-under-soft-delete).\n\n## Gotcha\n\n- Always check if the table\u002Fcolumn already exists before creating the migration — the model doesn't always check.\n- Multi-tenant migrations need special handling — customer tables use different prefixes.\n- Don't modify existing migrations that have been deployed — create a new migration instead.\n- The model forgets `->after('column')` for column ordering — MariaDB respects it, and it matters for readability.\n\n## Do NOT\n\n- Do NOT create migrations without specifying the correct connection when multiple databases exist.\n- Do NOT create tables without checking the project's naming conventions (prefixes, casing).\n- Do NOT use raw SQL in migrations when Schema builder works.\n- Do NOT leave recovery undeclared — ship a `down()` that restores the prior\n  state, or the three-part roll-forward plan in the migration file. Neither is\n  optional; choosing between them is.\n- Do NOT use `float` for money — use `decimal`.\n- Do NOT forget indexes on foreign keys and frequently filtered columns.\n\n## Adversarial review\n\nBefore finalizing a migration, run the **`adversarial-review`** skill.\nFocus on the \"Database migrations\" attack questions: Can this destroy data? Is rollback possible?\n\n## Auto-trigger keywords\n\n- database migration\n- create migration\n- table prefix\n- column naming\n- add column\n- create table\n",{"name":5,"packs":44,"trust":45,"domain":31,"install":46,"triggers":48,"framework":20,"model_tier":52,"workspaces":53,"description":7},[20],{"level":22},{"default":40,"removable":47},true,[49,51],{"phrase":50},"make:migration",{"phrase":19},"medium",[31],"main","12bd765ce1d800501d45dfb8232102793af01290","src\u002Fskills\u002Flaravel-migration",1,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config","https:\u002F\u002Fevent4u.app","https:\u002F\u002Fgithub.com\u002Fevent4u-app","Your events in your hand","2026-11-14 02:29:41",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":47},[65,68,71],{"tool":66,"command":67},"npx","npx skills add event4u-app\u002Fagent-config --skill laravel-migration",{"tool":69,"command":70},"bunx","bunx skills add event4u-app\u002Fagent-config --skill laravel-migration",{"tool":72,"command":73},"pnpm","pnpm dlx skills add event4u-app\u002Fagent-config --skill laravel-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Flaravel-migration\u002FSKILL.md",[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Ftriggers.json","REFERENCE","参考文档",3156,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Flaravel-migration\u002Fevals\u002Ftriggers.json",[83,96,108,119,130,139],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":39},"01M6X84PK96XBPENXH66JCTSD1","unknown-key-fixture","Declares a key the schema does not know.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Funknown-key\u002FSKILL.md",[],[90,91,92,93,94,95],"unknown key fixture","Unknown key","fixture","unknown","schema","package",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":39},"01M6X84HW7NAHZ7GZMQ9RXK1XJ","portable-fixture","Declares only semantics the MCP-lite carrier transports whole.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fportable\u002FSKILL.md",[],[92,103,104,105,106,95,107],"portable","portable fixture","engineer","only","MCP",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":39},"01M6X84F29FE0RGGZ1ZTFGZTX2","non-portable-fixture","Declares a runtime semantic the carrier drops.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fnon-portable\u002FSKILL.md",[],[104,115,103,92,116,117,118,95],"non portable fixture","semantic","high","runtime",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":39},"01M6X848F706PT9MDCX75JKJ6B","candidate-zero-width","A candidate whose prose carries an invisible joiner.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fzero-width-injection\u002FSKILL.md",[],[126,127,128,129],"candidate zero width","candidate","ZeRO","prose",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":39},"01M6X841SSC2T31VDF41SA6DG1","candidate-disclosure-suppression","A candidate whose prose tells the agent to withhold from the user.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdisclosure-suppression\u002FSKILL.md",[],[137,127,129,138],"candidate disclosure suppression","user",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":39},"01M6X83TFS5AGPBPVTQNWP0BB3","candidate-dangerous-frontmatter","A candidate claiming an unscoped tool grant and a permission bypass.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdangerous-frontmatter\u002FSKILL.md",[],[146,127,147,148,149,150],"candidate dangerous frontmatter","frontmatter","shell","permission","tool"]