[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6993GCFCDMTVDJCQJ1ZCDDD":3,"skill-same:01M6993GCFCDMTVDJCQJ1ZCDDD":60},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":17,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6993GCFCDMTVDJCQJ1ZCDDD","build-initrd","Initrd 重新打包与 Guest 二进制管理","Initrd repack and guest binary management. Use when adding or changing a guest binary, modifying capsem-init, or iterating on the initrd without a full rebuild.","Initrd 重新打包及 guest 二进制管理。适用于添加或更改 guest 二进制、修改 capsem-init，或在不进行完整重建的情况下迭代 initrd。","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-initrd\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],"build initrd","2026-11-10 10:12:30",false,"---\nname: build-initrd\ndescription: Initrd repack and guest binary management. Use when adding or changing a guest binary, modifying capsem-init, or iterating on the initrd without a full rebuild.\n---\n\n# Initrd Repack\n\n`just exec` composes `capsem-gate pack-initrd` before boot. The gate stages the\nconfigured guest binaries, atomically repacks the host initrd, regenerates its\nmanifest and hash aliases, and then materializes runtime config. `capsem-init`\nprefers these initrd copies over the rootfs copies.\n\nThe authoritative inventory and paths are `[initrd]` in `config\u002Fgate.toml`.\nDo not add a second list to a recipe, test, or gate module.\n\n## Currently repacked binaries\n\n| Binary | What it does |\n|--------|-------------|\n| `capsem-init` | PID 1 init script |\n| `capsem-pty-agent` | PTY-over-vsock bridge agent |\n| `capsem-net-proxy` | TCP-to-vsock relay for air-gapped HTTPS proxying |\n| `capsem-dns-proxy` | UDP\u002FTCP DNS-to-vsock relay |\n| `capsem-mcp-server` | MCP stdio-to-vsock relay for AI agent tool access |\n| `capsem-sysutil` | Guest suspend helper via vsock:5004; in-VM shutdown commands are disabled |\n| `capsem-bench-rs` | Rust guest benchmark helper |\n| `capsem-doctor` | VM self-diagnostic suite (bash script) |\n| `capsem-bench` | Guest benchmark driver (bash script) |\n| `capsem_bench\u002F` | Python benchmark support tree |\n| `diagnostics\u002F` | pytest test files for capsem-doctor |\n\n## Adding a new guest binary\n\nUpdate two authorities, then their behavior tests:\n\n1. **`[initrd].binaries` in `config\u002Fgate.toml`** -- the repacker, static gate,\n   build-chain test, and release asset rail all consume it.\n2. **`guest\u002Fartifacts\u002Fcapsem-init`** -- add the initrd-first deployment\u002Ffallback\n   behavior if the new process is launched during boot.\n\nUpdate this table and add the relevant unit, archive, and in-VM behavior tests.\n\n## When to use which build path\n\n| Changed | Command | Why |\n|---------|---------|-----|\n| Guest binary source (Rust agent code) | `just exec` | Auto-repacks initrd with new binary |\n| `capsem-init` script | `just exec` | Init script is repacked into initrd |\n| `guest\u002Fartifacts\u002Fdiagnostics\u002F*.py` | `just exec \"capsem-doctor\"` | Test files repacked into initrd |\n| `guest\u002Fartifacts\u002Fcapsem-bashrc` | `just build-assets [arch]` | Baked into rootfs, not initrd |\n| Runtime package set (`config\u002Fdocker\u002Fimage\u002Fbuild.toml` `runtime_apt_packages`) | `just build-assets [arch]` | Baked into the runtime rootfs asset |\n| Application tools (AI CLIs, language toolchains) | an OCI image under `images\u002F` | Not part of the runtime; see `\u002Fbuild-images` |\n\n## Guest binary security\n\nAll guest binaries are deployed read-only:\n- **Rootfs**: `chmod 555` in Dockerfile template (rootfs mounted read-only)\n- **Initrd override**: `[initrd].binary_mode` in the gate repacker and `capsem-init` after copying to tmpfs\n- Guest processes cannot modify these binaries at runtime\n\n## How initrd repack works\n\nThe initrd is a gzip+cpio archive. `build_system\u002Fbuilder\u002Fgate\u002Finitrd.py`:\n\n1. Resolves the exact content-addressed Rust payload generation under the\n   configured `cache\u002Ftarget\u002Fbuild\u002Flinux-agent\u002F\u003Carch>\u002F` tree. Source bytes,\n   modes, paths, toolchain inputs, and the sealed builder image define the\n   generation; checkout timestamps never do.\n2. Unpacks the exact target into a temporary directory.\n3. Replaces the config-owned binaries, files, trees, and init script at their\n   configured modes.\n4. Packs beside the target and uses `AtomicReplace`, preserving old hardlinks.\n5. Regenerates the manifest and hash aliases whenever it mutates public assets.\n\nThe complete IronBank asset graph has a visible `assets.pack-initrds` frontier\nafter both architecture lanes and before merge\u002Fboot. It repacks every\narchitecture's private target. The CI-facing `build-assets rootfs|all`\nrail uses the same primitive before upload; `kernel` intentionally keeps its\nminimal initrd until the following rootfs step.\n\nAt boot, `capsem-init` checks if a binary exists in the initrd bundle (`\u002Fbinary`) before falling back to the rootfs path. This means initrd copies always take priority.\n\n## Lesson: permissions are set in TWO places\n\nGuest binary permissions must be 555 (read+execute, no write). There are two independent places that set permissions and both must agree:\n\n1. **Dockerfile.rootfs.j2** -- `chmod 555` when copying into the runtime rootfs asset\n2. **`[initrd].binary_mode` through the gate repacker** -- mode on the initrd copy\n\nThe initrd copy wins at runtime because it overlays the rootfs. Keep both\nlocations at 555 and prove the final archive with\n`tests\u002Fcapsem-build-chain\u002Ftest_pack_initrd.py`.\n","# Initrd Repack\n\n`just exec` composes `capsem-gate pack-initrd` before boot. The gate stages the\nconfigured guest binaries, atomically repacks the host initrd, regenerates its\nmanifest and hash aliases, and then materializes runtime config. `capsem-init`\nprefers these initrd copies over the rootfs copies.\n\nThe authoritative inventory and paths are `[initrd]` in `config\u002Fgate.toml`.\nDo not add a second list to a recipe, test, or gate module.\n\n## Currently repacked binaries\n\n| Binary | What it does |\n|--------|-------------|\n| `capsem-init` | PID 1 init script |\n| `capsem-pty-agent` | PTY-over-vsock bridge agent |\n| `capsem-net-proxy` | TCP-to-vsock relay for air-gapped HTTPS proxying |\n| `capsem-dns-proxy` | UDP\u002FTCP DNS-to-vsock relay |\n| `capsem-mcp-server` | MCP stdio-to-vsock relay for AI agent tool access |\n| `capsem-sysutil` | Guest suspend helper via vsock:5004; in-VM shutdown commands are disabled |\n| `capsem-bench-rs` | Rust guest benchmark helper |\n| `capsem-doctor` | VM self-diagnostic suite (bash script) |\n| `capsem-bench` | Guest benchmark driver (bash script) |\n| `capsem_bench\u002F` | Python benchmark support tree |\n| `diagnostics\u002F` | pytest test files for capsem-doctor |\n\n## Adding a new guest binary\n\nUpdate two authorities, then their behavior tests:\n\n1. **`[initrd].binaries` in `config\u002Fgate.toml`** -- the repacker, static gate,\n   build-chain test, and release asset rail all consume it.\n2. **`guest\u002Fartifacts\u002Fcapsem-init`** -- add the initrd-first deployment\u002Ffallback\n   behavior if the new process is launched during boot.\n\nUpdate this table and add the relevant unit, archive, and in-VM behavior tests.\n\n## When to use which build path\n\n| Changed | Command | Why |\n|---------|---------|-----|\n| Guest binary source (Rust agent code) | `just exec` | Auto-repacks initrd with new binary |\n| `capsem-init` script | `just exec` | Init script is repacked into initrd |\n| `guest\u002Fartifacts\u002Fdiagnostics\u002F*.py` | `just exec \"capsem-doctor\"` | Test files repacked into initrd |\n| `guest\u002Fartifacts\u002Fcapsem-bashrc` | `just build-assets [arch]` | Baked into rootfs, not initrd |\n| Runtime package set (`config\u002Fdocker\u002Fimage\u002Fbuild.toml` `runtime_apt_packages`) | `just build-assets [arch]` | Baked into the runtime rootfs asset |\n| Application tools (AI CLIs, language toolchains) | an OCI image under `images\u002F` | Not part of the runtime; see `\u002Fbuild-images` |\n\n## Guest binary security\n\nAll guest binaries are deployed read-only:\n- **Rootfs**: `chmod 555` in Dockerfile template (rootfs mounted read-only)\n- **Initrd override**: `[initrd].binary_mode` in the gate repacker and `capsem-init` after copying to tmpfs\n- Guest processes cannot modify these binaries at runtime\n\n## How initrd repack works\n\nThe initrd is a gzip+cpio archive. `build_system\u002Fbuilder\u002Fgate\u002Finitrd.py`:\n\n1. Resolves the exact content-addressed Rust payload generation under the\n   configured `cache\u002Ftarget\u002Fbuild\u002Flinux-agent\u002F\u003Carch>\u002F` tree. Source bytes,\n   modes, paths, toolchain inputs, and the sealed builder image define the\n   generation; checkout timestamps never do.\n2. Unpacks the exact target into a temporary directory.\n3. Replaces the config-owned binaries, files, trees, and init script at their\n   configured modes.\n4. Packs beside the target and uses `AtomicReplace`, preserving old hardlinks.\n5. Regenerates the manifest and hash aliases whenever it mutates public assets.\n\nThe complete IronBank asset graph has a visible `assets.pack-initrds` frontier\nafter both architecture lanes and before merge\u002Fboot. It repacks every\narchitecture's private target. The CI-facing `build-assets rootfs|all`\nrail uses the same primitive before upload; `kernel` intentionally keeps its\nminimal initrd until the following rootfs step.\n\nAt boot, `capsem-init` checks if a binary exists in the initrd bundle (`\u002Fbinary`) before falling back to the rootfs path. This means initrd copies always take priority.\n\n## Lesson: permissions are set in TWO places\n\nGuest binary permissions must be 555 (read+execute, no write). There are two independent places that set permissions and both must agree:\n\n1. **Dockerfile.rootfs.j2** -- `chmod 555` when copying into the runtime rootfs asset\n2. **`[initrd].binary_mode` through the gate repacker** -- mode on the initrd copy\n\nThe initrd copy wins at runtime because it overlays the rootfs. Keep both\nlocations at 555 and prove the final archive with\n`tests\u002Fcapsem-build-chain\u002Ftest_pack_initrd.py`.\n",{"name":5,"description":7},"main","d357170bb677125c80cebed720e62bf47bf083ad","skills\u002Fbuild-initrd",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":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add google\u002Fcapsem --skill build-initrd",{"tool":52,"command":53},"bunx","bunx skills add google\u002Fcapsem --skill build-initrd",{"tool":55,"command":56},"pnpm","pnpm dlx skills add google\u002Fcapsem --skill build-initrd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fbuild-initrd\u002FSKILL.md",true,[],[61,78,94,109,122,134],{"skillNo":62,"name":63,"nameZh":64,"description":65,"descriptionZh":66,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":67,"categories":68,"keywords":75,"publishedAt":32},"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",[69,72],{"categoryNo":70,"categoryName":71,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0DBCRG4XGJMB6QQEP11","编码任务委派",{"categoryNo":73,"categoryName":74,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[76,77],"use capsem","MCP",{"skillNo":79,"name":80,"nameZh":81,"description":82,"descriptionZh":83,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":92,"publishedAt":32},"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",[86,89],{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD6C0J544QTJ9R38Z7ZG","营销专员",{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98WRP4APE9VKKKKJ6FV","社交媒体与内容平台管理",[93],"site marketing",{"skillNo":95,"name":96,"nameZh":97,"description":98,"descriptionZh":99,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":100,"categories":101,"keywords":106,"publishedAt":32},"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",[102,105],{"categoryNo":103,"categoryName":104,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[107,108],"site infra","docs",{"skillNo":110,"name":111,"nameZh":112,"description":17,"descriptionZh":113,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":114,"categories":115,"keywords":120,"publishedAt":32},"01M69950YKCZKCDB98JDQNBBRJ","site-architecture","站点架构设计","","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fsite-architecture\u002FSKILL.md",[116,119],{"categoryNo":117,"categoryName":118,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[121],"site architecture",{"skillNo":123,"name":124,"nameZh":125,"description":17,"descriptionZh":113,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":132,"publishedAt":32},"01M6994Z61JWZ0G2YRJTWFH933","release-process","版本发布流程","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Frelease-process\u002FSKILL.md",[128,129],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":130,"categoryName":131,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[133],"release process",{"skillNo":135,"name":136,"nameZh":137,"description":138,"descriptionZh":139,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":140,"categories":141,"keywords":146,"publishedAt":32},"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",[142,145],{"categoryNo":143,"categoryName":144,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":73,"categoryName":74,"taxonomyType":23,"taxonomyTypeDesc":24},[147,148],"meta skill creation","writing"]