{
  "schemaVersion": "1.0",
  "item": {
    "slug": "helper",
    "name": "Pywayne Helper",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangyendt/helper",
    "canonicalUrl": "https://clawhub.ai/wangyendt/helper",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/helper",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=helper",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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/helper"
    },
    "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/helper",
    "agentPageUrl": "https://openagent3.xyz/skills/helper/agent",
    "manifestUrl": "https://openagent3.xyz/skills/helper/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/helper/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": "Pywayne Helper",
        "body": "项目配置管理辅助工具，实现跨进程、跨文件的参数共享机制。"
      },
      {
        "title": "Quick Start",
        "body": "from pywayne.helper import Helper\n\n# 初始化（自动检测调用者所在目录作为项目根目录）\nhelper = Helper()\n\n# 进程 A：写入配置\nhelper.set_module_value('database', 'host', value='127.0.0.1')\n\n# 进程 B：读取配置（自动等待直到值存在）\ndb_host = helper.get_module_value('database', 'host', max_waiting_time=10)\nprint(f\"数据库主机: {db_host}\")"
      },
      {
        "title": "跨进程/跨文件参数共享",
        "body": "Helper 通过项目根目录下的 YAML 配置文件实现参数共享：\n\nproject_root/\n├── common_info.yaml          # 配置文件，自动创建\n├── module_a/              # 模块 A\n└── module_b/              # 模块 B\n\n工作原理：\n\n任何模块初始化 Helper 实例，自动定位到项目根目录\n配置文件统一位于 {project_root}/common_info.yaml\n各模块通过 set_module_value 写入配置\n各模块通过 get_module_value 读取配置\n支持等待机制，确保读取到其他进程写入的值\n\n适用场景：\n\n场景说明多进程协作进程 A 写配置，进程 B 读配置分布式任务主进程设置参数，子进程读取执行配置传递程序启动时写入配置，后续模块读取动态参数模块间共享动态生成的参数（如 token、临时 ID）"
      },
      {
        "title": "Initialization",
        "body": "# 使用调用者所在目录作为项目根目录（推荐）\nhelper = Helper('./')\n\n# 指定项目根目录\nhelper = Helper('/path/to/project')\n\n# 自定义配置文件名\nhelper = Helper('/path/to/project', config_file_name='shared_config.yaml')"
      },
      {
        "title": "set_module_value",
        "body": "设置嵌套配置键的值。\n\n# 写入数据库配置\nhelper.set_module_value('database', 'host', value='127.0.0.1')\nhelper.set_module_value('database', 'port', value=5432)\n\n# 写入 API 配置\nhelper.set_module_value('api', 'token', value='abc123')\nhelper.set_module_value('api', 'endpoint', value='https://api.example.com')\n\n# 写入共享临时参数\nhelper.set_module_value('shared', 'temp_id', value='temp_123')\nhelper.set_module_value('shared', 'status', value='running')\n\n参数说明：\n\n*keys: 按嵌套层级排列的键\nvalue: 要设置的值"
      },
      {
        "title": "get_module_value",
        "body": "获取嵌套配置键的值，支持等待机制。\n\n# 基本获取\nhost = helper.get_module_value('database', 'host')\n\n# 等待最多 10 秒，直到值存在（跨进程场景）\nhost = helper.get_module_value('database', 'host', max_waiting_time=10)\n\n# 禁用调试输出\nhost = helper.get_module_value('database', 'host', debug=False)\n\n# 未找到时返回 None\nif host is None:\n    print(\"配置未找到\")\n\n参数说明：\n\n*keys: 按嵌套层级排列的键\nmax_waiting_time (可选): 最大等待时间（秒），轮询配置文件直到值存在\ndebug (可选): 是否启用调试信息，默认 True\n\n返回值：\n\n找到值：返回配置值\n超时：返回 None"
      },
      {
        "title": "delete_module_value",
        "body": "删除嵌套配置键的值。\n\n# 删除指定键\nhelper.delete_module_value('database', 'host')\n\n# 删除整个分支\nhelper.delete_module_value('database')\n\n# 清除临时参数\nhelper.delete_module_value('shared', 'temp_id')\n\n参数说明：\n\n*keys: 按嵌套层级排列的键"
      },
      {
        "title": "get_proj_root",
        "body": "获取项目根目录路径。\n\nroot = helper.get_proj_root()\nprint(f\"项目根目录: {root}\")"
      },
      {
        "title": "get_config_path",
        "body": "获取配置文件路径。\n\nconfig_path = helper.get_config_path()\nprint(f\"配置文件: {config_path}\")"
      },
      {
        "title": "模式 1：主进程配置，子进程读取",
        "body": "# main.py - 主进程\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nhelper.set_module_value('task', 'config', value={'param1': 1, 'param2': 2})\n\n# 启动子进程\nimport subprocess\nsubprocess.run(['python', 'worker.py'])\n\n# worker.py - 子进程\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nconfig = helper.get_module_value('task', 'config', max_waiting_time=5)\nprint(f\"收到配置: {config}\")"
      },
      {
        "title": "模式 2：模块间共享参数",
        "body": "# module_a.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nhelper.set_module_value('shared', 'data_file', value='/path/to/data.csv')\n\n# module_b.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ndata_file = helper.get_module_value('shared', 'data_file', max_waiting_time=10)\nwith open(data_file, 'r') as f:\n    # 处理文件\n    pass"
      },
      {
        "title": "模式 3：动态参数传递",
        "body": "# sender.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ntemp_id = generate_temp_id()\nhelper.set_module_value('shared', 'temp_id', value=temp_id)\n\n# 通知接收者...\n\n# receiver.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ntemp_id = helper.get_module_value('shared', 'temp_id', max_waiting_time=60)\nif temp_id:\n    # 使用 temp_id\n    pass"
      },
      {
        "title": "配置文件结构",
        "body": "Helper 操作的配置文件为 YAML 格式，示例结构：\n\ndatabase:\n  host: 127.0.0.1\n  port: 5432\napi:\n  token: abc123\n  endpoint: https://api.example.com\nshared:\n  temp_id: temp_123\n  status: running"
      },
      {
        "title": "注意事项",
        "body": "统一配置文件: 所有模块共享同一个 common_info.yaml（或自定义文件名）\n自动创建: 配置文件不存在时，初始化会自动创建空文件\n路径检测: 未指定 project_root 时，自动根据调用者所在文件目录确定项目根目录\n等待机制: max_waiting_time 用于等待其他进程写入的配置值\n并发安全: YAML 写入使用 update 模式，减少并发冲突风险"
      }
    ],
    "body": "Pywayne Helper\n\n项目配置管理辅助工具，实现跨进程、跨文件的参数共享机制。\n\nQuick Start\nfrom pywayne.helper import Helper\n\n# 初始化（自动检测调用者所在目录作为项目根目录）\nhelper = Helper()\n\n# 进程 A：写入配置\nhelper.set_module_value('database', 'host', value='127.0.0.1')\n\n# 进程 B：读取配置（自动等待直到值存在）\ndb_host = helper.get_module_value('database', 'host', max_waiting_time=10)\nprint(f\"数据库主机: {db_host}\")\n\n跨进程/跨文件参数共享\n\nHelper 通过项目根目录下的 YAML 配置文件实现参数共享：\n\nproject_root/\n├── common_info.yaml          # 配置文件，自动创建\n├── module_a/              # 模块 A\n└── module_b/              # 模块 B\n\n\n工作原理：\n\n任何模块初始化 Helper 实例，自动定位到项目根目录\n配置文件统一位于 {project_root}/common_info.yaml\n各模块通过 set_module_value 写入配置\n各模块通过 get_module_value 读取配置\n支持等待机制，确保读取到其他进程写入的值\n\n适用场景：\n\n场景\t说明\n多进程协作\t进程 A 写配置，进程 B 读配置\n分布式任务\t主进程设置参数，子进程读取执行\n配置传递\t程序启动时写入配置，后续模块读取\n动态参数\t模块间共享动态生成的参数（如 token、临时 ID）\nInitialization\n# 使用调用者所在目录作为项目根目录（推荐）\nhelper = Helper('./')\n\n# 指定项目根目录\nhelper = Helper('/path/to/project')\n\n# 自定义配置文件名\nhelper = Helper('/path/to/project', config_file_name='shared_config.yaml')\n\nMethods\nset_module_value\n\n设置嵌套配置键的值。\n\n# 写入数据库配置\nhelper.set_module_value('database', 'host', value='127.0.0.1')\nhelper.set_module_value('database', 'port', value=5432)\n\n# 写入 API 配置\nhelper.set_module_value('api', 'token', value='abc123')\nhelper.set_module_value('api', 'endpoint', value='https://api.example.com')\n\n# 写入共享临时参数\nhelper.set_module_value('shared', 'temp_id', value='temp_123')\nhelper.set_module_value('shared', 'status', value='running')\n\n\n参数说明：\n\n*keys: 按嵌套层级排列的键\nvalue: 要设置的值\nget_module_value\n\n获取嵌套配置键的值，支持等待机制。\n\n# 基本获取\nhost = helper.get_module_value('database', 'host')\n\n# 等待最多 10 秒，直到值存在（跨进程场景）\nhost = helper.get_module_value('database', 'host', max_waiting_time=10)\n\n# 禁用调试输出\nhost = helper.get_module_value('database', 'host', debug=False)\n\n# 未找到时返回 None\nif host is None:\n    print(\"配置未找到\")\n\n\n参数说明：\n\n*keys: 按嵌套层级排列的键\nmax_waiting_time (可选): 最大等待时间（秒），轮询配置文件直到值存在\ndebug (可选): 是否启用调试信息，默认 True\n\n返回值：\n\n找到值：返回配置值\n超时：返回 None\ndelete_module_value\n\n删除嵌套配置键的值。\n\n# 删除指定键\nhelper.delete_module_value('database', 'host')\n\n# 删除整个分支\nhelper.delete_module_value('database')\n\n# 清除临时参数\nhelper.delete_module_value('shared', 'temp_id')\n\n\n参数说明：\n\n*keys: 按嵌套层级排列的键\nget_proj_root\n\n获取项目根目录路径。\n\nroot = helper.get_proj_root()\nprint(f\"项目根目录: {root}\")\n\nget_config_path\n\n获取配置文件路径。\n\nconfig_path = helper.get_config_path()\nprint(f\"配置文件: {config_path}\")\n\n使用模式\n模式 1：主进程配置，子进程读取\n# main.py - 主进程\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nhelper.set_module_value('task', 'config', value={'param1': 1, 'param2': 2})\n\n# 启动子进程\nimport subprocess\nsubprocess.run(['python', 'worker.py'])\n\n# worker.py - 子进程\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nconfig = helper.get_module_value('task', 'config', max_waiting_time=5)\nprint(f\"收到配置: {config}\")\n\n模式 2：模块间共享参数\n# module_a.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\nhelper.set_module_value('shared', 'data_file', value='/path/to/data.csv')\n\n# module_b.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ndata_file = helper.get_module_value('shared', 'data_file', max_waiting_time=10)\nwith open(data_file, 'r') as f:\n    # 处理文件\n    pass\n\n模式 3：动态参数传递\n# sender.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ntemp_id = generate_temp_id()\nhelper.set_module_value('shared', 'temp_id', value=temp_id)\n\n# 通知接收者...\n\n# receiver.py\nfrom pywayne.helper import Helper\n\nhelper = Helper()\ntemp_id = helper.get_module_value('shared', 'temp_id', max_waiting_time=60)\nif temp_id:\n    # 使用 temp_id\n    pass\n\n配置文件结构\n\nHelper 操作的配置文件为 YAML 格式，示例结构：\n\ndatabase:\n  host: 127.0.0.1\n  port: 5432\napi:\n  token: abc123\n  endpoint: https://api.example.com\nshared:\n  temp_id: temp_123\n  status: running\n\n注意事项\n统一配置文件: 所有模块共享同一个 common_info.yaml（或自定义文件名）\n自动创建: 配置文件不存在时，初始化会自动创建空文件\n路径检测: 未指定 project_root 时，自动根据调用者所在文件目录确定项目根目录\n等待机制: max_waiting_time 用于等待其他进程写入的配置值\n并发安全: YAML 写入使用 update 模式，减少并发冲突风险"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wangyendt/helper",
    "publisherUrl": "https://clawhub.ai/wangyendt/helper",
    "owner": "wangyendt",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/helper",
    "downloadUrl": "https://openagent3.xyz/downloads/helper",
    "agentUrl": "https://openagent3.xyz/skills/helper/agent",
    "manifestUrl": "https://openagent3.xyz/skills/helper/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/helper/agent.md"
  }
}