{
  "schemaVersion": "1.0",
  "item": {
    "slug": "causal-graph",
    "name": "Causal Graph Builder",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/weidadong2359/causal-graph",
    "canonicalUrl": "https://clawhub.ai/weidadong2359/causal-graph",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/causal-graph",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=causal-graph",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "build.mjs",
      "package.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/causal-graph"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/causal-graph",
    "agentPageUrl": "https://openagent3.xyz/skills/causal-graph/agent",
    "manifestUrl": "https://openagent3.xyz/skills/causal-graph/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/causal-graph/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Causal Graph Auto-Builder — 因果图谱自动构建",
        "body": "降低 Knowledge Graph 维护成本，自动发现事件因果关系"
      },
      {
        "title": "概述",
        "body": "从日志和记忆文件中自动提取事件、实体、因果关系，构建知识图谱。"
      },
      {
        "title": "1. 实体识别",
        "body": "人物: 瓜农, 龙虾, Jason Zuo\n项目: AgentAwaken, NeuroBoost, ClawWork\n工具: GitHub, Vercel, ClawHub\n概念: 永续记忆, 三层架构, P0 标记"
      },
      {
        "title": "2. 事件提取",
        "body": "[2026-02-22] 实施永续记忆增强\n[2026-02-26] NeuroBoost v5.0 发布\n[2026-03-01] 创建 agentawaken repo"
      },
      {
        "title": "3. 因果关系推断",
        "body": "ClawHub 超时 → 检查版本 → 发现已发布\n永续记忆增强 → 记忆健康度提升 → 任务完成率提升"
      },
      {
        "title": "节点类型",
        "body": "Entity (实体): 人、项目、工具\nEvent (事件): 带时间戳的动作\nConcept (概念): 抽象想法"
      },
      {
        "title": "边类型",
        "body": "causes (导致): A → B\nenables (使能): A 让 B 成为可能\nrequires (需要): A 依赖 B\nrelates (相关): A 与 B 有关"
      },
      {
        "title": "输入",
        "body": "memory/YYYY-MM-DD.md (日志)\nMEMORY.md (长期记忆)\n.issues/open-*.md (任务)"
      },
      {
        "title": "处理",
        "body": "NER (命名实体识别) — 提取人名、项目名\n事件抽取 — 识别动作和时间\n因果推断 — 分析前后关系\n去重合并 — 同一实体不同表述合并"
      },
      {
        "title": "输出",
        "body": "{\n  \"nodes\": [\n    { \"id\": \"agent-awaken\", \"type\": \"project\", \"label\": \"AgentAwaken\" },\n    { \"id\": \"vercel\", \"type\": \"tool\", \"label\": \"Vercel\" },\n    { \"id\": \"deploy-event\", \"type\": \"event\", \"label\": \"部署到 Vercel\", \"timestamp\": \"2026-03-01\" }\n  ],\n  \"edges\": [\n    { \"from\": \"agent-awaken\", \"to\": \"vercel\", \"type\": \"requires\" },\n    { \"from\": \"deploy-event\", \"to\": \"agent-awaken\", \"type\": \"affects\" }\n  ]\n}"
      },
      {
        "title": "方案 A: 规则匹配（快速）",
        "body": "// 简单正则匹配\nconst patterns = {\n  cause: /因为|由于|导致|所以/,\n  enable: /使得|让|允许/,\n  require: /需要|依赖|基于/\n};"
      },
      {
        "title": "方案 B: LLM 提取（准确）",
        "body": "// 用 LLM 分析文本\nconst prompt = `\n从以下文本提取因果关系，输出 JSON:\n{ \"cause\": \"...\", \"effect\": \"...\", \"confidence\": 0.9 }\n\n文本: ${text}\n`;"
      },
      {
        "title": "方案 C: 混合（推荐）",
        "body": "规则匹配快速筛选候选\nLLM 验证和补充细节\n人工审核低置信度关系"
      },
      {
        "title": "使用示例",
        "body": "# 构建图谱\nnode skills/causal-graph/build.mjs\n\n# 查询\nnode skills/causal-graph/query.mjs \"AgentAwaken 的依赖\"\n# 输出: Vercel, GitHub, Next.js, pnpm\n\n# 可视化\nnode skills/causal-graph/visualize.mjs > graph.html"
      },
      {
        "title": "集成到 AgentAwaken",
        "body": "在 Dashboard 显示：\n\n交互式知识图谱\n点击节点查看详情\n高亮因果链路\n时间轴动画"
      },
      {
        "title": "维护成本对比",
        "body": "方式初始成本维护成本准确度手动维护高极高高规则匹配低中中LLM 提取中低高混合方案中低极高\n\n结论: 混合方案最优，初期投入中等，长期维护成本低。"
      },
      {
        "title": "下一步",
        "body": "实现基础规则匹配版本\n集成 LLM 提取\n添加可视化界面\n接入 AgentAwaken Dashboard"
      }
    ],
    "body": "Causal Graph Auto-Builder — 因果图谱自动构建\n\n降低 Knowledge Graph 维护成本，自动发现事件因果关系\n\n概述\n\n从日志和记忆文件中自动提取事件、实体、因果关系，构建知识图谱。\n\n核心功能\n1. 实体识别\n人物: 瓜农, 龙虾, Jason Zuo\n项目: AgentAwaken, NeuroBoost, ClawWork\n工具: GitHub, Vercel, ClawHub\n概念: 永续记忆, 三层架构, P0 标记\n2. 事件提取\n[2026-02-22] 实施永续记忆增强\n[2026-02-26] NeuroBoost v5.0 发布\n[2026-03-01] 创建 agentawaken repo\n\n3. 因果关系推断\nClawHub 超时 → 检查版本 → 发现已发布\n永续记忆增强 → 记忆健康度提升 → 任务完成率提升\n\n图谱结构\n节点类型\nEntity (实体): 人、项目、工具\nEvent (事件): 带时间戳的动作\nConcept (概念): 抽象想法\n边类型\ncauses (导致): A → B\nenables (使能): A 让 B 成为可能\nrequires (需要): A 依赖 B\nrelates (相关): A 与 B 有关\n自动构建流程\n输入\nmemory/YYYY-MM-DD.md (日志)\nMEMORY.md (长期记忆)\n.issues/open-*.md (任务)\n处理\nNER (命名实体识别) — 提取人名、项目名\n事件抽取 — 识别动作和时间\n因果推断 — 分析前后关系\n去重合并 — 同一实体不同表述合并\n输出\n{\n  \"nodes\": [\n    { \"id\": \"agent-awaken\", \"type\": \"project\", \"label\": \"AgentAwaken\" },\n    { \"id\": \"vercel\", \"type\": \"tool\", \"label\": \"Vercel\" },\n    { \"id\": \"deploy-event\", \"type\": \"event\", \"label\": \"部署到 Vercel\", \"timestamp\": \"2026-03-01\" }\n  ],\n  \"edges\": [\n    { \"from\": \"agent-awaken\", \"to\": \"vercel\", \"type\": \"requires\" },\n    { \"from\": \"deploy-event\", \"to\": \"agent-awaken\", \"type\": \"affects\" }\n  ]\n}\n\n实现方案\n方案 A: 规则匹配（快速）\n// 简单正则匹配\nconst patterns = {\n  cause: /因为|由于|导致|所以/,\n  enable: /使得|让|允许/,\n  require: /需要|依赖|基于/\n};\n\n方案 B: LLM 提取（准确）\n// 用 LLM 分析文本\nconst prompt = `\n从以下文本提取因果关系，输出 JSON:\n{ \"cause\": \"...\", \"effect\": \"...\", \"confidence\": 0.9 }\n\n文本: ${text}\n`;\n\n方案 C: 混合（推荐）\n规则匹配快速筛选候选\nLLM 验证和补充细节\n人工审核低置信度关系\n使用示例\n# 构建图谱\nnode skills/causal-graph/build.mjs\n\n# 查询\nnode skills/causal-graph/query.mjs \"AgentAwaken 的依赖\"\n# 输出: Vercel, GitHub, Next.js, pnpm\n\n# 可视化\nnode skills/causal-graph/visualize.mjs > graph.html\n\n集成到 AgentAwaken\n\n在 Dashboard 显示：\n\n交互式知识图谱\n点击节点查看详情\n高亮因果链路\n时间轴动画\n维护成本对比\n方式\t初始成本\t维护成本\t准确度\n手动维护\t高\t极高\t高\n规则匹配\t低\t中\t中\nLLM 提取\t中\t低\t高\n混合方案\t中\t低\t极高\n\n结论: 混合方案最优，初期投入中等，长期维护成本低。\n\n下一步\n实现基础规则匹配版本\n集成 LLM 提取\n添加可视化界面\n接入 AgentAwaken Dashboard"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/weidadong2359/causal-graph",
    "publisherUrl": "https://clawhub.ai/weidadong2359/causal-graph",
    "owner": "weidadong2359",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/causal-graph",
    "downloadUrl": "https://openagent3.xyz/downloads/causal-graph",
    "agentUrl": "https://openagent3.xyz/skills/causal-graph/agent",
    "manifestUrl": "https://openagent3.xyz/skills/causal-graph/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/causal-graph/agent.md"
  }
}