[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72WN25CANTX9C4Z1V1AFDVF":3,"skill-same:01M72WN25CANTX9C4Z1V1AFDVF":52},{"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":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M72WN25CANTX9C4Z1V1AFDVF","dialogue-graph",null,"A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.","agentscope-ai\u002FPawBench","agentscope-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211762292?v=4","01M6CRT6543BZGGVK3P85GC08Q","AgentScope-AI","01M72WJAXCYDAXK74090327ER7",127,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT128_skillsbench_dialogue-parser\u002Fskills\u002Fdialogue_graph\u002FSKILL.md",[],[],"2026-11-10 22:39:42",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\nConnect nodes (transitions).\n\n```python\n# Simple transition\ngraph.add_edge(Edge(source=\"Start\", target=\"Choices\"))\n\n# Choice transition (with text)\ngraph.add_edge(Edge(source=\"Choices\", target=\"End\", text=\"1. Run away\"))\n```\n\n### 4. Export\nSerialize to JSON format for the engine.\n\n```python\ndata = graph.to_dict()\n# returns {\"nodes\": [...], \"edges\": [...]}\njson_str = graph.to_json()\n```\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\nGenerate a PNG\u002FSVG graph diagram.\n\n```python\n# Requires: pip install graphviz\n# Also requires Graphviz binary: https:\u002F\u002Fgraphviz.org\u002Fdownload\u002F\n\ngraph.visualize('dialogue_graph')  # Creates dialogue_graph.png\ngraph.visualize('output', format='svg')  # Creates output.svg\n```\n\nThe visualization includes:\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\nConnect nodes (transitions).\n\n```python\n# Simple transition\ngraph.add_edge(Edge(source=\"Start\", target=\"Choices\"))\n\n# Choice transition (with text)\ngraph.add_edge(Edge(source=\"Choices\", target=\"End\", text=\"1. Run away\"))\n```\n\n### 4. Export\nSerialize to JSON format for the engine.\n\n```python\ndata = graph.to_dict()\n# returns {\"nodes\": [...], \"edges\": [...]}\njson_str = graph.to_json()\n```\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\nGenerate a PNG\u002FSVG graph diagram.\n\n```python\n# Requires: pip install graphviz\n# Also requires Graphviz binary: https:\u002F\u002Fgraphviz.org\u002Fdownload\u002F\n\ngraph.visualize('dialogue_graph')  # Creates dialogue_graph.png\ngraph.visualize('output', format='svg')  # Creates output.svg\n```\n\nThe visualization includes:\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","0f794a8bb6c27aa9ee4091b2691fa30e4ed9cc8f","data\u002Fpawbench-v1.0\u002Fassets\u002FT128_skillsbench_dialogue-parser\u002Fskills\u002Fdialogue_graph",24,"https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench","https:\u002F\u002Fagentscope-ai.github.io\u002FPawBench\u002F","https:\u002F\u002Fgithub.com\u002Fagentscope-ai","2026-08-03 20:09:53",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agentscope-ai\u002FPawBench --skill dialogue-graph",{"tool":38,"command":39},"bunx","bunx skills add agentscope-ai\u002FPawBench --skill dialogue-graph",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agentscope-ai\u002FPawBench --skill dialogue-graph","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT128_skillsbench_dialogue-parser\u002Fskills\u002Fdialogue_graph\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"scripts\u002Fdialogue_graph.py","SCRIPT","脚本",5773,"https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT128_skillsbench_dialogue-parser\u002Fskills\u002Fdialogue_graph\u002Fscripts\u002Fdialogue_graph.py",[53,59,66,73,80,87],{"skillNo":54,"name":55,"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":56,"categories":57,"keywords":58,"publishedAt":19},"01M72WQCJKBJZB6SC8MMYK3C8R","data-reconciliation","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT140_skillsbench_xlsx-recover-data\u002Fskills\u002Fdata-reconciliation\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},"01M72WQ8R4DZKK1CT397C0ARQD","hierarchical-taxonomy-clustering","Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT139_skillsbench_taxonomy-tree-merge\u002Fskills\u002Fhierarchical-taxonomy-clustering\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},"01M72WQ1989ZX613G3PY8Z492J","nlp-research-repo-package-installment","Align Python version and repo-declared dependencies (requirements.txt \u002F environment.yml) before installing packages for NLP research code reproduction.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT138_skillsbench_simpo-code-reproduction\u002Fskills\u002Fnlp-research-repo-package-installment\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M72WPZ828E746PAB3WCCQARW","state-space-linearization","Linearizing nonlinear dynamics around operating points for control design.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fstate-space-linearization\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M72WPXFXKWDFVTGAYX0B1TSA","mpc-horizon-tuning","Selecting MPC prediction horizon and cost matrices for web handling.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fmpc-horizon-tuning\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"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},"01M72WPW3863555HM0CACRCCFK","integral-action-design","Adding integral action to MPC for offset-free tension tracking.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fintegral-action-design\u002FSKILL.md",[],[]]