[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6993EDFADXE3JN66E8RTJJ3":3,"skill-same:01M6993EDFADXE3JN66E8RTJJ3":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":17,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6993EDFADXE3JN66E8RTJJ3","build-images","Capsem VM 运行时镜像构建","Building the Capsem VM runtime (kernel, initrd, rootfs). Use when working on the runtime package set, Dockerfile templates, kernel or rootfs builds, or the capsem-builder backend.","构建 Capsem VM 运行时（内核、initrd、rootfs）。适用于处理运行时包集、Dockerfile 模板、内核或 rootfs 构建，以及 capsem-builder 后端相关工作。","google\u002Fcapsem","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M69939YZJTP726NQK4NZNB48",186,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fbuild-images\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BS1P6715AXNH65AAKPM4HF","内核与系统调用开发","SCENARIO","使用场景",[31,32],"build images","kernel","2026-11-10 10:12:30",false,"---\nname: build-images\ndescription: Building the Capsem VM runtime (kernel, initrd, rootfs). Use when working on the runtime package set, Dockerfile templates, kernel or rootfs builds, or the capsem-builder backend.\n---\n\n# Building the Capsem VM runtime\n\n## Overview\n\nCapsem builds one VM runtime: a kernel, initrd and rootfs per architecture.\nApplications come from OCI images (`images\u002F`,\nresolved through `images\u002Fcatalog.toml`), never from the runtime rootfs, so\nevery build of a commit produces the same asset set.\n\n- `config\u002Fdocker\u002Fimage\u002F` is the runtime's source: `build.toml` (package set,\n  EROFS settings, size budgets, kernel pin, base images), `manifest.toml`, and\n  the `kernel\u002F`, `security\u002F` and `vm\u002F` inputs.\n- `guest\u002Fartifacts\u002F` holds the core guest payloads: `capsem-init`, doctor,\n  diagnostics, bench, the container launcher.\n- `capsem-admin image build` copies those two inputs into a generated backend\n  workspace under `cache\u002Ftarget\u002Fbuild\u002Fimage-workspace\u002F\u003Carch|all>\u002F` and runs the\n  build there.\n- The Python builder backend renders Docker templates and emits assets, build\n  ledgers, and OBOMs only when invoked by the admin build rail. Do not add\n  product truth directly to the backend image-spec path.\n\n## Source Layout\n\n```\nconfig\u002F\n  docker\u002F                 Dockerfile templates (*.j2)\n  docker\u002Fimage\u002F\n    build.toml            Runtime package set, EROFS, rootfs budgets, kernel pin\n    manifest.toml         Image manifest metadata and changelog\n    kernel\u002F               defconfig.\u003Carch> and ordered kernel patches\n    security\u002F             Built-in web security inputs\n    vm\u002F                   Guest shell environment\nguest\u002Fartifacts\u002F          Core guest payloads: init, doctor, diagnostics, bench\nimages\u002F                   OCI application images and their catalog\ncache\u002Ftarget\u002Fassets\u002F            Generated VM assets\ncache\u002Ftarget\u002Fpackages\u002F          Generated native packages\n```\n\nThe materialized backend workspace is an implementation detail, not an\nauthoring surface. It is never a config root.\n\n`capsem-admin` is a tool, not a config authority. It validates, materializes,\nbuilds, and checks contracts; it must not grow scaffolding commands that invent\nMCP, AI provider, package, or rule truth. Do not add admin config roots, guest\nconfig roots, settings metadata, provider registries, or backend-owned\ncatalogs as product truth.\n\n## CLI commands\n\n```bash\njust build-assets [arch]                      # The runtime for one arch, or every one\njust _build-assets [arch]                     # Same rebuild, CI-facing name\njust _build-kernel arm64                      # Kernel slice\njust _build-rootfs arm64                      # Rootfs slice\nuv run --project build_system --frozen capsem-builder audit                  # Parse trivy\u002Fgrype vulnerability output\n```\n\nUnderneath, the gate runs\n`capsem-admin image build [--config-root config] [--guest-dir guest] [--output assets] [--arch arm64|x86_64] [--template all|kernel|rootfs] [--clean] [--json]`.\n\nUse admin\u002Fjust recipes for all runtime image work. `capsem-builder` is a\nbackend helper only; it must not expose or document public `build`, `validate`,\n`inspect`, `mcp`, render-only, or dry-run rails for image authoring.\n`capsem-admin image build` may call private Python modules such as\n`capsem_builder.image.image_build_backend`; agents must not make those modules\npublic CLI contracts.\n\n## Per-arch asset layout\n\n```\ncache\u002Ftarget\u002Fassets\u002F\n  manifest.json          Version, checksums, asset list\n  B3SUMS                 BLAKE3 checksums\n  arm64\u002F\n    vmlinuz              Kernel\n    rootfs.erofs         Root filesystem\n    initrd.img           Initial ramdisk (repacked by just exec)\n```\n\nThe approved release default is EROFS with `lz4hc` compression level 12\n(`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.erofs]`).\n\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.rootfs]` also owns two independent\nrelease budgets: the exported tar ceiling and the final EROFS ceiling. The\nbuilder checks the first before compression and the second before writing the\nartifact ledger. Never raise a size ceiling to accommodate an unexplained\nimage jump; inspect the rootfs composition first.\n\n## Build Ledger\n\nEach per-arch build emits `build-ledger.log` JSONL. The\n`rootfs.config_inputs` record captures the rendered rootfs package list and\nthe EROFS config. Installed-package\u002Fcomponent truth belongs in the CycloneDX\nOBOM, not the build ledger.\n\n## Adding a guest tool\n\nThe runtime package set is\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.rootfs].runtime_apt_packages`. Add a\npackage there **only** when Capsem's own guest machinery needs it: the\ncontainer launcher (runc, umoci, iptables, iproute2), `capsem-init` (auditd,\ne2fsprogs), the trust store the Capsem CA lands in, or what capsem-doctor,\ncapsem-bench and the network diagnostics run with.\n\nAnything a user or an agent works with -- an AI CLI, a language toolchain, a\nvendor binary -- belongs in an OCI image under `images\u002F`, not in the runtime.\n\n1. Add the package to `runtime_apt_packages` (no duplicates; the model refuses\n   an empty or duplicated list).\n2. Rebuild with `just build-assets` (or `just _build-rootfs \u003Carch>`).\n3. Verify with `capsem-doctor` inside a booted VM.\n\nDo not edit generated Dockerfiles. Docker templates live under `config\u002Fdocker\u002F`.\n\n## Dockerfile templates\n\nTemplates live in `config\u002Fdocker\u002F`:\n- `Dockerfile.rootfs-dependencies.j2` -- snapshot-selected Debian packages;\n- `Dockerfile.kernel-dependencies.j2` -- snapshot-selected kernel toolchain and\n  the SHA-256-verified kernel archive;\n- `Dockerfile.rootfs.j2` -- network-denied first-party rootfs assembly;\n- `Dockerfile.kernel.j2` -- network-denied kernel compilation, initrd assembly,\n  and vmlinuz extraction.\n\n`asset-dependencies` is the visible resumable frontier between those pairs.\nThe gate materializes one input-keyed helper for every selected\narchitecture\u002Ftemplate, validates its platform and identity label, and\npasses only its exact image ID to the source build. Source builds always use\nBuildKit network `none` and never use the remote CI cache. A carried frontier\nmust revalidate every helper; it must not silently rebuild inside the sealed\nlane. The dependency helpers reuse the one checked-in Debian snapshot\nauthority rather than the mutable sources inherited from the base image.\n\n## Private build-helper generations\n\nLocal qualification and hosted qualification use one materialization path.\nWhenever an exact input-keyed helper is absent locally, its owning materializer\nfirst tries the platform-scoped generation under\n`ghcr.io\u002Fgoogle\u002Fcapsem-ci`. It validates the pulled image's platform, input-key\nlabel, and `org.opencontainers.image.source` label before retagging it locally.\nAn unavailable, unauthenticated, or invalid remote generation falls through to\nthe same deterministic network-open local build; there is no cache-only build\npath and no opt-in environment switch.\n\nThe private inventory contains the host builder, Linux parity base, install\nbuilder, both package builders, both guest Rust builders, the host asset-tools\nbuilder, and the host architecture's kernel and rootfs dependency builders.\n`capsem-gate private-images --publish` materializes that inventory before it\npublishes immutable generation tags. `.github\u002Fworkflows\u002Fprivate-images.yaml`\nruns it weekly and on defining-input changes, independently of the release and\nofficial OCI image workflows, and retains the latest three tagged generations\nper helper and platform.\n\nDevelopers who can read the repository's private packages may authenticate\nDocker to GHCR for warm local qualification. Missing credentials only select\nthe local fallback; they do not change the resulting helper identity. Keep all\nhelper Dockerfiles under `build_system\u002Fdocker\u002F` and dependency templates under\n`config\u002Fdocker\u002F`; add any new network-open helper to the single inventory and\nthe repository-source-label guard.\n\nKeep the verified registry alias when retagging an imported helper. BuildKit\ncan fetch inherited lazy layers from that origin; a local-only FROM name can\nredirect those fetches to Docker Hub. Resolve the registry digest through the\nshared Docker boundary and retain exact image-ID\u002Fplatform checks. Cache\nretirement removes all owned aliases and accounts for the image bytes once.\nEvery child build includes the Linux parity base and source lane: use the\nshared exact-reference check before building and verify the identity afterward.\nWithout a qualified registry origin, keep the verified local tag even if Docker\nrecords local RepoDigests. BuildKit can resolve those digests through Docker Hub\ninstead of the local image store, breaking sealed source builds.\n\nTemplates use Jinja2 with variables from the admin-materialized image\nworkspace. Do not add a second preview rail for product truth; if a build input\nneeds validation, add it to the normal admin validation path.\n\nEvery architecture's `base_image` is required to be its immutable\n`repository@sha256:\u003Cchild-manifest>` identity. Do not use a mutable tag or the\nmulti-platform index. `capsem-gate` materializes a missing exact child through\nthe Docker daemon before the cross-execution probe and build lanes; keep this\non the ordinary guarded Docker runner, not the host-process egress broker.\n\n---\n\n# Builder Internals (for modifying the builder itself)\n\n## Architecture: config\u002Fdocker\u002Fimage -> admin workspace -> Pydantic -> context dict -> Jinja2 -> Dockerfile\n\n1. **Runtime source** (`config\u002Fdocker\u002Fimage\u002F` and `guest\u002Fartifacts\u002F`).\n2. **capsem-admin** copies both into a backend build workspace.\n3. **Pydantic models** (`build_system\u002Fbuilder\u002Fimage\u002Fmodels.py`) parse that workspace.\n4. **Context dict** (`build_system\u002Fbuilder\u002Fimage\u002Fdocker.py`) feeds Jinja2 templates.\n5. **Jinja2 templates** (`config\u002Fdocker\u002F`) produce Dockerfiles.\n\n### Key files\n\n| File | Role |\n|------|------|\n| `build_system\u002Fbuilder\u002Fimage\u002Fmodels.py` | All Pydantic models (enums, configs, top-level `GuestImageConfig`) |\n| `build_system\u002Fbuilder\u002Fimage\u002Fconfig.py` | Backend loader for admin-materialized build workspaces |\n| `build_system\u002Fbuilder\u002Fimage\u002Fdocker.py` | Context builders (`_rootfs_context`, `_kernel_context`), rendering, build execution |\n| `build_system\u002Fbuilder\u002Fimage\u002Fimage_build_backend.py` | Private admin-invoked image build backend; not a public CLI |\n| `crates\u002Fcapsem-admin\u002Fsrc\u002Fimage_build.rs` | `image build` \u002F `image workspace`: workspace materialization and the build plan |\n| `config\u002Fdocker\u002FDockerfile.rootfs.j2` | Rootfs Dockerfile template |\n| `config\u002Fdocker\u002FDockerfile.kernel.j2` | Kernel Dockerfile template |\n| `build_system\u002Fbuilder\u002Fimage\u002Fvalidate.py` | Validation rules (E001-E302, W001-W012) |\n| `build_system\u002Fbuilder\u002Fimage\u002Fcli.py` | Click CLI entry points |\n\n### Context dict (rootfs template variables)\n\n`_rootfs_context()` in `docker.py` builds the dict passed to `Dockerfile.rootfs.j2`\n(plus the Debian snapshot keys):\n\n```python\n{\n    \"arch\": ArchConfig,           # Per-arch settings (docker_platform, rust_target, etc.)\n    \"arch_name\": str,             # \"arm64\" or \"x86_64\"\n    \"apt_packages\": list[str],    # build.toml [build.rootfs].runtime_apt_packages\n    \"guest_binaries\": list[str],  # GUEST_BINARIES in docker.py\n}\n```\n\n### Kernel context dict\n\n```python\n{\n    \"arch\": ArchConfig,\n    \"arch_name\": str,\n    \"kernel_version\": str,  # exact checked-in release, e.g. \"6.18.44\"\n    \"kernel_sha256\": str,   # verified before the source archive is extracted\n    \"kernel_patches\": list, # applied in order with --fuzz=0\n}\n```\n\n## How to: Add a new guest binary\n\nGuest binaries are compiled from `crates\u002Fcapsem-agent\u002F`. Every architecture on\nevery host goes through `container_compile_agent()`; native Linux has no second\nambient Cargo\u002Frustup rail. The asset preflight first materializes the host\nplatform's config-selected exact Rust child image plus the checked-in Rust\ntoolchain and `Cargo.lock`; a foreign target also materializes its exact\nconfig-pinned C compiler package and both the foreign-target and host-target\nCargo dependency sets. The host set covers target-gated build-script and\nproc-macro dependencies that `cargo fetch --target \u003Cforeign>` does not select.\nThe actual container build runs with\n`--network none` and Cargo `--locked --offline`.\n\nMaterialize only helpers the command can consume: every requested architecture\non either supported host, and none for a kernel-only build. Immutable Debian\nguest bases remain architecture-selected separately.\n\n1. Add the binary target in `crates\u002Fcapsem-agent\u002FCargo.toml`\n2. Add the binary name to `GUEST_BINARIES` list in `docker.py`\n3. The template already loops `{% for binary in guest_binaries %}` to COPY + chmod 555\n\n## Verifying Linux builds locally\n\n`just _cross-compile [arch]` builds everything in a container: agent binaries,\nfrontend, and the full Linux `.deb` package. Useful for catching system\ndependency issues before CI.\n\n```bash\njust _cross-compile           # Build for host arch (arm64 on Apple Silicon)\njust _cross-compile x86_64    # Build x86_64 deb\n```\n\n## Build pipeline (what `build_image()` does)\n\nFor rootfs:\n1. Build guest agent binaries (`cross_compile_agent` -- every target uses the\n   pre-materialized, network-denied Rust builder; a foreign target cross-compiles\n   on the host CPU)\n2. Assemble build context (`prepare_build_context`) -- copies CA cert, shell configs, diagnostics, agent binaries\n3. Render Dockerfile from template\n4. `docker build`\n5. Export container filesystem as tar\n6. Create EROFS from tar (`create_erofs` -- runs mkfs.erofs in a container)\n7. Clean up container image\n\nFor kernel:\n1. Read the exact kernel version and SHA-256 from the checked-in build config\n2. Assemble build context (defconfig, capsem-init)\n3. Render Dockerfile from template\n4. `docker build`, verifying the downloaded source archive before extraction\n5. Extract vmlinuz + initrd.img from image\n6. Clean up\n\n## The guest Rust builder workspace: do not widen the `\u002Fsrc\u002F*` glob\n\n`container_compile_agent` mounts the checkout read-only at `\u002Fsrc` and assembles\na writable workspace at `\u002Fbuild`:\n\n```sh\nfor f in \u002Fsrc\u002F*; do b=$(basename \"$f\"); \\\n  [ \"$b\" != target ] && [ \"$b\" != crates ] && ln -s \"$f\" \u002Fbuild\u002F; done\n```\n\n`\u002Fsrc\u002F*` does not match dotfiles. **That exclusion is load-bearing. Widening it\nbreaks the build.** It reads like an oversight -- `.cargo\u002Fconfig.toml` never\nreaches the container, so the checked-in Cargo configuration is never applied --\nand it has been \"fixed\" on exactly that reasoning.\n\nWhy it must stay: `.cargo\u002Fconfig.toml` declares\n\n```toml\n[target.x86_64-unknown-linux-musl]\nlinker = \"rust-lld\"\n```\n\nOn a developer host, `x86_64-unknown-linux-musl` is a *cross* target and\nrust-lld is correct. Inside the Alpine builder that same triple **is the host\ntarget**, so inheriting the file makes every proc-macro crate -- `serde_derive`,\n`tokio-macros` -- link its host `.so` with rust-lld:\n\n```\nrust-lld: error: unable to find library -lgcc_s\nrust-lld: error: unable to find library -lc\nerror: could not compile `tokio-macros`\n```\n\nThe rule this generalizes to: **checked-in Cargo configuration is\ndeveloper-host configuration.** The builder container owns its own toolchain\nsettings and receives them as environment on the `docker run`, never by reading\nthem out of the tree. If a container build needs a linker or a `CC`, pass it\nexplicitly.\n\n`build_system\u002Ftests\u002Fgate\u002Ftest_guest_rust_builder_hermetic.py::test_container_workspace_excludes_dotfiles`\nfails if the glob is widened, so this cannot be rediscovered the slow way.\n\n## Cross-compiling guest binaries instead of emulating\n\nForeign-target guest builds used to run `rustc` under QEMU on the target's own\nplatform child. Measured on a 16-core Linux host, cold, `--locked --offline`,\nfor the six aarch64 guest binaries:\n\n| | |\n|---|---|\n| emulated (`--platform linux\u002Farm64`, qemu-aarch64) | 1194.7s |\n| cross-compiled from the amd64 base | 86s |\n\nA release run compiles that graph for every architecture's rootfs and again\nfor `assets.pack-initrds`, so emulation costs tens of minutes per run.\n\nWhat a cross image needs, materialized at image-build time on the same\nnetwork-open setup edge that `cargo fetch --locked` already uses:\n\n- `apk add --no-cache ${CROSS_PACKAGES}`, where config owns the exact package\n  tuple (currently `clang21=21.1.2-r2`) and the helper identity includes it.\n  `ring` is the **only** crate in the\n  `capsem-agent` + `capsem-bench` graph that compiles C -- nothing else pulls\n  `cc`, `cmake` or `bindgen`. Alpine's clang cross-compiles it for a foreign\n  musl target with **no external sysroot**. The pinned Rust toolchain already\n  supplies `rust-lld`; no separate ambient linker package is installed.\n- `rustup target add \"${RUST_TARGET}\"`, after which the existing\n  `rustup target list --installed` assertion proves it landed.\n- `CC_\u003Ctarget>=clang` and `CFLAGS_\u003Ctarget>=--target=\u003Ctarget>` on the run.\n- `CARGO_TARGET_\u003CTARGET>_LINKER=rust-lld` on the run -- **not** by linking\n  `.cargo\u002Fconfig.toml` into the workspace, for the reason in the section above.\n\nThe runtime build stays `--network none` with `--locked --offline`. The image\ntag is keyed by the base, target, cross-package tuple, Dockerfile and lockfiles,\nso a change to any of them is a different image rather than a silent reuse.\n\n## Container runtime requirements\n\nOn macOS, Docker runs inside a Colima VM with limited resources.\nThe rootfs build runs apt and the guest Rust builds concurrently --\nthe default RAM allocation may cause OOM kills (exit code 137).\n\n**Minimum**: 12GB RAM. **Recommended**: 16GB RAM, 8 CPUs.\n\n```bash\n# Colima (macOS)\ncolima stop && colima start --vm-type vz --vz-rosetta --memory 16 --cpu 8\n\n# Linux: Docker runs natively, no memory tuning needed\n# sudo apt install docker.io\n```\n\n`just doctor` owns the product readiness gate. `capsem-builder doctor` is a\nbackend helper used by the build rail to check container\u002Fruntime prerequisites.\n\nThe resource check lives in `build_system\u002Fbuilder\u002Fimage\u002Fdoctor.py`:\n- `check_container_resources()` -- checks docker info\n- Thresholds: `DOCKER_MIN_MEMORY_MB = 4096`, `DOCKER_RECOMMENDED_MEMORY_MB = 8192`\n\n## Container image compatibility\n\nGuest cross-build containers use the exact per-platform\n`rust:1.97.1-alpine3.23` child manifests in\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml`, never a mutable Rust tag. Those children\nalready own the exact toolchain, native musl target, musl headers, and compiler.\nAt the guarded asset-prefetch boundary,\n`build_system\u002Fdocker\u002FDockerfile.guest-rust-builder` resolves the Cargo.lock graph and, only\nfor a foreign target, adds the exact config-pinned C compiler package and Rust\ntarget. Do not add package installation, target installation, index updates, or\ndownloads to `container_compile_agent()`; its runtime network is deliberately\n`none`.\n\nThe local helper tag is an input cache key, not an OCI content digest. Two cold\nDocker builds may have different image IDs because registry\u002Findex and layer\nmetadata are materialization outputs. Cargo verifies every registry package\nagainst `Cargo.lock`, and the nightly\u002Frelease qualification boundary is the\nspecific helper image materialized by that run: after this one guarded fetch\nedge, the binary build is locked, offline, and network-denied. Do not claim\nbyte-for-byte reproducible helper images unless every remaining registry and\nlayer byte is independently pinned.\n\nThe selected image is a minimal Alpine image and has no Bash. Many common\nutilities (`file`, `less`, `vim`, etc.) are NOT available. Runtime shell\ncommands must be POSIX `sh` and use only the BusyBox tools already present in\nthe materialized image.\n\n**Lesson learned**: using `file \u002Foutput\u002Fbinary` to verify compiled binaries failed because `file` is not in slim images. Replaced with `ls -l` which is always available and still confirms the copy succeeded. The real validation (existence + non-zero size) is done in Python after the container exits.\n\n**Rule**: never assume a command exists in a slim container image. Stick to coreutils or install what you need explicitly.\n\n## Clock skew workaround\n\nAll asset dependency-helper `apt-get update` calls use\n`-o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false` against the\nconfig-owned HTTPS Debian snapshot to handle container VM clock drift.\nWithout this, apt rejects Release files whose timestamp is in the future relative to the VM's clock.\nThis can occur with any container VM backend on macOS.\n\nFiles affected:\n- `Dockerfile.kernel-dependencies.j2`\n- `Dockerfile.rootfs-dependencies.j2`\n","# Building the Capsem VM runtime\n\n## Overview\n\nCapsem builds one VM runtime: a kernel, initrd and rootfs per architecture.\nApplications come from OCI images (`images\u002F`,\nresolved through `images\u002Fcatalog.toml`), never from the runtime rootfs, so\nevery build of a commit produces the same asset set.\n\n- `config\u002Fdocker\u002Fimage\u002F` is the runtime's source: `build.toml` (package set,\n  EROFS settings, size budgets, kernel pin, base images), `manifest.toml`, and\n  the `kernel\u002F`, `security\u002F` and `vm\u002F` inputs.\n- `guest\u002Fartifacts\u002F` holds the core guest payloads: `capsem-init`, doctor,\n  diagnostics, bench, the container launcher.\n- `capsem-admin image build` copies those two inputs into a generated backend\n  workspace under `cache\u002Ftarget\u002Fbuild\u002Fimage-workspace\u002F\u003Carch|all>\u002F` and runs the\n  build there.\n- The Python builder backend renders Docker templates and emits assets, build\n  ledgers, and OBOMs only when invoked by the admin build rail. Do not add\n  product truth directly to the backend image-spec path.\n\n## Source Layout\n\n```\nconfig\u002F\n  docker\u002F                 Dockerfile templates (*.j2)\n  docker\u002Fimage\u002F\n    build.toml            Runtime package set, EROFS, rootfs budgets, kernel pin\n    manifest.toml         Image manifest metadata and changelog\n    kernel\u002F               defconfig.\u003Carch> and ordered kernel patches\n    security\u002F             Built-in web security inputs\n    vm\u002F                   Guest shell environment\nguest\u002Fartifacts\u002F          Core guest payloads: init, doctor, diagnostics, bench\nimages\u002F                   OCI application images and their catalog\ncache\u002Ftarget\u002Fassets\u002F            Generated VM assets\ncache\u002Ftarget\u002Fpackages\u002F          Generated native packages\n```\n\nThe materialized backend workspace is an implementation detail, not an\nauthoring surface. It is never a config root.\n\n`capsem-admin` is a tool, not a config authority. It validates, materializes,\nbuilds, and checks contracts; it must not grow scaffolding commands that invent\nMCP, AI provider, package, or rule truth. Do not add admin config roots, guest\nconfig roots, settings metadata, provider registries, or backend-owned\ncatalogs as product truth.\n\n## CLI commands\n\n```bash\njust build-assets [arch]                      # The runtime for one arch, or every one\njust _build-assets [arch]                     # Same rebuild, CI-facing name\njust _build-kernel arm64                      # Kernel slice\njust _build-rootfs arm64                      # Rootfs slice\nuv run --project build_system --frozen capsem-builder audit                  # Parse trivy\u002Fgrype vulnerability output\n```\n\nUnderneath, the gate runs\n`capsem-admin image build [--config-root config] [--guest-dir guest] [--output assets] [--arch arm64|x86_64] [--template all|kernel|rootfs] [--clean] [--json]`.\n\nUse admin\u002Fjust recipes for all runtime image work. `capsem-builder` is a\nbackend helper only; it must not expose or document public `build`, `validate`,\n`inspect`, `mcp`, render-only, or dry-run rails for image authoring.\n`capsem-admin image build` may call private Python modules such as\n`capsem_builder.image.image_build_backend`; agents must not make those modules\npublic CLI contracts.\n\n## Per-arch asset layout\n\n```\ncache\u002Ftarget\u002Fassets\u002F\n  manifest.json          Version, checksums, asset list\n  B3SUMS                 BLAKE3 checksums\n  arm64\u002F\n    vmlinuz              Kernel\n    rootfs.erofs         Root filesystem\n    initrd.img           Initial ramdisk (repacked by just exec)\n```\n\nThe approved release default is EROFS with `lz4hc` compression level 12\n(`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.erofs]`).\n\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.rootfs]` also owns two independent\nrelease budgets: the exported tar ceiling and the final EROFS ceiling. The\nbuilder checks the first before compression and the second before writing the\nartifact ledger. Never raise a size ceiling to accommodate an unexplained\nimage jump; inspect the rootfs composition first.\n\n## Build Ledger\n\nEach per-arch build emits `build-ledger.log` JSONL. The\n`rootfs.config_inputs` record captures the rendered rootfs package list and\nthe EROFS config. Installed-package\u002Fcomponent truth belongs in the CycloneDX\nOBOM, not the build ledger.\n\n## Adding a guest tool\n\nThe runtime package set is\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml [build.rootfs].runtime_apt_packages`. Add a\npackage there **only** when Capsem's own guest machinery needs it: the\ncontainer launcher (runc, umoci, iptables, iproute2), `capsem-init` (auditd,\ne2fsprogs), the trust store the Capsem CA lands in, or what capsem-doctor,\ncapsem-bench and the network diagnostics run with.\n\nAnything a user or an agent works with -- an AI CLI, a language toolchain, a\nvendor binary -- belongs in an OCI image under `images\u002F`, not in the runtime.\n\n1. Add the package to `runtime_apt_packages` (no duplicates; the model refuses\n   an empty or duplicated list).\n2. Rebuild with `just build-assets` (or `just _build-rootfs \u003Carch>`).\n3. Verify with `capsem-doctor` inside a booted VM.\n\nDo not edit generated Dockerfiles. Docker templates live under `config\u002Fdocker\u002F`.\n\n## Dockerfile templates\n\nTemplates live in `config\u002Fdocker\u002F`:\n- `Dockerfile.rootfs-dependencies.j2` -- snapshot-selected Debian packages;\n- `Dockerfile.kernel-dependencies.j2` -- snapshot-selected kernel toolchain and\n  the SHA-256-verified kernel archive;\n- `Dockerfile.rootfs.j2` -- network-denied first-party rootfs assembly;\n- `Dockerfile.kernel.j2` -- network-denied kernel compilation, initrd assembly,\n  and vmlinuz extraction.\n\n`asset-dependencies` is the visible resumable frontier between those pairs.\nThe gate materializes one input-keyed helper for every selected\narchitecture\u002Ftemplate, validates its platform and identity label, and\npasses only its exact image ID to the source build. Source builds always use\nBuildKit network `none` and never use the remote CI cache. A carried frontier\nmust revalidate every helper; it must not silently rebuild inside the sealed\nlane. The dependency helpers reuse the one checked-in Debian snapshot\nauthority rather than the mutable sources inherited from the base image.\n\n## Private build-helper generations\n\nLocal qualification and hosted qualification use one materialization path.\nWhenever an exact input-keyed helper is absent locally, its owning materializer\nfirst tries the platform-scoped generation under\n`ghcr.io\u002Fgoogle\u002Fcapsem-ci`. It validates the pulled image's platform, input-key\nlabel, and `org.opencontainers.image.source` label before retagging it locally.\nAn unavailable, unauthenticated, or invalid remote generation falls through to\nthe same deterministic network-open local build; there is no cache-only build\npath and no opt-in environment switch.\n\nThe private inventory contains the host builder, Linux parity base, install\nbuilder, both package builders, both guest Rust builders, the host asset-tools\nbuilder, and the host architecture's kernel and rootfs dependency builders.\n`capsem-gate private-images --publish` materializes that inventory before it\npublishes immutable generation tags. `.github\u002Fworkflows\u002Fprivate-images.yaml`\nruns it weekly and on defining-input changes, independently of the release and\nofficial OCI image workflows, and retains the latest three tagged generations\nper helper and platform.\n\nDevelopers who can read the repository's private packages may authenticate\nDocker to GHCR for warm local qualification. Missing credentials only select\nthe local fallback; they do not change the resulting helper identity. Keep all\nhelper Dockerfiles under `build_system\u002Fdocker\u002F` and dependency templates under\n`config\u002Fdocker\u002F`; add any new network-open helper to the single inventory and\nthe repository-source-label guard.\n\nKeep the verified registry alias when retagging an imported helper. BuildKit\ncan fetch inherited lazy layers from that origin; a local-only FROM name can\nredirect those fetches to Docker Hub. Resolve the registry digest through the\nshared Docker boundary and retain exact image-ID\u002Fplatform checks. Cache\nretirement removes all owned aliases and accounts for the image bytes once.\nEvery child build includes the Linux parity base and source lane: use the\nshared exact-reference check before building and verify the identity afterward.\nWithout a qualified registry origin, keep the verified local tag even if Docker\nrecords local RepoDigests. BuildKit can resolve those digests through Docker Hub\ninstead of the local image store, breaking sealed source builds.\n\nTemplates use Jinja2 with variables from the admin-materialized image\nworkspace. Do not add a second preview rail for product truth; if a build input\nneeds validation, add it to the normal admin validation path.\n\nEvery architecture's `base_image` is required to be its immutable\n`repository@sha256:\u003Cchild-manifest>` identity. Do not use a mutable tag or the\nmulti-platform index. `capsem-gate` materializes a missing exact child through\nthe Docker daemon before the cross-execution probe and build lanes; keep this\non the ordinary guarded Docker runner, not the host-process egress broker.\n\n---\n\n# Builder Internals (for modifying the builder itself)\n\n## Architecture: config\u002Fdocker\u002Fimage -> admin workspace -> Pydantic -> context dict -> Jinja2 -> Dockerfile\n\n1. **Runtime source** (`config\u002Fdocker\u002Fimage\u002F` and `guest\u002Fartifacts\u002F`).\n2. **capsem-admin** copies both into a backend build workspace.\n3. **Pydantic models** (`build_system\u002Fbuilder\u002Fimage\u002Fmodels.py`) parse that workspace.\n4. **Context dict** (`build_system\u002Fbuilder\u002Fimage\u002Fdocker.py`) feeds Jinja2 templates.\n5. **Jinja2 templates** (`config\u002Fdocker\u002F`) produce Dockerfiles.\n\n### Key files\n\n| File | Role |\n|------|------|\n| `build_system\u002Fbuilder\u002Fimage\u002Fmodels.py` | All Pydantic models (enums, configs, top-level `GuestImageConfig`) |\n| `build_system\u002Fbuilder\u002Fimage\u002Fconfig.py` | Backend loader for admin-materialized build workspaces |\n| `build_system\u002Fbuilder\u002Fimage\u002Fdocker.py` | Context builders (`_rootfs_context`, `_kernel_context`), rendering, build execution |\n| `build_system\u002Fbuilder\u002Fimage\u002Fimage_build_backend.py` | Private admin-invoked image build backend; not a public CLI |\n| `crates\u002Fcapsem-admin\u002Fsrc\u002Fimage_build.rs` | `image build` \u002F `image workspace`: workspace materialization and the build plan |\n| `config\u002Fdocker\u002FDockerfile.rootfs.j2` | Rootfs Dockerfile template |\n| `config\u002Fdocker\u002FDockerfile.kernel.j2` | Kernel Dockerfile template |\n| `build_system\u002Fbuilder\u002Fimage\u002Fvalidate.py` | Validation rules (E001-E302, W001-W012) |\n| `build_system\u002Fbuilder\u002Fimage\u002Fcli.py` | Click CLI entry points |\n\n### Context dict (rootfs template variables)\n\n`_rootfs_context()` in `docker.py` builds the dict passed to `Dockerfile.rootfs.j2`\n(plus the Debian snapshot keys):\n\n```python\n{\n    \"arch\": ArchConfig,           # Per-arch settings (docker_platform, rust_target, etc.)\n    \"arch_name\": str,             # \"arm64\" or \"x86_64\"\n    \"apt_packages\": list[str],    # build.toml [build.rootfs].runtime_apt_packages\n    \"guest_binaries\": list[str],  # GUEST_BINARIES in docker.py\n}\n```\n\n### Kernel context dict\n\n```python\n{\n    \"arch\": ArchConfig,\n    \"arch_name\": str,\n    \"kernel_version\": str,  # exact checked-in release, e.g. \"6.18.44\"\n    \"kernel_sha256\": str,   # verified before the source archive is extracted\n    \"kernel_patches\": list, # applied in order with --fuzz=0\n}\n```\n\n## How to: Add a new guest binary\n\nGuest binaries are compiled from `crates\u002Fcapsem-agent\u002F`. Every architecture on\nevery host goes through `container_compile_agent()`; native Linux has no second\nambient Cargo\u002Frustup rail. The asset preflight first materializes the host\nplatform's config-selected exact Rust child image plus the checked-in Rust\ntoolchain and `Cargo.lock`; a foreign target also materializes its exact\nconfig-pinned C compiler package and both the foreign-target and host-target\nCargo dependency sets. The host set covers target-gated build-script and\nproc-macro dependencies that `cargo fetch --target \u003Cforeign>` does not select.\nThe actual container build runs with\n`--network none` and Cargo `--locked --offline`.\n\nMaterialize only helpers the command can consume: every requested architecture\non either supported host, and none for a kernel-only build. Immutable Debian\nguest bases remain architecture-selected separately.\n\n1. Add the binary target in `crates\u002Fcapsem-agent\u002FCargo.toml`\n2. Add the binary name to `GUEST_BINARIES` list in `docker.py`\n3. The template already loops `{% for binary in guest_binaries %}` to COPY + chmod 555\n\n## Verifying Linux builds locally\n\n`just _cross-compile [arch]` builds everything in a container: agent binaries,\nfrontend, and the full Linux `.deb` package. Useful for catching system\ndependency issues before CI.\n\n```bash\njust _cross-compile           # Build for host arch (arm64 on Apple Silicon)\njust _cross-compile x86_64    # Build x86_64 deb\n```\n\n## Build pipeline (what `build_image()` does)\n\nFor rootfs:\n1. Build guest agent binaries (`cross_compile_agent` -- every target uses the\n   pre-materialized, network-denied Rust builder; a foreign target cross-compiles\n   on the host CPU)\n2. Assemble build context (`prepare_build_context`) -- copies CA cert, shell configs, diagnostics, agent binaries\n3. Render Dockerfile from template\n4. `docker build`\n5. Export container filesystem as tar\n6. Create EROFS from tar (`create_erofs` -- runs mkfs.erofs in a container)\n7. Clean up container image\n\nFor kernel:\n1. Read the exact kernel version and SHA-256 from the checked-in build config\n2. Assemble build context (defconfig, capsem-init)\n3. Render Dockerfile from template\n4. `docker build`, verifying the downloaded source archive before extraction\n5. Extract vmlinuz + initrd.img from image\n6. Clean up\n\n## The guest Rust builder workspace: do not widen the `\u002Fsrc\u002F*` glob\n\n`container_compile_agent` mounts the checkout read-only at `\u002Fsrc` and assembles\na writable workspace at `\u002Fbuild`:\n\n```sh\nfor f in \u002Fsrc\u002F*; do b=$(basename \"$f\"); \\\n  [ \"$b\" != target ] && [ \"$b\" != crates ] && ln -s \"$f\" \u002Fbuild\u002F; done\n```\n\n`\u002Fsrc\u002F*` does not match dotfiles. **That exclusion is load-bearing. Widening it\nbreaks the build.** It reads like an oversight -- `.cargo\u002Fconfig.toml` never\nreaches the container, so the checked-in Cargo configuration is never applied --\nand it has been \"fixed\" on exactly that reasoning.\n\nWhy it must stay: `.cargo\u002Fconfig.toml` declares\n\n```toml\n[target.x86_64-unknown-linux-musl]\nlinker = \"rust-lld\"\n```\n\nOn a developer host, `x86_64-unknown-linux-musl` is a *cross* target and\nrust-lld is correct. Inside the Alpine builder that same triple **is the host\ntarget**, so inheriting the file makes every proc-macro crate -- `serde_derive`,\n`tokio-macros` -- link its host `.so` with rust-lld:\n\n```\nrust-lld: error: unable to find library -lgcc_s\nrust-lld: error: unable to find library -lc\nerror: could not compile `tokio-macros`\n```\n\nThe rule this generalizes to: **checked-in Cargo configuration is\ndeveloper-host configuration.** The builder container owns its own toolchain\nsettings and receives them as environment on the `docker run`, never by reading\nthem out of the tree. If a container build needs a linker or a `CC`, pass it\nexplicitly.\n\n`build_system\u002Ftests\u002Fgate\u002Ftest_guest_rust_builder_hermetic.py::test_container_workspace_excludes_dotfiles`\nfails if the glob is widened, so this cannot be rediscovered the slow way.\n\n## Cross-compiling guest binaries instead of emulating\n\nForeign-target guest builds used to run `rustc` under QEMU on the target's own\nplatform child. Measured on a 16-core Linux host, cold, `--locked --offline`,\nfor the six aarch64 guest binaries:\n\n| | |\n|---|---|\n| emulated (`--platform linux\u002Farm64`, qemu-aarch64) | 1194.7s |\n| cross-compiled from the amd64 base | 86s |\n\nA release run compiles that graph for every architecture's rootfs and again\nfor `assets.pack-initrds`, so emulation costs tens of minutes per run.\n\nWhat a cross image needs, materialized at image-build time on the same\nnetwork-open setup edge that `cargo fetch --locked` already uses:\n\n- `apk add --no-cache ${CROSS_PACKAGES}`, where config owns the exact package\n  tuple (currently `clang21=21.1.2-r2`) and the helper identity includes it.\n  `ring` is the **only** crate in the\n  `capsem-agent` + `capsem-bench` graph that compiles C -- nothing else pulls\n  `cc`, `cmake` or `bindgen`. Alpine's clang cross-compiles it for a foreign\n  musl target with **no external sysroot**. The pinned Rust toolchain already\n  supplies `rust-lld`; no separate ambient linker package is installed.\n- `rustup target add \"${RUST_TARGET}\"`, after which the existing\n  `rustup target list --installed` assertion proves it landed.\n- `CC_\u003Ctarget>=clang` and `CFLAGS_\u003Ctarget>=--target=\u003Ctarget>` on the run.\n- `CARGO_TARGET_\u003CTARGET>_LINKER=rust-lld` on the run -- **not** by linking\n  `.cargo\u002Fconfig.toml` into the workspace, for the reason in the section above.\n\nThe runtime build stays `--network none` with `--locked --offline`. The image\ntag is keyed by the base, target, cross-package tuple, Dockerfile and lockfiles,\nso a change to any of them is a different image rather than a silent reuse.\n\n## Container runtime requirements\n\nOn macOS, Docker runs inside a Colima VM with limited resources.\nThe rootfs build runs apt and the guest Rust builds concurrently --\nthe default RAM allocation may cause OOM kills (exit code 137).\n\n**Minimum**: 12GB RAM. **Recommended**: 16GB RAM, 8 CPUs.\n\n```bash\n# Colima (macOS)\ncolima stop && colima start --vm-type vz --vz-rosetta --memory 16 --cpu 8\n\n# Linux: Docker runs natively, no memory tuning needed\n# sudo apt install docker.io\n```\n\n`just doctor` owns the product readiness gate. `capsem-builder doctor` is a\nbackend helper used by the build rail to check container\u002Fruntime prerequisites.\n\nThe resource check lives in `build_system\u002Fbuilder\u002Fimage\u002Fdoctor.py`:\n- `check_container_resources()` -- checks docker info\n- Thresholds: `DOCKER_MIN_MEMORY_MB = 4096`, `DOCKER_RECOMMENDED_MEMORY_MB = 8192`\n\n## Container image compatibility\n\nGuest cross-build containers use the exact per-platform\n`rust:1.97.1-alpine3.23` child manifests in\n`config\u002Fdocker\u002Fimage\u002Fbuild.toml`, never a mutable Rust tag. Those children\nalready own the exact toolchain, native musl target, musl headers, and compiler.\nAt the guarded asset-prefetch boundary,\n`build_system\u002Fdocker\u002FDockerfile.guest-rust-builder` resolves the Cargo.lock graph and, only\nfor a foreign target, adds the exact config-pinned C compiler package and Rust\ntarget. Do not add package installation, target installation, index updates, or\ndownloads to `container_compile_agent()`; its runtime network is deliberately\n`none`.\n\nThe local helper tag is an input cache key, not an OCI content digest. Two cold\nDocker builds may have different image IDs because registry\u002Findex and layer\nmetadata are materialization outputs. Cargo verifies every registry package\nagainst `Cargo.lock`, and the nightly\u002Frelease qualification boundary is the\nspecific helper image materialized by that run: after this one guarded fetch\nedge, the binary build is locked, offline, and network-denied. Do not claim\nbyte-for-byte reproducible helper images unless every remaining registry and\nlayer byte is independently pinned.\n\nThe selected image is a minimal Alpine image and has no Bash. Many common\nutilities (`file`, `less`, `vim`, etc.) are NOT available. Runtime shell\ncommands must be POSIX `sh` and use only the BusyBox tools already present in\nthe materialized image.\n\n**Lesson learned**: using `file \u002Foutput\u002Fbinary` to verify compiled binaries failed because `file` is not in slim images. Replaced with `ls -l` which is always available and still confirms the copy succeeded. The real validation (existence + non-zero size) is done in Python after the container exits.\n\n**Rule**: never assume a command exists in a slim container image. Stick to coreutils or install what you need explicitly.\n\n## Clock skew workaround\n\nAll asset dependency-helper `apt-get update` calls use\n`-o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false` against the\nconfig-owned HTTPS Debian snapshot to handle container VM clock drift.\nWithout this, apt rejects Release files whose timestamp is in the future relative to the VM's clock.\nThis can occur with any container VM backend on macOS.\n\nFiles affected:\n- `Dockerfile.kernel-dependencies.j2`\n- `Dockerfile.rootfs-dependencies.j2`\n",{"name":5,"description":7},"main","d357170bb677125c80cebed720e62bf47bf083ad","skills\u002Fbuild-images",26,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 00:49:59",{"source":9,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add google\u002Fcapsem --skill build-images",{"tool":53,"command":54},"bunx","bunx skills add google\u002Fcapsem --skill build-images",{"tool":56,"command":57},"pnpm","pnpm dlx skills add google\u002Fcapsem --skill build-images","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fbuild-images\u002FSKILL.md",true,[],[62,79,95,110,123,135],{"skillNo":63,"name":64,"nameZh":65,"description":66,"descriptionZh":67,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":68,"categories":69,"keywords":76,"publishedAt":33},"01M699558T2T4DJMBN08ZCQ79K","use-capsem","Capsem 虚拟机任务执行","Run tasks in Capsem VMs through MCP. Use when an agent needs isolated execution, file analysis, or reports returned to the host.","通过 MCP 在 Capsem 虚拟机中运行任务。在智能体需要隔离执行、文件分析，或将报告返回到主机时使用。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fuse-capsem\u002FSKILL.md",[70,73],{"categoryNo":71,"categoryName":72,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0DBCRG4XGJMB6QQEP11","编码任务委派",{"categoryNo":74,"categoryName":75,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[77,78],"use capsem","MCP",{"skillNo":80,"name":81,"nameZh":82,"description":83,"descriptionZh":84,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":85,"categories":86,"keywords":93,"publishedAt":33},"01M69953Z1CSVQ4N07QX529CZY","site-marketing","营销网站内容维护","The marketing website, capsem.org. Use when editing copy, adding sections, or changing the site theme.","营销网站 capsem.org。在编辑文案、添加板块或更改网站主题时使用。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fsite-marketing\u002FSKILL.md",[87,90],{"categoryNo":88,"categoryName":89,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD6C0J544QTJ9R38Z7ZG","营销专员",{"categoryNo":91,"categoryName":92,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98WRP4APE9VKKKKJ6FV","社交媒体与内容平台管理",[94],"site marketing",{"skillNo":96,"name":97,"nameZh":98,"description":99,"descriptionZh":100,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":101,"categories":102,"keywords":107,"publishedAt":33},"01M69952B33KBBV37N8QTC4191","site-infra","文档站基础设施维护","The documentation site, docs.capsem.org. Use for user-directed Diátaxis documentation and Astro Starlight changes.","文档站点 docs.capsem.org。用于面向用户的 Diátaxis 文档和 Astro Starlight 相关更改。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fsite-infra\u002FSKILL.md",[103,106],{"categoryNo":104,"categoryName":105,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[108,109],"site infra","docs",{"skillNo":111,"name":112,"nameZh":113,"description":17,"descriptionZh":114,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":115,"categories":116,"keywords":121,"publishedAt":33},"01M69950YKCZKCDB98JDQNBBRJ","site-architecture","站点架构设计","","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fsite-architecture\u002FSKILL.md",[117,120],{"categoryNo":118,"categoryName":119,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[122],"site architecture",{"skillNo":124,"name":125,"nameZh":126,"description":17,"descriptionZh":114,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":127,"categories":128,"keywords":133,"publishedAt":33},"01M6994Z61JWZ0G2YRJTWFH933","release-process","版本发布流程","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Frelease-process\u002FSKILL.md",[129,130],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":131,"categoryName":132,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[134],"release process",{"skillNo":136,"name":137,"nameZh":138,"description":139,"descriptionZh":140,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":141,"categories":142,"keywords":147,"publishedAt":33},"01M6994XKHADM6FBTYTAPG7FYC","meta-skill-creation","智能体技能创建与优化","Create, improve, and evaluate skills. Use when writing a new skill, editing an existing one, or tuning a description for better triggering.","创建、改进和评估技能。在编写新技能、编辑现有技能或调整 description 以优化触发效果时使用。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fmeta-skill-creation\u002FSKILL.md",[143,146],{"categoryNo":144,"categoryName":145,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":74,"categoryName":75,"taxonomyType":23,"taxonomyTypeDesc":24},[148,149],"meta skill creation","writing"]