[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BP56S0YHF5SA2N2H23YPDW":3,"skill-same:01M7BP56S0YHF5SA2N2H23YPDW":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},"01M7BP56S0YHF5SA2N2H23YPDW","dialogue-graph",null,"A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.","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\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-dialogue-parser\u002Frun\u002Finputs\u002Fskills\u002Fdialogue-graph\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dialogue-graph\ndescription: A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.\n---\n\n# Dialogue Graph Skill\n\nThis skill provides a `dialogue_graph` module to easily build valid dialogue trees\u002Fgraphs.\n\n## When to use\n\n*   **Script Parsers**: When converting text to data.\n*   **Dialogue Editors**: When building tools to edit conversation flow.\n*   **Game Logic**: When traversing a dialogue tree.\n*   **Visualization**: When generating visual diagrams of dialogue flows.\n\n## How to use\n\nImport the module:\n```python\nfrom dialogue_graph import Graph, Node, Edge\n```\n\n### 1. The `Graph` Class\nThe main container.\n\n```python\ngraph = Graph()\n```\n\n### 2. Adding Nodes\nDefine content nodes.\n\n```python\n# Regular line\ngraph.add_node(Node(id=\"Start\", speaker=\"Guard\", text=\"Halt!\", type=\"line\"))\n\n# Choice hub\ngraph.add_node(Node(id=\"Choices\", type=\"choice\"))\n```\n\n### 3. Adding Edges\n\nConnect nodes (transitions). Every edge's `target` must correspond to a declared node id — including the shared terminal sink `End`. If one or more branches terminate at `End`, declare it once as a node **before** any edge references it. This keeps the \"all edge targets exist\" and \"all nodes reachable from the first node\" contracts simultaneously satisfiable, and ensures `End` appears in the exported `nodes` list.\n\n```python\n# Declare the terminal sink exactly once, before referencing it as a target.\ngraph.add_node(Node(id=\"End\", type=\"line\"))\n\n# Simple transition\ngraph.add_edge(Edge(source=\"Start\", target=\"Choices\"))\n\n# Choice transition (with text) terminating at the shared End sink\ngraph.add_edge(Edge(source=\"Choices\", target=\"End\", text=\"1. Run away\"))\n```\n\nThis `End`-declaration convention is only a relaxation for the explicitly terminal sink. Non-terminal unresolved targets (typos, forward references that are never added as nodes) must still be treated as errors by `validate()` and fixed, not auto-accepted.\n\n### 4. Export\n\nSerialize the graph to JSON **and** persist it to the caller-requested file path. The exported schema is:\n\n```\n{\n  \"nodes\": [{\"id\": \"\", \"text\": \"\", \"speaker\": \"\", \"type\": \"\"}, ...],\n  \"edges\": [{\"from\": \"\", \"to\": \"\", \"text\": \"\"}, ...]\n}\n```\n\nAlways run `validate()` first and ensure it returns `[]` so the delivered artifact is schema-valid.\n\n```python\n# 1. Validate before writing — delivered artifacts must be schema-valid.\nerrors = graph.validate()\nassert errors == [], errors\n\n# 2. Serialize.\ndata = graph.to_dict()          # dict shaped as above (for in-memory callers)\njson_str = graph.to_json()      # same shape, as a JSON string\n\n# 3. Writeback contract: write to the caller-specified path\n#    (e.g. the task may require \u002Fapp\u002Fdialogue.json).\nwith open('\u002Fapp\u002Fdialogue.json', 'w', encoding='utf-8') as f:\n    f.write(json_str)\n```\n\nIn-memory callers (editors, tests) that do not need an on-disk file may stop after step 2; the writeback step is only mandatory when a file path is part of the delivery contract.\n\n### 5. Validation\nCheck for integrity.\n\n```python\nerrors = graph.validate()\n# Returns list of strings, e.g., [\"Edge 'Start'->'Unk' points to missing node 'Unk'\"]\n```\n\n### 6. Visualization\n\nTwo distinct deliverables are supported — do not confuse them:\n\n* **DOT source** (`.dot` text file) — the raw Graphviz source, for downstream tooling or human inspection. Produce via `graph.to_dot()` and write the returned string to the caller's `.dot` path. This path does **not** require the Graphviz system binary.\n* **Rendered image** (PNG\u002FSVG\u002FPDF) — a preview. Produce via `graph.visualize(...)`; this path renders the image and cleans up the intermediate `.dot` file, so it is **not** a substitute for `to_dot()` when a `.dot` file is the required deliverable.\n\n```python\n# Emit raw DOT source to the caller-specified .dot path\n# (e.g. the task may require \u002Fapp\u002Fdialogue.dot).\ndot_source = graph.to_dot()\nwith open('\u002Fapp\u002Fdialogue.dot', 'w', encoding='utf-8') as f:\n    f.write(dot_source)\n\n# Optional: render a PNG\u002FSVG preview.\n# Requires: pip install graphviz\n# Also requires Graphviz binary: https:\u002F\u002Fgraphviz.org\u002Fdownload\u002F\ngraph.visualize('dialogue_graph')          # Creates dialogue_graph.png\ngraph.visualize('output', format='svg')    # Creates output.svg\n```\n\nBoth the `to_dot()` source and the rendered image include:\n- **Diamond shapes** for choice nodes (light blue)\n- **Rounded boxes** for dialogue nodes (colored by speaker)\n- **Bold blue edges** for skill-check choices like `[Lie]`, `[Attack]`\n- **Gray edges** for regular choices\n- **Black edges** for simple transitions\n\n### 7. Loading from JSON\nLoad an existing dialogue graph.\n\n```python\n# From file\ngraph = Graph.from_file('dialogue.json')\n\n# From dict\ngraph = Graph.from_dict({'nodes': [...], 'edges': [...]})\n\n# From JSON string\ngraph = Graph.from_json(json_string)\n```\n","# Dialogue Graph Skill\n\nThis skill provides a `dialogue_graph` module to easily build valid dialogue trees\u002Fgraphs.\n\n## When to use\n\n*   **Script Parsers**: When converting text to data.\n*   **Dialogue Editors**: When building tools to edit conversation flow.\n*   **Game Logic**: When traversing a dialogue tree.\n*   **Visualization**: When generating visual diagrams of dialogue flows.\n\n## How to use\n\nImport the module:\n```python\nfrom dialogue_graph import Graph, Node, Edge\n```\n\n### 1. The `Graph` Class\nThe main container.\n\n```python\ngraph = Graph()\n```\n\n### 2. Adding Nodes\nDefine content nodes.\n\n```python\n# Regular line\ngraph.add_node(Node(id=\"Start\", speaker=\"Guard\", text=\"Halt!\", type=\"line\"))\n\n# Choice hub\ngraph.add_node(Node(id=\"Choices\", type=\"choice\"))\n```\n\n### 3. Adding Edges\n\nConnect nodes (transitions). Every edge's `target` must correspond to a declared node id — including the shared terminal sink `End`. If one or more branches terminate at `End`, declare it once as a node **before** any edge references it. This keeps the \"all edge targets exist\" and \"all nodes reachable from the first node\" contracts simultaneously satisfiable, and ensures `End` appears in the exported `nodes` list.\n\n```python\n# Declare the terminal sink exactly once, before referencing it as a target.\ngraph.add_node(Node(id=\"End\", type=\"line\"))\n\n# Simple transition\ngraph.add_edge(Edge(source=\"Start\", target=\"Choices\"))\n\n# Choice transition (with text) terminating at the shared End sink\ngraph.add_edge(Edge(source=\"Choices\", target=\"End\", text=\"1. Run away\"))\n```\n\nThis `End`-declaration convention is only a relaxation for the explicitly terminal sink. Non-terminal unresolved targets (typos, forward references that are never added as nodes) must still be treated as errors by `validate()` and fixed, not auto-accepted.\n\n### 4. Export\n\nSerialize the graph to JSON **and** persist it to the caller-requested file path. The exported schema is:\n\n```\n{\n  \"nodes\": [{\"id\": \"\", \"text\": \"\", \"speaker\": \"\", \"type\": \"\"}, ...],\n  \"edges\": [{\"from\": \"\", \"to\": \"\", \"text\": \"\"}, ...]\n}\n```\n\nAlways run `validate()` first and ensure it returns `[]` so the delivered artifact is schema-valid.\n\n```python\n# 1. Validate before writing — delivered artifacts must be schema-valid.\nerrors = graph.validate()\nassert errors == [], errors\n\n# 2. Serialize.\ndata = graph.to_dict()          # dict shaped as above (for in-memory callers)\njson_str = graph.to_json()      # same shape, as a JSON string\n\n# 3. Writeback contract: write to the caller-specified path\n#    (e.g. the task may require \u002Fapp\u002Fdialogue.json).\nwith open('\u002Fapp\u002Fdialogue.json', 'w', encoding='utf-8') as f:\n    f.write(json_str)\n```\n\nIn-memory callers (editors, tests) that do not need an on-disk file may stop after step 2; the writeback step is only mandatory when a file path is part of the delivery contract.\n\n### 5. Validation\nCheck for integrity.\n\n```python\nerrors = graph.validate()\n# Returns list of strings, e.g., [\"Edge 'Start'->'Unk' points to missing node 'Unk'\"]\n```\n\n### 6. Visualization\n\nTwo distinct deliverables are supported — do not confuse them:\n\n* **DOT source** (`.dot` text file) — the raw Graphviz source, for downstream tooling or human inspection. Produce via `graph.to_dot()` and write the returned string to the caller's `.dot` path. This path does **not** require the Graphviz system binary.\n* **Rendered image** (PNG\u002FSVG\u002FPDF) — a preview. Produce via `graph.visualize(...)`; this path renders the image and cleans up the intermediate `.dot` file, so it is **not** a substitute for `to_dot()` when a `.dot` file is the required deliverable.\n\n```python\n# Emit raw DOT source to the caller-specified .dot path\n# (e.g. the task may require \u002Fapp\u002Fdialogue.dot).\ndot_source = graph.to_dot()\nwith open('\u002Fapp\u002Fdialogue.dot', 'w', encoding='utf-8') as f:\n    f.write(dot_source)\n\n# Optional: render a PNG\u002FSVG preview.\n# Requires: pip install graphviz\n# Also requires Graphviz binary: https:\u002F\u002Fgraphviz.org\u002Fdownload\u002F\ngraph.visualize('dialogue_graph')          # Creates dialogue_graph.png\ngraph.visualize('output', format='svg')    # Creates output.svg\n```\n\nBoth the `to_dot()` source and the rendered image include:\n- **Diamond shapes** for choice nodes (light blue)\n- **Rounded boxes** for dialogue nodes (colored by speaker)\n- **Bold blue edges** for skill-check choices like `[Lie]`, `[Attack]`\n- **Gray edges** for regular choices\n- **Black edges** for simple transitions\n\n### 7. Loading from JSON\nLoad an existing dialogue graph.\n\n```python\n# From file\ngraph = Graph.from_file('dialogue.json')\n\n# From dict\ngraph = Graph.from_dict({'nodes': [...], 'edges': [...]})\n\n# From JSON string\ngraph = Graph.from_json(json_string)\n```\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","controlled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-dialogue-parser\u002Frun\u002Finputs\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\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-dialogue-parser\u002Frun\u002Finputs\u002Fskills\u002Fdialogue-graph\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Fdialogue_graph.py","SCRIPT","脚本",7061,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fcontrolled-skill-repair-experiments\u002Fresult\u002Fwml-claude4.7\u002Fexperiments\u002Frepair\u002Flocation-dialogue-parser\u002Frun\u002Finputs\u002Fskills\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",[],[]]