[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZDFJSV205EKXQ7P6035AK":3,"skill-same:01M7BZDFJSV205EKXQ7P6035AK":51},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BZDFJSV205EKXQ7P6035AK","dialogue-graph",null,"Build, validate, and serialize dialogue graphs with the provided dialogue_graph library, preserving script semantics while handling terminals, missing targets, and label normalization.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fdialogue-parser\u002Frepaired_skill\u002Fdialogue-graph\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dialogue-graph\ndescription: Build, validate, and serialize dialogue graphs with the provided dialogue_graph library, preserving script semantics while handling terminals, missing targets, and label normalization.\n---\n\n# Dialogue Graph Skill\n\n## Plan and verify (use once per task)\n\n1. Prefer the provided domain library over bespoke schemas: build with `dialogue_graph.Graph\u002FNode\u002FEdge`, validate with `Graph.validate()`, and serialize with `to_dict()`\u002F`to_json()`.\n2. Inspect the actual input artifact before coding: load the full script text and identify node IDs, node types (line vs choice), and any terminal convention.\n3. If a tool call to read critical input fails (tool error, wrong schema, empty output), immediately retry using the correct tool interface until the content is confirmed loaded; do not proceed on guesses.\n4. Normalize presentation artifacts early (e.g., numbering prefixes on choices) so labels match expected schema.\n5. Preserve the script faithfully: build the full node\u002Fedge set from the input as written; treat reachability\u002Fmissing-target issues as diagnostics unless the task explicitly asks you to transform\u002Fprune.\n6. Run `Graph.validate()` and a serialization round-trip check before writing final output; if either disagrees with your expectations, treat the library as the source of truth and adjust the graph (not the validator).\n7. Before termination, run a deliverables checklist: required functions exist (e.g., `parse_script(text: str)` is implemented\u002Fexported) and required output files are written, non-empty, and generated from the same graph.\n\n## Use the provided `dialogue_graph` types (avoid schema drift)\n\nUse the library end-to-end so its serialization and validation semantics match hidden tests. Avoid writing parallel schemas, custom validators, or handcrafted JSON.\n\n```python\nfrom dialogue_graph import Graph, Node, Edge\n\ng = Graph()\ng.add_node(Node(id=\"n1\", type=\"line\", speaker=\"S\", text=\"...\"))\ng.add_node(Node(id=\"n2\", type=\"choice\"))\ng.add_edge(Edge(source=\"n1\", target=\"n2\"))\n\nassert not g.validate(), \"fix reported issues, then re-run validate()\"\npayload = g.to_dict()\nassert Graph.from_dict(payload).to_dict() == payload, \"schema drift: rebuild via library types\"\n```\n\nDecision rule: if you are about to assemble dicts\u002FJSON for nodes or edges, stop and switch to `Node`\u002F`Edge` + `Graph.to_dict()`; only derive other formats (e.g., DOT) from the library object or its `to_dict()` output.\n\nRead references\u002Fuse-library-end-to-end.md when you are about to write a custom parser\u002Fvalidator\u002Fserializer for dialogue graphs, generate DOT from a bespoke structure, or change semantics based on a small snippet test. Skip when the task explicitly requires a different schema than `dialogue_graph` exports.\n\n## Normalize choice edge labels\n\nChoice numbering like `1.` is usually a rendering artifact; normalize to the user-facing label before setting `Edge.text`.\n\n```python\nimport re\n\ndef normalize_choice_label(label: str) -> str:\n    return re.sub(r\"^\\s*\\d+\\.\\s*\", \"\", label).strip()\n\nedge_text = normalize_choice_label(raw_label)\n```\n\nDecision rule: preserve semantic tokens (e.g., bracketed tags) if they are part of the choice content, but strip ordinal numbering.\n\nRead references\u002Fnormalize-choice-labels.md when the input choices are numbered or bulleted and edges require `text`. Skip when the input already provides clean labels without numbering.\n\n## Preserve the full script (no pruning by default)\n\nPruning unreachable nodes\u002Fedges is a semantic transformation that can fail validators expecting a faithful parse.\n\n```python\n# After parsing, keep all parsed nodes\u002Fedges.\n# If you need reachability info, compute it separately.\nseen = set()\nstack = [start_id]\nwhile stack:\n    cur = stack.pop()\n    if cur in seen:\n        continue\n    seen.add(cur)\n    stack.extend(adj.get(cur, ()))\n```\n\nDecision rule: only prune when the task explicitly asks for a reachable subgraph; otherwise report unreachable IDs (or leave them) and keep the full graph.\n\nRead references\u002Fpreserve-script-no-pruning.md when you are tempted to delete nodes\u002Fedges to “fix” validation or to match reachability. Skip when the required output is explicitly a reachable subgraph.\n\n## Terminal handling (do not fabricate nodes by default)\n\nTerminal targets may be a special convention (implicit sink) or an explicit node in the input. Do not create missing nodes just to satisfy homegrown checks; follow the library\u002Fspec convention.\n\n```python\nTERMINAL_IDS = {\"End\", \"END\", \"end\"}\n\ndef is_terminal(node_id: str) -> bool:\n    return node_id in TERMINAL_IDS\n\n# When you see an edge to a missing target:\n# - if it is terminal by convention, allow it without creating a node\n# - otherwise, treat it as a parse\u002Finput error (do not create placeholders)\n```\n\nDecision rule: if `Graph.validate()` complains about a missing terminal node, add the terminal node explicitly with whatever type\u002Ffields the library requires; if it allows terminal references, keep it implicit.\n\nRead references\u002Fterminal-conventions.md when edges point to a terminal like `End` or when validation reports a missing target for a terminal. Skip when all edge targets are explicit nodes in the input.\n\n## Common Pitfalls\n\n- Mis-invoking tools to read required inputs, then proceeding without actually loading the script and terminating without writing deliverables.\n- Reimplementing node\u002Fedge schemas, serialization, or validation instead of using the provided library end-to-end, causing subtle mismatches that pass eyeballing but fail hidden validators.\n- Generating other outputs (e.g., DOT) from a bespoke intermediate structure instead of from the library object or `Graph.to_dict()`.\n- \"Fixing\" missing edge targets by fabricating placeholder nodes (except for a spec-approved terminal convention like `End`).\n- Pruning unreachable nodes\u002Fedges to satisfy a local check when the expected output is a faithful parse of the full script.\n- Leaving choice numbering (e.g., `1.`) in edge labels when the expected schema treats numbering as non-semantic.\n","# Dialogue Graph Skill\n\n## Plan and verify (use once per task)\n\n1. Prefer the provided domain library over bespoke schemas: build with `dialogue_graph.Graph\u002FNode\u002FEdge`, validate with `Graph.validate()`, and serialize with `to_dict()`\u002F`to_json()`.\n2. Inspect the actual input artifact before coding: load the full script text and identify node IDs, node types (line vs choice), and any terminal convention.\n3. If a tool call to read critical input fails (tool error, wrong schema, empty output), immediately retry using the correct tool interface until the content is confirmed loaded; do not proceed on guesses.\n4. Normalize presentation artifacts early (e.g., numbering prefixes on choices) so labels match expected schema.\n5. Preserve the script faithfully: build the full node\u002Fedge set from the input as written; treat reachability\u002Fmissing-target issues as diagnostics unless the task explicitly asks you to transform\u002Fprune.\n6. Run `Graph.validate()` and a serialization round-trip check before writing final output; if either disagrees with your expectations, treat the library as the source of truth and adjust the graph (not the validator).\n7. Before termination, run a deliverables checklist: required functions exist (e.g., `parse_script(text: str)` is implemented\u002Fexported) and required output files are written, non-empty, and generated from the same graph.\n\n## Use the provided `dialogue_graph` types (avoid schema drift)\n\nUse the library end-to-end so its serialization and validation semantics match hidden tests. Avoid writing parallel schemas, custom validators, or handcrafted JSON.\n\n```python\nfrom dialogue_graph import Graph, Node, Edge\n\ng = Graph()\ng.add_node(Node(id=\"n1\", type=\"line\", speaker=\"S\", text=\"...\"))\ng.add_node(Node(id=\"n2\", type=\"choice\"))\ng.add_edge(Edge(source=\"n1\", target=\"n2\"))\n\nassert not g.validate(), \"fix reported issues, then re-run validate()\"\npayload = g.to_dict()\nassert Graph.from_dict(payload).to_dict() == payload, \"schema drift: rebuild via library types\"\n```\n\nDecision rule: if you are about to assemble dicts\u002FJSON for nodes or edges, stop and switch to `Node`\u002F`Edge` + `Graph.to_dict()`; only derive other formats (e.g., DOT) from the library object or its `to_dict()` output.\n\nRead references\u002Fuse-library-end-to-end.md when you are about to write a custom parser\u002Fvalidator\u002Fserializer for dialogue graphs, generate DOT from a bespoke structure, or change semantics based on a small snippet test. Skip when the task explicitly requires a different schema than `dialogue_graph` exports.\n\n## Normalize choice edge labels\n\nChoice numbering like `1.` is usually a rendering artifact; normalize to the user-facing label before setting `Edge.text`.\n\n```python\nimport re\n\ndef normalize_choice_label(label: str) -> str:\n    return re.sub(r\"^\\s*\\d+\\.\\s*\", \"\", label).strip()\n\nedge_text = normalize_choice_label(raw_label)\n```\n\nDecision rule: preserve semantic tokens (e.g., bracketed tags) if they are part of the choice content, but strip ordinal numbering.\n\nRead references\u002Fnormalize-choice-labels.md when the input choices are numbered or bulleted and edges require `text`. Skip when the input already provides clean labels without numbering.\n\n## Preserve the full script (no pruning by default)\n\nPruning unreachable nodes\u002Fedges is a semantic transformation that can fail validators expecting a faithful parse.\n\n```python\n# After parsing, keep all parsed nodes\u002Fedges.\n# If you need reachability info, compute it separately.\nseen = set()\nstack = [start_id]\nwhile stack:\n    cur = stack.pop()\n    if cur in seen:\n        continue\n    seen.add(cur)\n    stack.extend(adj.get(cur, ()))\n```\n\nDecision rule: only prune when the task explicitly asks for a reachable subgraph; otherwise report unreachable IDs (or leave them) and keep the full graph.\n\nRead references\u002Fpreserve-script-no-pruning.md when you are tempted to delete nodes\u002Fedges to “fix” validation or to match reachability. Skip when the required output is explicitly a reachable subgraph.\n\n## Terminal handling (do not fabricate nodes by default)\n\nTerminal targets may be a special convention (implicit sink) or an explicit node in the input. Do not create missing nodes just to satisfy homegrown checks; follow the library\u002Fspec convention.\n\n```python\nTERMINAL_IDS = {\"End\", \"END\", \"end\"}\n\ndef is_terminal(node_id: str) -> bool:\n    return node_id in TERMINAL_IDS\n\n# When you see an edge to a missing target:\n# - if it is terminal by convention, allow it without creating a node\n# - otherwise, treat it as a parse\u002Finput error (do not create placeholders)\n```\n\nDecision rule: if `Graph.validate()` complains about a missing terminal node, add the terminal node explicitly with whatever type\u002Ffields the library requires; if it allows terminal references, keep it implicit.\n\nRead references\u002Fterminal-conventions.md when edges point to a terminal like `End` or when validation reports a missing target for a terminal. Skip when all edge targets are explicit nodes in the input.\n\n## Common Pitfalls\n\n- Mis-invoking tools to read required inputs, then proceeding without actually loading the script and terminating without writing deliverables.\n- Reimplementing node\u002Fedge schemas, serialization, or validation instead of using the provided library end-to-end, causing subtle mismatches that pass eyeballing but fail hidden validators.\n- Generating other outputs (e.g., DOT) from a bespoke intermediate structure instead of from the library object or `Graph.to_dict()`.\n- \"Fixing\" missing edge targets by fabricating placeholder nodes (except for a spec-approved terminal convention like `End`).\n- Pruning unreachable nodes\u002Fedges to satisfy a local check when the expected output is a faithful parse of the full script.\n- Leaving choice numbering (e.g., `1.`) in edge labels when the expected schema treats numbering as non-semantic.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fdialogue-parser\u002Frepaired_skill\u002Fdialogue-graph",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill dialogue-graph",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill dialogue-graph",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill dialogue-graph","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fdialogue-parser\u002Frepaired_skill\u002Fdialogue-graph\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Fdialogue_graph.py","SCRIPT","脚本",5793,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fdialogue-parser\u002Frepaired_skill\u002Fdialogue-graph\u002Fscripts\u002Fdialogue_graph.py",[52,59,66,73,78,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":74,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":79,"name":61,"nameZh":6,"description":62,"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":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":84,"name":68,"nameZh":6,"description":69,"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},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]