[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZWM6R7TC34R2KR909KGCK":3,"skill-same:01M7BZWM6R7TC34R2KR909KGCK":57},{"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},"01M7BZWM6R7TC34R2KR909KGCK","dialogue-graph",null,"Build, validate, visualize, and serialize dialogue graphs while reliably writing all grader-required on-disk artifacts.","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\u002Ftasks\u002Fdialogue-parser\u002Fskills\u002Fdialogue-graph\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dialogue-graph\ndescription: Build, validate, visualize, and serialize dialogue graphs while reliably writing all grader-required on-disk artifacts.\n---\n\n# Dialogue Graph Skill\n\n## Plan the run (minimal)\n\n1. Identify the required deliverables (filenames + **absolute** paths) before you start changing code.\n2. Build\u002Fparse into an in-memory graph\u002Fdict first; write files only after you have a coherent best-effort structure.\n3. **End-of-run guardrail (hard stop):** immediately before `end_turn`, you must run **export → artifact check** and **log the results** for each required path: `exists`, `size>0`, and `reload\u002Fparse` (e.g., `json.load` for JSON; DOT starts with `digraph`). **Do not call** `end_turn` until you have re-opened the required files and confirmed they load\u002Fparse.\n   - Required paths must be stated explicitly (not “the outputs”).\n\nRead references\u002Fexport-and-artifact-check.md when the grader requires specific on-disk artifacts at exact paths. Skip when outputs are returned directly (no filesystem deliverables).\n\n## Build a graph data model\n\nUse a small, explicit model (nodes + edges) so validation and exports are simple.\n\n```python\nfrom dialogue_graph import Graph, Node, Edge\n\ng = Graph()\ng.add_node(Node(id=\"N1\", type=\"line\", speaker=\"A\", text=\"...\"))\ng.add_node(Node(id=\"N2\", type=\"choice\"))\ng.add_edge(Edge(source=\"N1\", target=\"N2\"))\n\ndata = g.to_dict()\n```\n\nDecision rule: prefer `Graph` when you need validation\u002Fexport helpers; use a plain dict only when the task explicitly forbids external structures.\n\n## Validate before exporting\n\nValidate graph integrity (missing nodes, malformed edges) before writing outputs.\n\n```python\ng_errors = g.validate()\nif g_errors:\n    raise ValueError(\"Invalid dialogue graph: \" + \"; \".join(g_errors))\n```\n\n## Export to JSON\n\nSerialize to a Python dict\u002FJSON string suitable for downstream use.\n\n```python\npayload = g.to_dict()\njson_text = g.to_json()\n```\n\n## Export to Graphviz DOT\n\nWhen a `.dot` file (not just a PNG\u002FSVG) is required, write DOT source explicitly.\n\n```python\nlines = [\"digraph Dialogue {\", \"  rankdir=LR;\"]\nfor n in g.nodes.values():\n    lines.append(f'  \"{n.id}\";')\nfor e in g.edges:\n    lines.append(f'  \"{e.source}\" -> \"{e.target}\";')\nlines.append(\"}\")\ndot_text = \"\\n\".join(lines)\n```\n\n## Common Pitfalls\n\n- Finishing “logic” but not materializing required deliverables (JSON\u002FDOT) at the specified paths; always perform a post-write artifact check with a hard stop before ending.\n- Writing visualization outputs (PNG\u002FSVG) when the evaluator expects DOT source.\n- Skipping validation: exporting a graph with edges pointing to missing node IDs.\n","# Dialogue Graph Skill\n\n## Plan the run (minimal)\n\n1. Identify the required deliverables (filenames + **absolute** paths) before you start changing code.\n2. Build\u002Fparse into an in-memory graph\u002Fdict first; write files only after you have a coherent best-effort structure.\n3. **End-of-run guardrail (hard stop):** immediately before `end_turn`, you must run **export → artifact check** and **log the results** for each required path: `exists`, `size>0`, and `reload\u002Fparse` (e.g., `json.load` for JSON; DOT starts with `digraph`). **Do not call** `end_turn` until you have re-opened the required files and confirmed they load\u002Fparse.\n   - Required paths must be stated explicitly (not “the outputs”).\n\nRead references\u002Fexport-and-artifact-check.md when the grader requires specific on-disk artifacts at exact paths. Skip when outputs are returned directly (no filesystem deliverables).\n\n## Build a graph data model\n\nUse a small, explicit model (nodes + edges) so validation and exports are simple.\n\n```python\nfrom dialogue_graph import Graph, Node, Edge\n\ng = Graph()\ng.add_node(Node(id=\"N1\", type=\"line\", speaker=\"A\", text=\"...\"))\ng.add_node(Node(id=\"N2\", type=\"choice\"))\ng.add_edge(Edge(source=\"N1\", target=\"N2\"))\n\ndata = g.to_dict()\n```\n\nDecision rule: prefer `Graph` when you need validation\u002Fexport helpers; use a plain dict only when the task explicitly forbids external structures.\n\n## Validate before exporting\n\nValidate graph integrity (missing nodes, malformed edges) before writing outputs.\n\n```python\ng_errors = g.validate()\nif g_errors:\n    raise ValueError(\"Invalid dialogue graph: \" + \"; \".join(g_errors))\n```\n\n## Export to JSON\n\nSerialize to a Python dict\u002FJSON string suitable for downstream use.\n\n```python\npayload = g.to_dict()\njson_text = g.to_json()\n```\n\n## Export to Graphviz DOT\n\nWhen a `.dot` file (not just a PNG\u002FSVG) is required, write DOT source explicitly.\n\n```python\nlines = [\"digraph Dialogue {\", \"  rankdir=LR;\"]\nfor n in g.nodes.values():\n    lines.append(f'  \"{n.id}\";')\nfor e in g.edges:\n    lines.append(f'  \"{e.source}\" -> \"{e.target}\";')\nlines.append(\"}\")\ndot_text = \"\\n\".join(lines)\n```\n\n## Common Pitfalls\n\n- Finishing “logic” but not materializing required deliverables (JSON\u002FDOT) at the specified paths; always perform a post-write artifact check with a hard stop before ending.\n- Writing visualization outputs (PNG\u002FSVG) when the evaluator expects DOT source.\n- Skipping validation: exporting a graph with edges pointing to missing node IDs.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillGrad\u002Ftasks\u002Fdialogue-parser\u002Fskills\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\u002Ftasks\u002Fdialogue-parser\u002Fskills\u002Fdialogue-graph\u002FSKILL.md",true,[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fexport-and-artifact-check.md","REFERENCE","参考文档",2453,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Ftasks\u002Fdialogue-parser\u002Fskills\u002Fdialogue-graph\u002Freferences\u002Fexport-and-artifact-check.md",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"scripts\u002Fdialogue_graph.py","SCRIPT","脚本",5793,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Ftasks\u002Fdialogue-parser\u002Fskills\u002Fdialogue-graph\u002Fscripts\u002Fdialogue_graph.py",[58,65,72,79,84,89],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"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":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"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":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"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":80,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"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":85,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"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":90,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"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",[],[]]