[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K0DS0ZAJFCKVTD4JAEDGQ8":3,"skill-same:01M6K0DS0ZAJFCKVTD4JAEDGQ8":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":13,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M6K0DS0ZAJFCKVTD4JAEDGQ8","writing-dev-server-tests",null,"Guides writing HMR\u002FDev Server tests in test\u002Fbake\u002F. Use when creating or modifying dev server, hot reloading, or bundling tests.","sigitpoerwo\u002Frepoworkspace_zahra","sigitpoerwo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F260207224?v=4","01M6K000PB6NA0N6SQ7VFMEAFZ","01M6K000V4N0CEHNPPQA9TNQNX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-dev-server-tests\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26],"writing","dev","server","tests","writing dev server tests","test","use","guides","bundling","2026-11-10 10:12:30",false,"---\nname: writing-dev-server-tests\ndescription: Guides writing HMR\u002FDev Server tests in test\u002Fbake\u002F. Use when creating or modifying dev server, hot reloading, or bundling tests.\n---\n\n# Writing HMR\u002FDev Server Tests\n\nDev server tests validate hot-reloading robustness and reliability.\n\n## File Structure\n\n- `test\u002Fbake\u002Fbake-harness.ts` - shared utilities: `devTest`, `prodTest`, `devAndProductionTest`, `Dev` class, `Client` class\n- `test\u002Fbake\u002Fclient-fixture.mjs` - subprocess for `Client` (page loading, IPC queries)\n- `test\u002Fbake\u002Fdev\u002F*.test.ts` - dev server and hot reload tests\n- `test\u002Fbake\u002Fdev-and-prod.ts` - tests running on both dev and production mode\n\n## Test Categories\n\n- `bundle.test.ts` - DevServer-specific bundling bugs\n- `css.test.ts` - CSS bundling issues\n- `plugins.test.ts` - development mode plugins\n- `ecosystem.test.ts` - library compatibility (prefer concrete bugs over full package tests)\n- `esm.test.ts` - ESM features in development\n- `html.test.ts` - HTML file handling\n- `react-spa.test.ts` - React, react-refresh transform, server components\n- `sourcemap.test.ts` - source map correctness\n\n## devTest Basics\n\n```ts\nimport { devTest, emptyHtmlFile } from \"..\u002Fbake-harness\";\n\ndevTest(\"html file is watched\", {\n  files: {\n    \"index.html\": emptyHtmlFile({\n      scripts: [\"\u002Fscript.ts\"],\n      body: \"\u003Ch1>Hello\u003C\u002Fh1>\",\n    }),\n    \"script.ts\": `console.log(\"hello\");`,\n  },\n  async test(dev) {\n    await dev.fetch(\"\u002F\").expect.toInclude(\"\u003Ch1>Hello\u003C\u002Fh1>\");\n    await dev.patch(\"index.html\", { find: \"Hello\", replace: \"World\" });\n    await dev.fetch(\"\u002F\").expect.toInclude(\"\u003Ch1>World\u003C\u002Fh1>\");\n\n    await using c = await dev.client(\"\u002F\");\n    await c.expectMessage(\"hello\");\n\n    await c.expectReload(async () => {\n      await dev.patch(\"index.html\", { find: \"World\", replace: \"Bar\" });\n    });\n    await c.expectMessage(\"hello\");\n  },\n});\n```\n\n## Key APIs\n\n- **`files`**: Initial filesystem state\n- **`dev.fetch()`**: HTTP requests\n- **`dev.client()`**: Opens browser instance\n- **`dev.write\u002Fpatch\u002Fdelete`**: Filesystem mutations (wait for hot-reload automatically)\n- **`c.expectMessage()`**: Assert console.log output\n- **`c.expectReload()`**: Wrap code that causes hard reload\n\n**Important**: Use `dev.write\u002Fpatch\u002Fdelete` instead of `node:fs` - they wait for hot-reload.\n\n## Testing Errors\n\n```ts\ndevTest(\"import then create\", {\n  files: {\n    \"index.html\": `\u003C!DOCTYPE html>\u003Chtml>\u003Chead>\u003C\u002Fhead>\u003Cbody>\u003Cscript type=\"module\" src=\"\u002Fscript.ts\">\u003C\u002Fscript>\u003C\u002Fbody>\u003C\u002Fhtml>`,\n    \"script.ts\": `import data from \".\u002Fdata\"; console.log(data);`,\n  },\n  async test(dev) {\n    const c = await dev.client(\"\u002F\", {\n      errors: ['script.ts:1:18: error: Could not resolve: \".\u002Fdata\"'],\n    });\n    await c.expectReload(async () => {\n      await dev.write(\"data.ts\", \"export default 'data';\");\n    });\n    await c.expectMessage(\"data\");\n  },\n});\n```\n\nSpecify expected errors with the `errors` option:\n\n```ts\nawait dev.delete(\"other.ts\", {\n  errors: ['index.ts:1:16: error: Could not resolve: \".\u002Fother\"'],\n});\n```\n","# Writing HMR\u002FDev Server Tests\n\nDev server tests validate hot-reloading robustness and reliability.\n\n## File Structure\n\n- `test\u002Fbake\u002Fbake-harness.ts` - shared utilities: `devTest`, `prodTest`, `devAndProductionTest`, `Dev` class, `Client` class\n- `test\u002Fbake\u002Fclient-fixture.mjs` - subprocess for `Client` (page loading, IPC queries)\n- `test\u002Fbake\u002Fdev\u002F*.test.ts` - dev server and hot reload tests\n- `test\u002Fbake\u002Fdev-and-prod.ts` - tests running on both dev and production mode\n\n## Test Categories\n\n- `bundle.test.ts` - DevServer-specific bundling bugs\n- `css.test.ts` - CSS bundling issues\n- `plugins.test.ts` - development mode plugins\n- `ecosystem.test.ts` - library compatibility (prefer concrete bugs over full package tests)\n- `esm.test.ts` - ESM features in development\n- `html.test.ts` - HTML file handling\n- `react-spa.test.ts` - React, react-refresh transform, server components\n- `sourcemap.test.ts` - source map correctness\n\n## devTest Basics\n\n```ts\nimport { devTest, emptyHtmlFile } from \"..\u002Fbake-harness\";\n\ndevTest(\"html file is watched\", {\n  files: {\n    \"index.html\": emptyHtmlFile({\n      scripts: [\"\u002Fscript.ts\"],\n      body: \"\u003Ch1>Hello\u003C\u002Fh1>\",\n    }),\n    \"script.ts\": `console.log(\"hello\");`,\n  },\n  async test(dev) {\n    await dev.fetch(\"\u002F\").expect.toInclude(\"\u003Ch1>Hello\u003C\u002Fh1>\");\n    await dev.patch(\"index.html\", { find: \"Hello\", replace: \"World\" });\n    await dev.fetch(\"\u002F\").expect.toInclude(\"\u003Ch1>World\u003C\u002Fh1>\");\n\n    await using c = await dev.client(\"\u002F\");\n    await c.expectMessage(\"hello\");\n\n    await c.expectReload(async () => {\n      await dev.patch(\"index.html\", { find: \"World\", replace: \"Bar\" });\n    });\n    await c.expectMessage(\"hello\");\n  },\n});\n```\n\n## Key APIs\n\n- **`files`**: Initial filesystem state\n- **`dev.fetch()`**: HTTP requests\n- **`dev.client()`**: Opens browser instance\n- **`dev.write\u002Fpatch\u002Fdelete`**: Filesystem mutations (wait for hot-reload automatically)\n- **`c.expectMessage()`**: Assert console.log output\n- **`c.expectReload()`**: Wrap code that causes hard reload\n\n**Important**: Use `dev.write\u002Fpatch\u002Fdelete` instead of `node:fs` - they wait for hot-reload.\n\n## Testing Errors\n\n```ts\ndevTest(\"import then create\", {\n  files: {\n    \"index.html\": `\u003C!DOCTYPE html>\u003Chtml>\u003Chead>\u003C\u002Fhead>\u003Cbody>\u003Cscript type=\"module\" src=\"\u002Fscript.ts\">\u003C\u002Fscript>\u003C\u002Fbody>\u003C\u002Fhtml>`,\n    \"script.ts\": `import data from \".\u002Fdata\"; console.log(data);`,\n  },\n  async test(dev) {\n    const c = await dev.client(\"\u002F\", {\n      errors: ['script.ts:1:18: error: Could not resolve: \".\u002Fdata\"'],\n    });\n    await c.expectReload(async () => {\n      await dev.write(\"data.ts\", \"export default 'data';\");\n    });\n    await c.expectMessage(\"data\");\n  },\n});\n```\n\nSpecify expected errors with the `errors` option:\n\n```ts\nawait dev.delete(\"other.ts\", {\n  errors: ['index.ts:1:16: error: Could not resolve: \".\u002Fother\"'],\n});\n```\n",{"name":5,"description":7},"main","000d804ba753926ec0eca35be68bdb42da72c672","skills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-dev-server-tests","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo","2026-04-05 09:27:05",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-dev-server-tests",{"tool":44,"command":45},"bunx","bunx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-dev-server-tests",{"tool":47,"command":48},"pnpm","pnpm dlx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-dev-server-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-dev-server-tests\u002FSKILL.md",true,[],[53,80,104,121,127,133],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":27},"01M6K0FJ41XMDT72PK0E3ZJF9P","zahra-workspace-manager","Comprehensive workspace management skill for Zahra Maurita's development environment. Use when managing projects across 8 divisions (Web, App, AI Agent, Bot, Content, Marketing, Research, Business), organizing files, tracking progress, managing memory, or coordinating multi-domain work. Triggers on mentions of workspace organization, project management, division-specific tasks, memory updates, or cross-domain coordination.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002Fzahra-workspace-manager\u002FSKILL.md",[],[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79],"workspace","workspace manager","manager","zahra workspace manager","work","updates","progress","app","project","across","multi-domain","files","command","coordination","projects","search","tasks","ai agent","memory","bot",{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":27},"01M6K0FBZYXG5M8VBW5R6TPKEP","tinyfish","AI-powered web automation using TinyFish Web Agent. Use when you need to scrape data from websites, automate form filling, extract structured information, or perform any web-based task using natural language instructions. Works with any website including those with JavaScript, dynamic content, and bot protection.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish\u002FSKILL.md",[],[82,87,88,89,90,91,92,93,94,95,24,96,97,79,98,99,100,101,102,103],"with","natural language","web automation","form","information","scrape","task","language","protection","instructions","automate","you","website","web","javascript","automation","data",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":27},"01M6K0F57WDT62QNXTTC6YS34D","tinyfish-openclaw","TinyFish Web Agent integration for OpenClaw. Use this skill to scrape websites, automate web tasks, extract structured data, and perform browser automation using natural language. Works seamlessly with OpenClaw's MCP protocol.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish-openclaw\u002FSKILL.md",[],[82,111,112,102,113,114,115,100,97,116,87,88,24,92,103,117,118,119,120,76],"openclaw","tinyfish openclaw","structured data","browser automation","MCP","for","integration","mcp protocol","browser","protocol",{"skillNo":122,"name":123,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":27},"01M6K0E9ZWFTG44SK6G2ARS39Z","autoresearchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002FSKILL.md",[],[123],{"skillNo":128,"name":129,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":27},"01M6K0E6ZAEJFYDXM4GANCKZY0","researchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002F.claude\u002Fskills\u002Fresearchclaw\u002FSKILL.md",[],[129],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":27},"01M6K0E1B6RZ8T2S7RMWQ6BVWW","academic-research-assistant","Research assistant for management & digital business academics - literature review, paper analysis, citation management, research methodology","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Facademic-research-assistant\u002FSKILL.md",[],[140,141,142,143,144,145,116,146,147,148,149,150,151,152,153,154,155,156],"research assistant","academic research assistant","Academic","assistant","research","paper analysis","literature","paper","Citation","research methodology","business","management","literature review","analysis","citation management","methodology","review"]