[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEWX6MQMTYHMF3RBSFP37G":3,"skill-same:01M6EEWX6MQMTYHMF3RBSFP37G":70},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":27,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6EEWX6MQMTYHMF3RBSFP37G","electric-sql-sdk",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Felectric-sql-sdk\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[28,29,30],"sdk","sql","electric sql sdk","2026-11-10 10:12:30",false,"# Electric SQL — Sync Engine for Postgres\n\nYou are an expert in Electric SQL, the sync engine that streams Postgres data to local apps in real-time. You help developers build local-first applications where data syncs from Postgres to client-side SQLite\u002FPGlite automatically — enabling instant reads, offline support, and real-time multi-user collaboration using Postgres as the single source of truth with Shape-based partial replication.\n\n## Core Capabilities\n\n### Shape Subscriptions\n\n```typescript\nimport { ShapeStream, Shape } from \"@electric-sql\u002Fclient\";\n\n\u002F\u002F Stream a subset of Postgres data to the client\nconst stream = new ShapeStream({\n  url: \"http:\u002F\u002Flocalhost:3000\u002Fv1\u002Fshape\",\n  params: {\n    table: \"tasks\",\n    where: `workspace_id = '${workspaceId}'`,  \u002F\u002F Only sync relevant data\n    columns: [\"id\", \"title\", \"status\", \"assignee\", \"updated_at\"],\n  },\n});\n\n\u002F\u002F Shape keeps a local copy in sync with Postgres\nconst shape = new Shape(stream);\n\n\u002F\u002F Get current data (instant — no network)\nconst tasks = shape.currentValue;\nconsole.log([...tasks.values()]);          \u002F\u002F Map\u003Cstring, Task>\n\n\u002F\u002F React to changes\nshape.subscribe((data) => {\n  console.log(\"Tasks updated:\", [...data.values()]);\n  \u002F\u002F Fires whenever Postgres data changes (insert, update, delete)\n});\n```\n\n### React Integration\n\n```tsx\nimport { useShape } from \"@electric-sql\u002Freact\";\n\nfunction TaskList({ workspaceId }: { workspaceId: string }) {\n  \u002F\u002F Automatically syncs with Postgres in real-time\n  const { data: tasks, isLoading } = useShape\u003CTask>({\n    url: `${import.meta.env.VITE_ELECTRIC_URL}\u002Fv1\u002Fshape`,\n    params: {\n      table: \"tasks\",\n      where: `workspace_id = '${workspaceId}'`,\n    },\n  });\n\n  if (isLoading) return \u003CSpinner \u002F>;\n\n  return (\n    \u003Cul>\n      {tasks.map((task) => (\n        \u003Cli key={task.id}>\n          \u003Cspan>{task.title}\u003C\u002Fspan>\n          \u003Cspan className={`badge badge-${task.status}`}>{task.status}\u003C\u002Fspan>\n        \u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  );\n}\n\n\u002F\u002F Writes go through your API → Postgres → Electric syncs to all clients\nasync function createTask(title: string, workspaceId: string) {\n  await fetch(\"\u002Fapi\u002Ftasks\", {\n    method: \"POST\",\n    body: JSON.stringify({ title, workspaceId }),\n  });\n  \u002F\u002F Electric automatically syncs the new task to all connected clients\n}\n```\n\n### Server Setup\n\n```typescript\n\u002F\u002F Electric sync service (Docker)\n\u002F\u002F docker run -e DATABASE_URL=postgresql:\u002F\u002F... -p 3000:3000 electricsql\u002Felectric\n\n\u002F\u002F Your API — writes go to Postgres as normal\napp.post(\"\u002Fapi\u002Ftasks\", async (req, res) => {\n  const task = await db.query(\n    `INSERT INTO tasks (title, workspace_id, status, assignee)\n     VALUES ($1, $2, 'todo', $3) RETURNING *`,\n    [req.body.title, req.body.workspaceId, req.user.id],\n  );\n  res.json(task.rows[0]);\n  \u002F\u002F Electric detects the change via Postgres logical replication\n  \u002F\u002F and syncs to all subscribed clients automatically\n});\n```\n\n## Installation\n\n```bash\nnpm install @electric-sql\u002Fclient @electric-sql\u002Freact\n\n# Server\ndocker run -p 3000:3000 \\\n  -e DATABASE_URL=\"postgresql:\u002F\u002Fuser:pass@host:5432\u002Fdb\" \\\n  electricsql\u002Felectric\n```\n\n## Best Practices\n\n1. **Shapes for partial sync** — Only sync data the user needs; `where` clause filters at the server\n2. **Postgres is truth** — Write to Postgres normally; Electric handles replication to clients\n3. **Instant reads** — Data is local; no network roundtrip for reads; UI updates in \u003C1ms\n4. **Real-time updates** — Changes in Postgres stream to all subscribed clients automatically\n5. **Column selection** — Specify `columns` to minimize data transfer; don't sync large text fields\n6. **Write-through** — Writes go to your API → Postgres; don't write directly to the shape\n7. **Offline support** — Cache shape data in IndexedDB\u002FSQLite; app works without network\n8. **Multi-tenant** — Use `where` clause to scope shapes per workspace\u002Fuser; secure data isolation\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Felectric-sql-sdk",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill electric-sql-sdk",{"tool":50,"command":51},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill electric-sql-sdk",{"tool":53,"command":54},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill electric-sql-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Felectric-sql-sdk\u002FSKILL.md",true,[58,64],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"executable_recalc.py","SCRIPT","脚本",6408,"https:\u002F\u002Fgithub.com\u002FThamielis\u002F.agents\u002Fblob\u002Fmain\u002Fskills\u002Fdocument-skills\u002Fxlsx\u002Fexecutable_recalc.py",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"LICENSE.txt","LICENSE","许可证",1467,"https:\u002F\u002Fgithub.com\u002FThamielis\u002F.agents\u002Fblob\u002Fmain\u002Fskills\u002Fdocument-skills\u002Fxlsx\u002FLICENSE.txt",[71,83,93,101,107,114],{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":79,"publishedAt":31},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[80,81,82],"model","model hierarchy","model hierarchy skill",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":89,"publishedAt":31},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[88],{"categoryNo":77,"categoryName":78,"taxonomyType":20,"taxonomyTypeDesc":21},[90,91,92],"MCP","zoom","zoom mcp",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":31},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[28,99,100,91],"zoom apps sdk","apps",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":31},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":113,"publishedAt":31},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[112],{"categoryNo":77,"categoryName":78,"taxonomyType":20,"taxonomyTypeDesc":21},[109],{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":31},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[116]]