[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72T21F3FF9MRD724WA0Q5SQ":3,"skill-same:01M72T21F3FF9MRD724WA0Q5SQ":49},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M72T21F3FF9MRD724WA0Q5SQ","dom-pipeline",null,"DOM extraction and AI processing pipeline for browser automation. Use when building DOM-based AI tools, web automation, or text-based page understanding systems.","iberi22\u002Fskills","iberi22","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10615454?v=4","01M72SQ2NXAA3GW0FSH053A5ES","Brahyan Belalcazar","01M72SQ2PYCH0SSA1K61NGEHDV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgeneral\u002Fdom-pipeline\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: dom-pipeline\ndescription: DOM extraction and AI processing pipeline for browser automation. Use when building DOM-based AI tools, web automation, or text-based page understanding systems.\nversion: \"1.0.0\"\nupdated: \"2026-04-23\"\nauthor: swal\nlicense: MIT\nargument-hint: 'Describe the DOM task or pipeline component to implement'\n---\n\n# DOM Pipeline\n\nText-based DOM manipulation pipeline — no screenshots, no multi-modal LLMs needed.\n\n## Pipeline Stages\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│ 1. DOM Extraction                                           │\n│    Live DOM → FlatDomTree                                   │\n│    (page-controller\u002Fsrc\u002Fdom\u002Fdom_tree\u002F)                       │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 2. Dehydration                                             │\n│    Full DOM → Simplified HTML                               │\n│    Remove: styles, scripts, hidden elements, noise          │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 3. LLM Processing                                           │\n│    Simplified text → Action plan                            │\n│    Tool definitions + system prompt                         │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 4. Indexed Operations                                       │\n│    Action → PageController method calls by index           │\n│    clickElement(42), inputText(15, \"hello\")                │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## FlatDomTree Structure\n\n```typescript\ninterface FlatDomTree {\n  nodes: DomNode[]        \u002F\u002F Flat list with depth info\n  parent_map: Map\u003Cnumber, number>  \u002F\u002F index → parent index\n  element_map: Map\u003Cnumber, HTMLElement>  \u002F\u002F index → actual element\n}\n\ninterface DomNode {\n  index: number\n  tag: string             \u002F\u002F 'button', 'input', 'div', etc.\n  text: string            \u002F\u002F Visible text content\n  depth: number           \u002F\u002F DOM nesting level\n  attributes: Record\u003Cstring, string>\n  interactable: boolean    \u002F\u002F Can this element be interacted with?\n  visible: boolean\n  disabled: boolean\n}\n```\n\n## Dehydration Rules\n\nRemove from DOM before sending to LLM:\n\n| Remove | Why |\n|--------|-----|\n| `\u003Cstyle>` tags | No visual info for text LLM |\n| `\u003Cscript>` tags | Executed, not displayed |\n| `display: none` | Not visible to user |\n| `visibility: hidden` | Not visible to user |\n| `aria-hidden: true` | Hidden from accessibility tree |\n| Inline styles | Often noise for decision making |\n| CSS classes | LLM doesn't render CSS |\n\nKeep:\n- Semantic tags (`button`, `input`, `a`, `select`)\n- `data-*` attributes (often have meaning)\n- `aria-label`, `placeholder`, `title`\n- Form field names and IDs\n- Interactive element text content\n\n## Index-Based Operations\n\nInstead of passing DOM elements to LLM:\n\n```typescript\n\u002F\u002F ❌ Bad: fragile, breaks on re-render\nLLM: \"Click the \u003Cbutton class='btn-primary'>Submit\u003C\u002Fbutton>\"\n\n\u002F\u002F ✅ Good: stable index\nLLM: \"Click element 42\"\nPageController: clickElement(42)\n\n\u002F\u002F Element 42 mapping is maintained by PageController internally\n```\n\n## Element Index Table (sent to LLM)\n\n```\n┌───────┬────────┬─────────────────────────┬──────────────────┐\n│ Index │ Tag    │ Text \u002F Label           │ Attributes       │\n├───────┼────────┼─────────────────────────┼──────────────────┤\n│ 0     │ body   │                        │                  │\n│ 1     │ nav    │ My App                 │                  │\n│ 2     │ button │ Login                 │ aria-label=\"Log\" │\n│ 3     │ input  │                      │ type=\"email\"      │\n│ ...   │ ...    │ ...                   │ ...              │\n│ 42    │ button │ Submit                │ type=\"submit\"    │\n└───────┴────────┴─────────────────────────┴──────────────────┘\n```\n\n## PageController Interface\n\n```typescript\ninterface PageController {\n  \u002F\u002F Tree management\n  updateTree(): Promise\u003Cvoid>           \u002F\u002F Re-extract DOM\n  getSimplifiedHTML(): string           \u002F\u002F Get dehydrated DOM\n  getPageInfo(): PageInfo               \u002F\u002F URL, title, etc.\n\n  \u002F\u002F Element operations (by index)\n  clickElement(index: number): Promise\u003Cvoid>\n  inputText(index: number, text: string): Promise\u003Cvoid>\n  selectOption(index: number, value: string): Promise\u003Cvoid>\n  hoverElement(index: number): Promise\u003Cvoid>\n\n  \u002F\u002F Navigation\n  scroll(direction: 'up' | 'down', pages?: number): Promise\u003Cvoid>\n  goBack(): Promise\u003Cvoid>\n  goForward(): Promise\u003Cvoid>\n  navigateTo(url: string): Promise\u003Cvoid>\n\n  \u002F\u002F Wait conditions\n  waitForSelector(selector: string, timeout?: number): Promise\u003Cvoid>\n  waitForNavigation(callback: () => Promise\u003Cvoid>): Promise\u003Cvoid>\n}\n\ninterface PageInfo {\n  url: string\n  title: string\n  viewport: { width: number, height: number }\n}\n```\n\n## Tool Definition Pattern\n\n```typescript\ninterface Tool {\n  name: string\n  description: string\n  parameters: z.ZodSchema\n  execute: (params: unknown, controller: PageController) => Promise\u003CToolResult>\n}\n\nconst tools: Tool[] = [\n  {\n    name: 'click',\n    description: 'Click an interactive element',\n    parameters: z.object({ index: z.number() }),\n    execute: async ({ index }, controller) => {\n      await controller.clickElement(index)\n      await controller.updateTree()\n      return { success: true, html: controller.getSimplifiedHTML() }\n    }\n  },\n  {\n    name: 'input',\n    description: 'Type text into an input field',\n    parameters: z.object({ index: z.number(), text: z.string() }),\n    execute: async ({ index, text }, controller) => {\n      await controller.inputText(index, text)\n      return { success: true }\n    }\n  }\n]\n```\n\n## Visual Mask (Optional)\n\nOverlay that blocks user interaction during automation:\n\n```typescript\n\u002F\u002F SimulatorMask shows agent's target element\n\u002F\u002F Prevents user from interfering with automation\nconst mask = new SimulatorMask(container)\nmask.highlight(42)  \u002F\u002F Highlight element 42\nmask.block()        \u002F\u002F Block all clicks\nmask.release()      \u002F\u002F Allow interaction again\n```\n\n## Error Handling\n\n| Error | Recovery Strategy |\n|-------|-------------------|\n| Element stale | Re-call `updateTree()` and retry |\n| Element moved | Re-index and retry with new index |\n| Navigation needed | Call `waitForNavigation()` wrapper |\n| LLM timeout | Retry with exponential backoff |\n| Invalid action | Return error to LLM for replanning |\n\n## Best Practices\n\n1. **Always `updateTree()` after DOM-changing actions** — indices change\n2. **Include `waitFor` tools** — pages load asynchronously\n3. **Batch operations when possible** — reduce round trips to LLM\n4. **Include page context** — URL, title help LLM understand state\n5. **Track element stability** — indices can change on DOM updates\n","# DOM Pipeline\n\nText-based DOM manipulation pipeline — no screenshots, no multi-modal LLMs needed.\n\n## Pipeline Stages\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│ 1. DOM Extraction                                           │\n│    Live DOM → FlatDomTree                                   │\n│    (page-controller\u002Fsrc\u002Fdom\u002Fdom_tree\u002F)                       │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 2. Dehydration                                             │\n│    Full DOM → Simplified HTML                               │\n│    Remove: styles, scripts, hidden elements, noise          │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 3. LLM Processing                                           │\n│    Simplified text → Action plan                            │\n│    Tool definitions + system prompt                         │\n└─────────────────────────────────────────────────────────────┘\n                            ↓\n┌─────────────────────────────────────────────────────────────┐\n│ 4. Indexed Operations                                       │\n│    Action → PageController method calls by index           │\n│    clickElement(42), inputText(15, \"hello\")                │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## FlatDomTree Structure\n\n```typescript\ninterface FlatDomTree {\n  nodes: DomNode[]        \u002F\u002F Flat list with depth info\n  parent_map: Map\u003Cnumber, number>  \u002F\u002F index → parent index\n  element_map: Map\u003Cnumber, HTMLElement>  \u002F\u002F index → actual element\n}\n\ninterface DomNode {\n  index: number\n  tag: string             \u002F\u002F 'button', 'input', 'div', etc.\n  text: string            \u002F\u002F Visible text content\n  depth: number           \u002F\u002F DOM nesting level\n  attributes: Record\u003Cstring, string>\n  interactable: boolean    \u002F\u002F Can this element be interacted with?\n  visible: boolean\n  disabled: boolean\n}\n```\n\n## Dehydration Rules\n\nRemove from DOM before sending to LLM:\n\n| Remove | Why |\n|--------|-----|\n| `\u003Cstyle>` tags | No visual info for text LLM |\n| `\u003Cscript>` tags | Executed, not displayed |\n| `display: none` | Not visible to user |\n| `visibility: hidden` | Not visible to user |\n| `aria-hidden: true` | Hidden from accessibility tree |\n| Inline styles | Often noise for decision making |\n| CSS classes | LLM doesn't render CSS |\n\nKeep:\n- Semantic tags (`button`, `input`, `a`, `select`)\n- `data-*` attributes (often have meaning)\n- `aria-label`, `placeholder`, `title`\n- Form field names and IDs\n- Interactive element text content\n\n## Index-Based Operations\n\nInstead of passing DOM elements to LLM:\n\n```typescript\n\u002F\u002F ❌ Bad: fragile, breaks on re-render\nLLM: \"Click the \u003Cbutton class='btn-primary'>Submit\u003C\u002Fbutton>\"\n\n\u002F\u002F ✅ Good: stable index\nLLM: \"Click element 42\"\nPageController: clickElement(42)\n\n\u002F\u002F Element 42 mapping is maintained by PageController internally\n```\n\n## Element Index Table (sent to LLM)\n\n```\n┌───────┬────────┬─────────────────────────┬──────────────────┐\n│ Index │ Tag    │ Text \u002F Label           │ Attributes       │\n├───────┼────────┼─────────────────────────┼──────────────────┤\n│ 0     │ body   │                        │                  │\n│ 1     │ nav    │ My App                 │                  │\n│ 2     │ button │ Login                 │ aria-label=\"Log\" │\n│ 3     │ input  │                      │ type=\"email\"      │\n│ ...   │ ...    │ ...                   │ ...              │\n│ 42    │ button │ Submit                │ type=\"submit\"    │\n└───────┴────────┴─────────────────────────┴──────────────────┘\n```\n\n## PageController Interface\n\n```typescript\ninterface PageController {\n  \u002F\u002F Tree management\n  updateTree(): Promise\u003Cvoid>           \u002F\u002F Re-extract DOM\n  getSimplifiedHTML(): string           \u002F\u002F Get dehydrated DOM\n  getPageInfo(): PageInfo               \u002F\u002F URL, title, etc.\n\n  \u002F\u002F Element operations (by index)\n  clickElement(index: number): Promise\u003Cvoid>\n  inputText(index: number, text: string): Promise\u003Cvoid>\n  selectOption(index: number, value: string): Promise\u003Cvoid>\n  hoverElement(index: number): Promise\u003Cvoid>\n\n  \u002F\u002F Navigation\n  scroll(direction: 'up' | 'down', pages?: number): Promise\u003Cvoid>\n  goBack(): Promise\u003Cvoid>\n  goForward(): Promise\u003Cvoid>\n  navigateTo(url: string): Promise\u003Cvoid>\n\n  \u002F\u002F Wait conditions\n  waitForSelector(selector: string, timeout?: number): Promise\u003Cvoid>\n  waitForNavigation(callback: () => Promise\u003Cvoid>): Promise\u003Cvoid>\n}\n\ninterface PageInfo {\n  url: string\n  title: string\n  viewport: { width: number, height: number }\n}\n```\n\n## Tool Definition Pattern\n\n```typescript\ninterface Tool {\n  name: string\n  description: string\n  parameters: z.ZodSchema\n  execute: (params: unknown, controller: PageController) => Promise\u003CToolResult>\n}\n\nconst tools: Tool[] = [\n  {\n    name: 'click',\n    description: 'Click an interactive element',\n    parameters: z.object({ index: z.number() }),\n    execute: async ({ index }, controller) => {\n      await controller.clickElement(index)\n      await controller.updateTree()\n      return { success: true, html: controller.getSimplifiedHTML() }\n    }\n  },\n  {\n    name: 'input',\n    description: 'Type text into an input field',\n    parameters: z.object({ index: z.number(), text: z.string() }),\n    execute: async ({ index, text }, controller) => {\n      await controller.inputText(index, text)\n      return { success: true }\n    }\n  }\n]\n```\n\n## Visual Mask (Optional)\n\nOverlay that blocks user interaction during automation:\n\n```typescript\n\u002F\u002F SimulatorMask shows agent's target element\n\u002F\u002F Prevents user from interfering with automation\nconst mask = new SimulatorMask(container)\nmask.highlight(42)  \u002F\u002F Highlight element 42\nmask.block()        \u002F\u002F Block all clicks\nmask.release()      \u002F\u002F Allow interaction again\n```\n\n## Error Handling\n\n| Error | Recovery Strategy |\n|-------|-------------------|\n| Element stale | Re-call `updateTree()` and retry |\n| Element moved | Re-index and retry with new index |\n| Navigation needed | Call `waitForNavigation()` wrapper |\n| LLM timeout | Retry with exponential backoff |\n| Invalid action | Return error to LLM for replanning |\n\n## Best Practices\n\n1. **Always `updateTree()` after DOM-changing actions** — indices change\n2. **Include `waitFor` tools** — pages load asynchronously\n3. **Batch operations when possible** — reduce round trips to LLM\n4. **Include page context** — URL, title help LLM understand state\n5. **Track element stability** — indices can change on DOM updates\n",{"name":5,"author":24,"license":15,"updated":25,"version":26,"description":7,"argument-hint":27},"swal","2026-04-23","1.0.0","Describe the DOM task or pipeline component to implement","main","688810f2886d212632acf81e532b24e483dd8b98","skills\u002Fgeneral\u002Fdom-pipeline","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills","https:\u002F\u002Fgithub.com\u002Fiberi22","Senior WEB Full-Stack","2026-10-12 02:46:21",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add iberi22\u002Fskills --skill dom-pipeline",{"tool":41,"command":42},"bunx","bunx skills add iberi22\u002Fskills --skill dom-pipeline",{"tool":44,"command":45},"pnpm","pnpm dlx skills add iberi22\u002Fskills --skill dom-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgeneral\u002Fdom-pipeline\u002FSKILL.md",true,[],[50,56,63,69,75,81],{"skillNo":51,"name":52,"nameZh":6,"description":6,"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":19},"01M72TWQEQD46ZC9TRBAABF78P","web-design-guidelines","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M72TWMQFTYD08DGXVAXRPPEB","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall. Recovers the page via archives and provenance-checked fallbacks.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":6,"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":19},"01M72TVQMS3HCTX18C8T97WTQQ","studio-coach","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fstudio-coach\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M72TVNA2PR9RZW0ZAXYP1G6J","src-generator","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsrc-generator\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M72TVEJHHB6SAT3R3TY9MJKS","sqlite-pro","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Fsqlite-pro\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M72TVC2EVBHQHCX96VTTYKB8","rigor-evaluator","Use when you need a quick heuristic rigor score (10 criteria, 0-2 each) for the features in a .gitcore\u002Ffeatures.json file, to decide which features are ready to ship.","https:\u002F\u002Fgithub.com\u002Fiberi22\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftools\u002Frigor-evaluator\u002FSKILL.md",[],[]]