Logo Claw Image Build

Claw Image Build

Cộng đồng
kevinslin
claw-image-build

Build, publish, and verify OpenClaw Docker/GHCR images. Use when the user asks to build an OpenClaw image, publish or republish GHCR tags, bundle official plugins such as @openclaw/codex, @openclaw/slack, or @openclaw/diagnostics-otel, make or verify multi-arch linux/amd64 and linux/arm64 images, check GHCR visibility, secret-scan an image, enforce Codex image contract gates, or prove a published OpenClaw Docker image works.

Tổng quan

Nhà phát hànhkevinslin
Kho mãagstack
Tên kỹ năngclaw-image-build
Sao
26
Bản fork
1
Tệp đi kèm
2
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được kevinslin công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Claw Image Build trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/kevinslin/agstack/tree/main/active/claw-image-build
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinslin/agstack.git /tmp/agstack
mkdir -p .claude/skills
cp -r /tmp/agstack/active/claw-image-build .claude/skills/claw-image-build
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Claw Image Build trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Claw Image Build ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Claw Image Build với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Claw Image Build

Use this skill for OpenClaw container image work from source checkout to published GHCR proof.

Contract

  1. Work from the current OpenClaw checkout unless the user explicitly asks for another worktree.
  2. Respect the repo AGENTS.md: do not switch worktrees for git mutations, do not print secrets, do not print Docker auth configuration, and verify live sources when requested.
  3. Pull or checkout exactly what the user asked for before building. If the worktree is dirty, stop before git pull and report the dirty state. If the user asks for a new worktree, create it from the latest upstream default branch and preserve unrelated local changes.
  4. Read docs/install/docker.md and the relevant package manifests before choosing build args or plugin install strategy. Unless the user explicitly narrows or changes the plugin set, require @openclaw/codex, @openclaw/slack, and @openclaw/diagnostics-otel.
  5. Resolve "latest" from the repository's actual upstream default branch. If a prompt says origin/master but the default branch is different, fetch the default branch, record the exact commit, and state the branch name used.
  6. Build multi-arch images when requested; include linux/amd64 explicitly for x86_64/amd64 proof unless the user says otherwise.
  7. Prefer ghcr.io/kevinslin/openclaw for Kevin's registry unless the user explicitly provides a different owner. Verify namespace and visibility with gh api.
  8. Do not claim success from a local image only. Pull the published tag back from GHCR and verify the requested platforms.
  9. Always run an image secret-hygiene pass before closeout when publishing or when the user asks about secrets.
  10. Never deploy, restart, or modify any live gateway, devbox, or service while building or verifying images. Do not modify the OpenAI monorepo or its Applied spec as part of OpenClaw image work.
  11. For Codex images or source/base-image updates affecting Codex, treat the built image itself as the artifact under test. Run the Codex image contract gate in ./references/workflow.md before publishing or reporting success.

Build Strategy

Use the repo Dockerfile and repository-native build pipeline when it can build the requested image directly. Do not rebase onto an unrelated runtime image and do not modify built plugin contents after the final packaging stage.

For self-contained source-bundled images, build OpenClaw and bundled plugins from the same source revision whenever the repository supports it. Do not combine a newer OpenClaw source build with older published plugin packages. The default required plugin set is @openclaw/codex, @openclaw/slack, and @openclaw/diagnostics-otel; use the repository's standard bundled-extension packaging location and build args, for example OPENCLAW_EXTENSIONS=diagnostics-otel,codex,slack, unless the user explicitly mentions a different plugin set. Preserve manifests, runtime dependencies, source maps, assets, and generated output required for plugin discovery and runtime loading.

diagnostics-otel is a first-class packaged plugin for these images. It must not require openclaw plugins install, npm installation, network access, or filesystem mutation at container startup. Do not add runtime installation scripts for it; remove or replace manual diagnostics installation logic with packaged plugin coverage.

If native Docker source compile fails under cross-arch emulation but the local source build passes, use the proven runtime-image assembly pattern from ./references/workflow.md: build dist locally, then assemble per-platform runtime images with BuildKit --build-context built_dist=./dist. Use that fallback only when the repo Dockerfile cannot complete the requested source build.

For @openclaw/codex image work, build from an immutable OpenClaw commit with an OCI revision label, verify packaging and base-image digests inside the artifact, and run the #96872 thread/start behavioral contract from a validation stage or external harness. Do not rely on source Vitest running inside the production image.

For source-bundled plugins, "available" means:

  • source package manifest exists under extensions/<id>/package.json;
  • packaged manifest and entrypoint exist under /app/dist/extensions/<id>/;
  • runtime dependencies needed by the plugin are present in the final image;
  • node openclaw.mjs plugins inspect <id> --runtime --json succeeds from the pulled published image;
  • startup logs contain no plugin install, npm install, module-resolution, or missing-dependency errors.

For external npm plugin images, "available" means:

  • installed in the OpenClaw plugin store under /home/node/.openclaw/npm/projects/.../node_modules/<package>/package.json;
  • enabled in config;
  • node openclaw.mjs plugins inspect <id> --json reports status: "loaded" from the pulled published image.

Do not rely on require.resolve("@openclaw/<plugin>/package.json") from /app unless the image intentionally bundles that package as a root/runtime dependency. External official plugins may be plugin-store installs rather than root app dependencies.

Workflow

  1. Establish source and tags:
    • git status -sb
    • if clean and user asked for latest: fetch/pull the upstream default branch with the repo-required workflow
    • record git rev-parse HEAD, git rev-parse --short=10 HEAD, and node -p "require('./package.json').version"
    • determine and reuse the repository's existing snapshot/release tag convention; do not invent one.
  2. Inspect docs and plugin packages:
    • docs/install/docker.md
    • Dockerfile
    • extensions/<plugin>/package.json
    • for source-bundled plugin images, verify OpenClaw and each default/requested plugin package report the same intended version from the same checkout.
    • use npm view @openclaw/<plugin> version dist.tarball --json only for images that intentionally install external npm plugin packages.
  3. Build and push arch-specific tags first:
    • <baseTag>-amd64
    • <baseTag>-arm64
  4. Create multi-arch tags with docker buildx imagetools create.
  5. Verify GHCR:
    • manifest digest and platforms;
    • package visibility;
    • expected tag set.
  6. Pull-run verify each requested platform:
    • OpenClaw version;
    • default/requested plugin discovery and runtime inspect output;
    • package manifests in plugin store when external npm plugins are requested;
    • packaged manifests, entrypoints, and runtime dependencies when source-bundled plugins are requested;
    • /healthz returns HTTP 200;
    • offline --network none startup succeeds after the image has been pulled.
  7. Secret-scan:
    • container environment names only, never values;
    • docker history --no-trunc keyword count.
  8. Run focused package, Docker, typecheck, and integration tests that cover changed packaging behavior, including packaged inventory, manifests, entrypoints, runtime dependencies, version metadata, no manual diagnostics install, and offline plugin discovery. Do not hide unrelated failures; distinguish pre-existing failures from regressions.
  9. Report source branch and exact commit, chosen version, plugin versions, changed files, bundling mechanism, Docker build command, registry destination, pushed tag and immutable digest, local/remote digest comparison, exact verification and test commands with results, offline-start proof, caveats, secret-scan result, and worktree status.

References

Read ./references/workflow.md before building or republishing an image. It contains command templates for the runtime assembly fallback, manifest creation, plugin verification, and secret checks.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Claw Image Build làm được gì?

Build, publish, and verify OpenClaw Docker/GHCR images. Use when the user asks to build an OpenClaw image, publish or republish GHCR tags, bundle official plugins such as @openclaw/codex, @openclaw/slack, or @openclaw/diagnostics-otel, make or verify multi-arch linux/amd64 and linux/arm64 images, check GHCR visibility, secret-scan an image, enforce Codex image contract gates, or prove a published OpenClaw Docker image works.

Vì sao nên dùng Claw Image Build trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Claw Image Build là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Claw Image Build trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/kevinslin/agstack/tree/main/active/claw-image-build. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Claw Image Build?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Claw Image Build với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Claw Image Build với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Claw Image Build có miễn phí không?

Kỹ năng này được kevinslin phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇