{
  "schemaVersion": "1.0",
  "item": {
    "slug": "sonic-build",
    "name": "sonic-build",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/rustiqly/sonic-build",
    "canonicalUrl": "https://clawhub.ai/rustiqly/sonic-build",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/sonic-build",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=sonic-build",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/prerequisites.md",
      "references/troubleshooting.md",
      "references/vs-platform.md",
      "scripts/prerequisites.sh"
    ],
    "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-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/sonic-build"
    },
    "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/sonic-build",
    "agentPageUrl": "https://openagent3.xyz/skills/sonic-build/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sonic-build/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sonic-build/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": "Quick Start",
        "body": "cd sonic-buildimage\nmake init\nmake configure PLATFORM=vs   # or broadcom, mellanox, etc.\nmake SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz\n\nFor dev builds (skip tests): add BUILD_SKIP_TEST=y."
      },
      {
        "title": "Build Architecture",
        "body": "Two-phase build via GNU Make → slave.mk → sonic-slave Docker container:\n\nBookworm phase — compile all packages (debs, python wheels, Docker images) into target/debs/bookworm/\nTrixie phase — assemble final image from phase 1 packages into target/debs/trixie/\n\nMakefile invokes Makefile.work with different BLDENV per phase. The configure target creates per-distro directories."
      },
      {
        "title": "Configuration",
        "body": "All knobs in rules/config. Override in rules/config.user (gitignored, persists across rebases)."
      },
      {
        "title": "Key Knobs",
        "body": "KnobDefaultRecommendedEffectSONIC_CONFIG_BUILD_JOBS14Parallel top-level package buildsSONIC_CONFIG_MAKE_JOBS$(nproc)defaultCompiler threads per packageBUILD_SKIP_TESTny (dev)Skip unit testsSONIC_BUILD_MEMORYunset24gDocker --memory — contains OOM in containerSONIC_DPKG_CACHE_METHODnonerwcacheCache .deb packages for incremental buildsDEFAULT_BUILD_LOG_TIMESTAMPnonesimpleTimestamps in build logsSONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILDunsetyHost Docker daemon instead of DinD"
      },
      {
        "title": "Recommended rules/config.user",
        "body": "SONIC_CONFIG_BUILD_JOBS = 4\nBUILD_SKIP_TEST = y\nSONIC_BUILD_MEMORY = 24g\nDEFAULT_BUILD_LOG_TIMESTAMP = simple"
      },
      {
        "title": "Parallelism",
        "body": "Rule of thumb: JOBS × 6GB ≤ available RAM.\n\nJOBS=1: ~3h VS build, ~10GB RAM\nJOBS=4: significant speedup, ~20GB RAM\nJOBS=8: OOM risk on <48GB RAM\n\nWhy JOBS=1 is slow: 64/194 packages depend on libswsscommon (critical path bottleneck). JOBS=1 leaves most cores idle."
      },
      {
        "title": "Memory Protection",
        "body": "Without limits, parallel builds can trigger the kernel OOM killer on any host process.\n\n# Container-scoped OOM (host stays healthy):\nSONIC_BUILD_MEMORY = 24g\n# Or via CLI:\nmake SONIC_BUILDER_EXTRA_CMDLINE=\"--memory=24g\" ..."
      },
      {
        "title": "DPKG cache (package-level)",
        "body": "SONIC_DPKG_CACHE_METHOD = rwcache\nSONIC_DPKG_CACHE_SOURCE = /var/cache/sonic/artifacts"
      },
      {
        "title": "Version cache (downloads)",
        "body": "SONIC_VERSION_CACHE_METHOD = cache"
      },
      {
        "title": "Rebuilding a Single Package",
        "body": "make target/debs/bookworm/sonic-utilities_1.2-1_all.deb\nmake target/docker-syncd-vs.gz\nls target/debs/bookworm/ | grep <name>"
      },
      {
        "title": "Clean Builds",
        "body": "When to clean: after branch switch, rebase, or unexplained failures.\n\nrm -rf target/*   # always full clean, not selective\nmake configure PLATFORM=vs\nmake SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz\n\nStale artifacts (.bin, squashfs) confuse make into skipping phases."
      },
      {
        "title": "Submodules",
        "body": "make init                                          # after clone or pull\ngit submodule update --init --force src/<module>    # fix corrupted submodule\n\nSSH clone is more reliable than HTTPS (HTTPS can give HTTP 500)."
      },
      {
        "title": "Common Pitfalls",
        "body": "For detailed troubleshooting, see references/troubleshooting.md."
      },
      {
        "title": "Prerequisites",
        "body": "See references/prerequisites.md for host setup (Docker, Python, jinjanator)."
      },
      {
        "title": "VS Platform Notes",
        "body": "See references/vs-platform.md for VS-specific details (TAP devices, port mapping, sai.profile, oper speed)."
      },
      {
        "title": "PR Submission",
        "body": "Single commit per PR (squash before push)\ngit commit -s for DCO sign-off\nRebase to latest master before force-push\nAdd tests — run BUILD_SKIP_TEST=n at least once\nMonitor CI after push"
      }
    ],
    "body": "SONiC Image Build\nQuick Start\ncd sonic-buildimage\nmake init\nmake configure PLATFORM=vs   # or broadcom, mellanox, etc.\nmake SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz\n\n\nFor dev builds (skip tests): add BUILD_SKIP_TEST=y.\n\nBuild Architecture\n\nTwo-phase build via GNU Make → slave.mk → sonic-slave Docker container:\n\nBookworm phase — compile all packages (debs, python wheels, Docker images) into target/debs/bookworm/\nTrixie phase — assemble final image from phase 1 packages into target/debs/trixie/\n\nMakefile invokes Makefile.work with different BLDENV per phase. The configure target creates per-distro directories.\n\nConfiguration\n\nAll knobs in rules/config. Override in rules/config.user (gitignored, persists across rebases).\n\nKey Knobs\nKnob\tDefault\tRecommended\tEffect\nSONIC_CONFIG_BUILD_JOBS\t1\t4\tParallel top-level package builds\nSONIC_CONFIG_MAKE_JOBS\t$(nproc)\tdefault\tCompiler threads per package\nBUILD_SKIP_TEST\tn\ty (dev)\tSkip unit tests\nSONIC_BUILD_MEMORY\tunset\t24g\tDocker --memory — contains OOM in container\nSONIC_DPKG_CACHE_METHOD\tnone\trwcache\tCache .deb packages for incremental builds\nDEFAULT_BUILD_LOG_TIMESTAMP\tnone\tsimple\tTimestamps in build logs\nSONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD\tunset\ty\tHost Docker daemon instead of DinD\nRecommended rules/config.user\nSONIC_CONFIG_BUILD_JOBS = 4\nBUILD_SKIP_TEST = y\nSONIC_BUILD_MEMORY = 24g\nDEFAULT_BUILD_LOG_TIMESTAMP = simple\n\nParallelism\n\nRule of thumb: JOBS × 6GB ≤ available RAM.\n\nJOBS=1: ~3h VS build, ~10GB RAM\nJOBS=4: significant speedup, ~20GB RAM\nJOBS=8: OOM risk on <48GB RAM\n\nWhy JOBS=1 is slow: 64/194 packages depend on libswsscommon (critical path bottleneck). JOBS=1 leaves most cores idle.\n\nMemory Protection\n\nWithout limits, parallel builds can trigger the kernel OOM killer on any host process.\n\n# Container-scoped OOM (host stays healthy):\nSONIC_BUILD_MEMORY = 24g\n# Or via CLI:\nmake SONIC_BUILDER_EXTRA_CMDLINE=\"--memory=24g\" ...\n\nCaching\nDPKG cache (package-level)\nSONIC_DPKG_CACHE_METHOD = rwcache\nSONIC_DPKG_CACHE_SOURCE = /var/cache/sonic/artifacts\n\nVersion cache (downloads)\nSONIC_VERSION_CACHE_METHOD = cache\n\nRebuilding a Single Package\nmake target/debs/bookworm/sonic-utilities_1.2-1_all.deb\nmake target/docker-syncd-vs.gz\nls target/debs/bookworm/ | grep <name>\n\nClean Builds\n\nWhen to clean: after branch switch, rebase, or unexplained failures.\n\nrm -rf target/*   # always full clean, not selective\nmake configure PLATFORM=vs\nmake SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz\n\n\nStale artifacts (.bin, squashfs) confuse make into skipping phases.\n\nSubmodules\nmake init                                          # after clone or pull\ngit submodule update --init --force src/<module>    # fix corrupted submodule\n\n\nSSH clone is more reliable than HTTPS (HTTPS can give HTTP 500).\n\nCommon Pitfalls\n\nFor detailed troubleshooting, see references/troubleshooting.md.\n\nPrerequisites\n\nSee references/prerequisites.md for host setup (Docker, Python, jinjanator).\n\nVS Platform Notes\n\nSee references/vs-platform.md for VS-specific details (TAP devices, port mapping, sai.profile, oper speed).\n\nPR Submission\nSingle commit per PR (squash before push)\ngit commit -s for DCO sign-off\nRebase to latest master before force-push\nAdd tests — run BUILD_SKIP_TEST=n at least once\nMonitor CI after push"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rustiqly/sonic-build",
    "publisherUrl": "https://clawhub.ai/rustiqly/sonic-build",
    "owner": "rustiqly",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/sonic-build",
    "downloadUrl": "https://openagent3.xyz/downloads/sonic-build",
    "agentUrl": "https://openagent3.xyz/skills/sonic-build/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sonic-build/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sonic-build/agent.md"
  }
}