[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K095K4S9JN8KV3734FXRC6":3,"skill-same:01M6K095K4S9JN8KV3734FXRC6":63},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6K095K4S9JN8KV3734FXRC6","dce-edge",null,"DCE-safe require() patterns and edge runtime constraints. Use when writing conditional require() calls, guarding Node-only imports (node:stream etc.), or editing define-env-plugin.ts \u002F app-render \u002F stream-utils for edge builds. Covers if\u002Felse branching for webpack DCE, TypeScript definite assignment, the NEXT_RUNTIME vs real feature flag distinction, and forcing flags false for edge in define-env.ts.","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\u002Fdce-edge\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"dce edge","edge","env","conditional","for","webpack","utils","calls","render","forcing","false","writing","app","feature","define","runtime","only","use","editing","plugin","2026-11-10 10:12:30",false,"---\nname: dce-edge\ndescription: >\n  DCE-safe require() patterns and edge runtime constraints. Use when writing\n  conditional require() calls, guarding Node-only imports (node:stream etc.),\n  or editing define-env-plugin.ts \u002F app-render \u002F stream-utils for edge builds.\n  Covers if\u002Felse branching for webpack DCE, TypeScript definite assignment,\n  the NEXT_RUNTIME vs real feature flag distinction, and forcing flags false\n  for edge in define-env.ts.\n---\n\n# DCE + Edge\n\nUse this skill when changing conditional `require()` paths, Node-only imports, or edge\u002Fruntime branching.\n\n## DCE-Safe `require()` Pattern\n\nWebpack only DCEs a `require()` when it sits inside the dead branch of an `if\u002Felse` whose condition DefinePlugin can evaluate at compile time.\n\n```ts\n\u002F\u002F CORRECT - webpack can eliminate the dead branch\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n  require('node:stream')\n} else {\n  \u002F\u002F web path\n}\n```\n\nWhat does NOT work:\n\n- **Early-return\u002Fthrow guards**: webpack doesn't do control-flow analysis for throws\u002Freturns, so the `require()` is still traced.\n- **Bare `if` without `else`**: works for inline `node:*` specifiers but NOT for `require('.\u002Fsome-module')` that pulls a new file into the module graph.\n\nAlways test edge changes with `pnpm test-start-webpack` on `test\u002Fe2e\u002Fapp-dir\u002Fapp\u002Fstandalone.test.ts` (has edge routes), not with `NEXT_SKIP_ISOLATE=1` which skips the full webpack compilation.\n\n## TypeScript + DCE Interaction\n\nUse `if\u002Felse` (not two independent `if` blocks) when assigning a variable conditionally on `process.env.X`. TypeScript cannot prove exhaustiveness across `if (flag) { x = a }; if (!flag) { x = b }` and will error with \"variable used before being assigned\". The `if\u002Felse` pattern satisfies both TypeScript (definite assignment) and webpack DCE.\n\n## Compile-Time Switcher Pattern\n\nPlatform-specific code (node vs web) can use a single `.ts` switcher module that conditionally `require()`s either `.node.ts` or `.web.ts` into a typed variable, then re-exports the shared runtime API as named exports. Keep the branch as `if\u002Felse` so DefinePlugin can dead-code-eliminate the unused `require()`. Keep shared types canonical in `.node.ts`, with `.web.ts` importing them via `import type` and the switcher re-exporting types as needed. Examples: `stream-ops.ts` and `debug-channel-server.ts`.\n\n## `NEXT_RUNTIME` Is Not a Feature Flag\n\nIn user-project webpack server compilers, `process.env.NEXT_RUNTIME` is inlined to `'nodejs'`. Guarding Node-only `require('node:*')` paths with `NEXT_RUNTIME === 'nodejs'` does **not** prune anything. For feature-gated codepaths, guard on the real feature define (e.g. `process.env.__NEXT_USE_NODE_STREAMS`).\n\n## Edge Runtime Constraints\n\nEdge routes do NOT use pre-compiled runtime bundles. They are compiled by the user's webpack\u002FTurbopack, so `define-env.ts` controls DCE. Feature flags that gate `node:*` imports must be forced to `false` for edge builds in `define-env.ts` (`isEdgeServer ? false : flagValue`), otherwise webpack will try to resolve `node:stream` etc. and fail.\n\n## `app-page.ts` Template Gotchas\n\n- `app-page.ts` is a build template compiled by the user's bundler. Any `require()` in this file is traced by webpack\u002Fturbopack at `next build` time. You cannot require internal modules with relative paths because they won't be resolvable from the user's project. Instead, export new helpers from `entry-base.ts` and access them via `entryBase.*` in the template.\n- Template helpers should stay out of `RenderResult`. If `app-page.ts` needs a Node-stream-only utility, prefer a small dedicated helper module in `server\u002Fstream-utils\u002F` (with DCE-safe `if\u002Felse` + `require()`).\n\n## Verification\n\n- Validate edge bundling regressions with `pnpm test-start-webpack test\u002Fe2e\u002Fapp-dir\u002Fapp\u002Fstandalone.test.ts`\n- For module-resolution\u002Fbuild-graph fixes, verify without `NEXT_SKIP_ISOLATE=1`\n\n## Related Skills\n\n- `$flags` - flag wiring (config\u002Fschema\u002Fdefine-env\u002Fruntime env)\n- `$react-vendoring` - entry-base boundaries and vendored React\n- `$runtime-debug` - reproduction and verification workflow\n","# DCE + Edge\n\nUse this skill when changing conditional `require()` paths, Node-only imports, or edge\u002Fruntime branching.\n\n## DCE-Safe `require()` Pattern\n\nWebpack only DCEs a `require()` when it sits inside the dead branch of an `if\u002Felse` whose condition DefinePlugin can evaluate at compile time.\n\n```ts\n\u002F\u002F CORRECT - webpack can eliminate the dead branch\nif (process.env.__NEXT_USE_NODE_STREAMS) {\n  require('node:stream')\n} else {\n  \u002F\u002F web path\n}\n```\n\nWhat does NOT work:\n\n- **Early-return\u002Fthrow guards**: webpack doesn't do control-flow analysis for throws\u002Freturns, so the `require()` is still traced.\n- **Bare `if` without `else`**: works for inline `node:*` specifiers but NOT for `require('.\u002Fsome-module')` that pulls a new file into the module graph.\n\nAlways test edge changes with `pnpm test-start-webpack` on `test\u002Fe2e\u002Fapp-dir\u002Fapp\u002Fstandalone.test.ts` (has edge routes), not with `NEXT_SKIP_ISOLATE=1` which skips the full webpack compilation.\n\n## TypeScript + DCE Interaction\n\nUse `if\u002Felse` (not two independent `if` blocks) when assigning a variable conditionally on `process.env.X`. TypeScript cannot prove exhaustiveness across `if (flag) { x = a }; if (!flag) { x = b }` and will error with \"variable used before being assigned\". The `if\u002Felse` pattern satisfies both TypeScript (definite assignment) and webpack DCE.\n\n## Compile-Time Switcher Pattern\n\nPlatform-specific code (node vs web) can use a single `.ts` switcher module that conditionally `require()`s either `.node.ts` or `.web.ts` into a typed variable, then re-exports the shared runtime API as named exports. Keep the branch as `if\u002Felse` so DefinePlugin can dead-code-eliminate the unused `require()`. Keep shared types canonical in `.node.ts`, with `.web.ts` importing them via `import type` and the switcher re-exporting types as needed. Examples: `stream-ops.ts` and `debug-channel-server.ts`.\n\n## `NEXT_RUNTIME` Is Not a Feature Flag\n\nIn user-project webpack server compilers, `process.env.NEXT_RUNTIME` is inlined to `'nodejs'`. Guarding Node-only `require('node:*')` paths with `NEXT_RUNTIME === 'nodejs'` does **not** prune anything. For feature-gated codepaths, guard on the real feature define (e.g. `process.env.__NEXT_USE_NODE_STREAMS`).\n\n## Edge Runtime Constraints\n\nEdge routes do NOT use pre-compiled runtime bundles. They are compiled by the user's webpack\u002FTurbopack, so `define-env.ts` controls DCE. Feature flags that gate `node:*` imports must be forced to `false` for edge builds in `define-env.ts` (`isEdgeServer ? false : flagValue`), otherwise webpack will try to resolve `node:stream` etc. and fail.\n\n## `app-page.ts` Template Gotchas\n\n- `app-page.ts` is a build template compiled by the user's bundler. Any `require()` in this file is traced by webpack\u002Fturbopack at `next build` time. You cannot require internal modules with relative paths because they won't be resolvable from the user's project. Instead, export new helpers from `entry-base.ts` and access them via `entryBase.*` in the template.\n- Template helpers should stay out of `RenderResult`. If `app-page.ts` needs a Node-stream-only utility, prefer a small dedicated helper module in `server\u002Fstream-utils\u002F` (with DCE-safe `if\u002Felse` + `require()`).\n\n## Verification\n\n- Validate edge bundling regressions with `pnpm test-start-webpack test\u002Fe2e\u002Fapp-dir\u002Fapp\u002Fstandalone.test.ts`\n- For module-resolution\u002Fbuild-graph fixes, verify without `NEXT_SKIP_ISOLATE=1`\n\n## Related Skills\n\n- `$flags` - flag wiring (config\u002Fschema\u002Fdefine-env\u002Fruntime env)\n- `$react-vendoring` - entry-base boundaries and vendored React\n- `$runtime-debug` - reproduction and verification workflow\n",{"name":5,"description":7},"main","000d804ba753926ec0eca35be68bdb42da72c672","skills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fdce-edge","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo","2026-04-05 09:27:05",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill dce-edge",{"tool":55,"command":56},"bunx","bunx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill dce-edge",{"tool":58,"command":59},"pnpm","pnpm dlx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill dce-edge","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fdce-edge\u002FSKILL.md",true,[],[64,90,114,130,136,142],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":38},"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",[],[71,72,73,74,75,76,77,30,78,79,80,81,82,83,84,85,86,87,88,89],"workspace","workspace manager","manager","zahra workspace manager","work","updates","progress","project","across","multi-domain","files","command","coordination","projects","search","tasks","ai agent","memory","bot",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":38},"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",[],[92,97,98,99,100,101,102,103,104,105,35,106,107,89,108,109,110,111,112,113],"with","natural language","web automation","form","information","scrape","task","language","protection","instructions","automate","you","website","web","javascript","automation","data",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":38},"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",[],[92,121,122,112,123,124,125,110,107,22,97,98,35,102,113,126,127,128,129,86],"openclaw","tinyfish openclaw","structured data","browser automation","MCP","integration","mcp protocol","browser","protocol",{"skillNo":131,"name":132,"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":133,"categories":134,"keywords":135,"publishedAt":38},"01M6K0E9ZWFTG44SK6G2ARS39Z","autoresearchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002FSKILL.md",[],[132],{"skillNo":137,"name":138,"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":139,"categories":140,"keywords":141,"publishedAt":38},"01M6K0E6ZAEJFYDXM4GANCKZY0","researchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002F.claude\u002Fskills\u002Fresearchclaw\u002FSKILL.md",[],[138],{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":38},"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",[],[149,150,151,152,153,154,22,155,156,157,158,159,160,161,162,163,164,165],"research assistant","academic research assistant","Academic","assistant","research","paper analysis","literature","paper","Citation","research methodology","business","management","literature review","analysis","citation management","methodology","review"]