[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDYP2RSW5D2TVBJK7XMME2":3,"skill-same:01M7EDYP2RSW5D2TVBJK7XMME2":48},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7EDYP2RSW5D2TVBJK7XMME2","add-migration",null,"Add a new database migration","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fadd-migration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: Add a new database migration\nallowed-tools: Read, Glob, Grep, Edit, Bash(npm:*), Agent\nargument-hint: \u003Cdescription>\n---\n\n# Add Migration\n\nAdd a new database migration to the project, following the established idempotent migration pattern.\n\n**Usage:** `\u002Fadd-migration \u003Cdescription>`\n\nExample: `\u002Fadd-migration Add priority column to tasks table`\n\n**Arguments:** $ARGUMENTS\n\n## Instructions\n\n1. **Read current schema:**\n   - Read `src\u002Fmain\u002Fdb\u002Fmigrations.ts` to understand existing tables, columns, and migration patterns\n   - Identify which migration function to modify: `runGlobalMigrations()` (for `index.db`) or `runProjectMigrations()` (for per-project `\u003CprojectId>.db`)\n   - Most migrations go in `runProjectMigrations()` -- global is only for the projects list\n\n2. **Determine migration type** and apply the correct pattern:\n\n### Column Addition\n```typescript\nconst hasColumn = (db.pragma('table_info(table_name)') as Array\u003C{ name: string }>)\n  .some((column) => column.name === 'new_column');\nif (!hasColumn) {\n  db.exec('ALTER TABLE table_name ADD COLUMN new_column TEXT DEFAULT NULL');\n}\n```\n\n### Table Addition\n```typescript\nconst hasTable = (db.prepare(\"SELECT name FROM sqlite_master WHERE type='table' AND name=?\").get('new_table')) != null;\nif (!hasTable) {\n  db.exec(`CREATE TABLE new_table (\n    id TEXT PRIMARY KEY,\n    ...\n  )`);\n}\n```\n\n### Destructive Changes (column removal, type change, FK changes)\nSQLite has no `ALTER TABLE DROP COLUMN` for older versions. Use table recreation:\n```typescript\ndb.exec(`CREATE TABLE IF NOT EXISTS table_name_new (\n  id TEXT PRIMARY KEY,\n  ... -- new schema without the dropped column\n)`);\ndb.exec('INSERT INTO table_name_new SELECT id, ... FROM table_name');\ndb.exec('DROP TABLE table_name');\ndb.exec('ALTER TABLE table_name_new RENAME TO table_name');\n\u002F\u002F Recreate any indexes\n```\n\n### Data Backfill\n```typescript\nconst rows = db.prepare('SELECT id, config FROM table_name WHERE ...').all() as Array\u003C{ id: string; config: string }>;\nfor (const row of rows) {\n  try {\n    const parsed = JSON.parse(row.config);\n    \u002F\u002F Transform data\n    db.prepare('UPDATE table_name SET config = ? WHERE id = ?').run(JSON.stringify(parsed), row.id);\n  } catch {\n    \u002F\u002F Skip malformed data\n  }\n}\n```\n\n3. **Placement rules:**\n   - Add new migrations AFTER seed logic guards but BEFORE seed `INSERT` statements\n   - Wrap multi-statement migrations in transactions if they involve data movement\n   - Use `db.exec()` for DDL (CREATE, ALTER, DROP)\n   - Use `db.prepare().run()` for parameterized DML (INSERT, UPDATE, DELETE)\n\n4. **Match defaults to TypeScript types:**\n   - Optional fields: `DEFAULT NULL`\n   - Required strings: `DEFAULT ''`\n   - Required numbers: `DEFAULT 0`\n   - Required booleans: `DEFAULT 0` (SQLite uses 0\u002F1)\n\n5. **Update TypeScript types** in `src\u002Fshared\u002Ftypes.ts`:\n   - Add new properties to the relevant interface (e.g., `Task`, `Swimlane`, `SessionRecord`)\n   - Mark optional fields with `?` if `DEFAULT NULL`\n\n6. **Update repository** in `src\u002Fmain\u002Fdb\u002Frepositories\u002F`:\n   - Add the new column to SELECT queries\n   - Add the new column to INSERT\u002FUPDATE queries\n   - Add any new query methods needed\n\n7. **Run typecheck:**\n   - `npm run typecheck`\n   - Fix any type errors\n\n8. **Verify with the `migration-safety` agent (fresh context):**\n   - Spawn the `migration-safety` agent (read-only: `Read`, `Glob`, `Grep`) to confirm the migration is idempotent (guarded by `pragma table_info` \u002F `sqlite_master`), that DEFAULT values align with the TypeScript types, and that repository queries cover the new column.\n   - This is delegation, not forking - the skill stays in the main loop and hands only the verification pass to the auditor for an unbiased check.\n   - Fix any issues the auditor reports before finishing.\n\n9. **Remind about docs:**\n   - Suggest running `\u002Fsync-docs` to update `docs\u002Fdatabase.md`\n\n## Checklist\n\nBefore finalizing, verify:\n- [ ] Migration is idempotent (safe to run multiple times)\n- [ ] `pragma table_info` or `sqlite_master` guard is present\n- [ ] DEFAULT value matches TypeScript type\n- [ ] Repository queries include the new column\n- [ ] TypeScript types updated\n- [ ] Typecheck passes\n\n## Allowed Tools\n\nUse `Read`, `Glob`, `Grep`, `Edit`, `Bash` (for `npm run typecheck`), and `Agent` (to spawn the `migration-safety` verification agent at the end).\n\n**CRITICAL: No chained commands.** Every Bash call must contain exactly ONE command. Never use `&&`, `||`, `|`, or `;`.\n","# Add Migration\n\nAdd a new database migration to the project, following the established idempotent migration pattern.\n\n**Usage:** `\u002Fadd-migration \u003Cdescription>`\n\nExample: `\u002Fadd-migration Add priority column to tasks table`\n\n**Arguments:** $ARGUMENTS\n\n## Instructions\n\n1. **Read current schema:**\n   - Read `src\u002Fmain\u002Fdb\u002Fmigrations.ts` to understand existing tables, columns, and migration patterns\n   - Identify which migration function to modify: `runGlobalMigrations()` (for `index.db`) or `runProjectMigrations()` (for per-project `\u003CprojectId>.db`)\n   - Most migrations go in `runProjectMigrations()` -- global is only for the projects list\n\n2. **Determine migration type** and apply the correct pattern:\n\n### Column Addition\n```typescript\nconst hasColumn = (db.pragma('table_info(table_name)') as Array\u003C{ name: string }>)\n  .some((column) => column.name === 'new_column');\nif (!hasColumn) {\n  db.exec('ALTER TABLE table_name ADD COLUMN new_column TEXT DEFAULT NULL');\n}\n```\n\n### Table Addition\n```typescript\nconst hasTable = (db.prepare(\"SELECT name FROM sqlite_master WHERE type='table' AND name=?\").get('new_table')) != null;\nif (!hasTable) {\n  db.exec(`CREATE TABLE new_table (\n    id TEXT PRIMARY KEY,\n    ...\n  )`);\n}\n```\n\n### Destructive Changes (column removal, type change, FK changes)\nSQLite has no `ALTER TABLE DROP COLUMN` for older versions. Use table recreation:\n```typescript\ndb.exec(`CREATE TABLE IF NOT EXISTS table_name_new (\n  id TEXT PRIMARY KEY,\n  ... -- new schema without the dropped column\n)`);\ndb.exec('INSERT INTO table_name_new SELECT id, ... FROM table_name');\ndb.exec('DROP TABLE table_name');\ndb.exec('ALTER TABLE table_name_new RENAME TO table_name');\n\u002F\u002F Recreate any indexes\n```\n\n### Data Backfill\n```typescript\nconst rows = db.prepare('SELECT id, config FROM table_name WHERE ...').all() as Array\u003C{ id: string; config: string }>;\nfor (const row of rows) {\n  try {\n    const parsed = JSON.parse(row.config);\n    \u002F\u002F Transform data\n    db.prepare('UPDATE table_name SET config = ? WHERE id = ?').run(JSON.stringify(parsed), row.id);\n  } catch {\n    \u002F\u002F Skip malformed data\n  }\n}\n```\n\n3. **Placement rules:**\n   - Add new migrations AFTER seed logic guards but BEFORE seed `INSERT` statements\n   - Wrap multi-statement migrations in transactions if they involve data movement\n   - Use `db.exec()` for DDL (CREATE, ALTER, DROP)\n   - Use `db.prepare().run()` for parameterized DML (INSERT, UPDATE, DELETE)\n\n4. **Match defaults to TypeScript types:**\n   - Optional fields: `DEFAULT NULL`\n   - Required strings: `DEFAULT ''`\n   - Required numbers: `DEFAULT 0`\n   - Required booleans: `DEFAULT 0` (SQLite uses 0\u002F1)\n\n5. **Update TypeScript types** in `src\u002Fshared\u002Ftypes.ts`:\n   - Add new properties to the relevant interface (e.g., `Task`, `Swimlane`, `SessionRecord`)\n   - Mark optional fields with `?` if `DEFAULT NULL`\n\n6. **Update repository** in `src\u002Fmain\u002Fdb\u002Frepositories\u002F`:\n   - Add the new column to SELECT queries\n   - Add the new column to INSERT\u002FUPDATE queries\n   - Add any new query methods needed\n\n7. **Run typecheck:**\n   - `npm run typecheck`\n   - Fix any type errors\n\n8. **Verify with the `migration-safety` agent (fresh context):**\n   - Spawn the `migration-safety` agent (read-only: `Read`, `Glob`, `Grep`) to confirm the migration is idempotent (guarded by `pragma table_info` \u002F `sqlite_master`), that DEFAULT values align with the TypeScript types, and that repository queries cover the new column.\n   - This is delegation, not forking - the skill stays in the main loop and hands only the verification pass to the auditor for an unbiased check.\n   - Fix any issues the auditor reports before finishing.\n\n9. **Remind about docs:**\n   - Suggest running `\u002Fsync-docs` to update `docs\u002Fdatabase.md`\n\n## Checklist\n\nBefore finalizing, verify:\n- [ ] Migration is idempotent (safe to run multiple times)\n- [ ] `pragma table_info` or `sqlite_master` guard is present\n- [ ] DEFAULT value matches TypeScript type\n- [ ] Repository queries include the new column\n- [ ] TypeScript types updated\n- [ ] Typecheck passes\n\n## Allowed Tools\n\nUse `Read`, `Glob`, `Grep`, `Edit`, `Bash` (for `npm run typecheck`), and `Agent` (to spawn the `migration-safety` verification agent at the end).\n\n**CRITICAL: No chained commands.** Every Bash call must contain exactly ONE command. Never use `&&`, `||`, `|`, or `;`.\n",{"description":7,"allowed-tools":24,"argument-hint":25},"Read, Glob, Grep, Edit, Bash(npm:*), Agent","\u003Cdescription>","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fadd-migration",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill add-migration",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill add-migration",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill add-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fadd-migration\u002FSKILL.md",true,[],[49,57,62,69,76,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":56},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":58,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":56},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":56},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":56},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":56},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"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":56},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]