[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6993RXZTSD1EBCHB90JV9EZ":3,"skill-same:01M6993RXZTSD1EBCHB90JV9EZ":62},{"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":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":17,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6993RXZTSD1EBCHB90JV9EZ","dev-capsem-doctor","Capsem VM沙箱诊断","The capsem-doctor in-VM diagnostic suite. Use when writing, running, or extending doctor tests, or debugging VM sandbox issues.","capsem-doctor 的 VM 内诊断套件。适用于编写、运行或扩展 doctor 测试，或调试 VM 沙箱问题。","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\u002Fdev-capsem-doctor\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[31,32,33],"dev capsem doctor","writing","sandbox","2026-11-10 10:12:30",false,"---\nname: dev-capsem-doctor\ndescription: The capsem-doctor in-VM diagnostic suite. Use when writing, running, or extending doctor tests, or debugging VM sandbox issues.\n---\n\n# capsem-doctor\n\ncapsem-doctor is a pytest-based diagnostic suite that runs inside the guest VM. It verifies sandbox integrity, network isolation, runtime environment, and AI agent functionality. It's the smoke test gate -- every change must pass it before shipping.\n\nDoctor is also an Ironbank input. When doctor is used to close a\nrelease-critical VM\u002Fsecurity\u002Fprotocol\u002Fpackage-manager gate, load `\u002Fironbank`\nand assert the full ledger through `tests\u002Fironbank\u002F`: client result, DB rows,\nstructured logs, UDS\u002FHTTP route output, counters, and UI-facing JSON. A doctor\nexit code or \"row exists\" check is not enough.\n\n## Running\n\n```bash\njust exec \"capsem-doctor\"              # Full suite (~10s total including VM boot)\njust exec \"capsem-doctor -k sandbox\"   # Only sandbox tests\njust exec \"capsem-doctor -k network\"   # Only network tests\njust exec \"capsem-doctor -x\"           # Stop on first failure\njust exec \"capsem-doctor -v\"           # Extra verbose\n```\n\n## Test categories\n\n| File | What it validates |\n|------|-------------------|\n| `test_sandbox.py` | Read-only rootfs, binary permissions (chmod 555), no setuid\u002Fsetgid, kernel hardening (no modules, no debugfs, no IPv6, no swap, no kallsyms), process integrity (pty-agent, dnsmasq running; no systemd, sshd, cron), network isolation (dummy0, fake DNS, iptables, no real NICs) |\n| `test_network.py` | MITM CA in system store, curl without -k works, Python urllib HTTPS, CA env vars set (SSL_CERT_FILE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS), HTTP\u002F80 blocked, non-443 ports blocked, direct IP blocked, multi-domain DNS faking, AI provider domains reachable |\n| `test_environment.py` | TERM\u002FHOME\u002FPATH env vars correct, shell is bash, kernel version, aarch64 arch, mount points (\u002Fproc, \u002Fsys, \u002Fdev, \u002Fdev\u002Fpts), tmpfs verification |\n| `test_runtimes.py` | python3\u002Fpip3 versions; hermetic pip install into the venv; hermetic apt install of a local .deb; apt sandbox TLS trust; Python file I\u002FO |\n| `test_workflows.py` | Text write\u002Fread, Python JSON roundtrip, shell pipes, large file (10MB) |\n| `test_virtiofs.py` | VirtioFS root mount, ext4 loopback upper, loop device active, workspace write\u002Fread\u002Flarge file\u002Fsubdir, system overlay writable, pip install works, file delete+recreate (skipped in block mode) |\n| `test_mcp.py` | Guest MCP endpoint tool routing, domain blocking via MCP |\n| `test_injection.py` | Security injection tests |\n| `test_lifecycle.py` | capsem-sysutil lifecycle symlinks, read-only sysutil, VM identity env vars, hostname |\n| `test_storage_write_probes.py` | Bounded create\u002Fread\u002Fdelete probes on package-manager and workspace paths, `_apt` partial cache |\n| `conftest.py` | Test infrastructure (auto-skip outside VM, output dir fixture); `run()` lives in `diagnostic_support.py` |\n\nThe runtime rootfs is minimal (Debian base plus runc, umoci, python3, iptables, iproute2,\ncurl, procps, pytest, rich, venv). Tests may only use those: node, uv, git, AI CLIs and pip\npackages like certifi or fastmcp live in the OCI images under `images\u002F`, proven by `tests\u002Fimages\u002F`.\n\n## Infrastructure (conftest.py)\n\n```python\n# Auto-skip if not in capsem VM (checks root + writable \u002Froot)\ndef pytest_ignore_collect(collection_path, config):\n    if os.geteuid() != 0 or not os.access(\"\u002Froot\", os.W_OK):\n        return True\n\n# Shell command runner\ndef run(cmd, timeout=10):\n    return subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)\n\n# Shared output directory: \u002Froot\u002Ftests\n@pytest.fixture\ndef output_dir():\n    return TESTS_OUTPUT_DIR\n```\n\n## Adding a new test\n\n1. Add test functions to the appropriate `guest\u002Fartifacts\u002Fdiagnostics\u002Ftest_*.py` file, or create `test_\u003Ccategory>.py`\n2. Use `from conftest import run` for shell commands, `output_dir` fixture for temp files\n3. Tests auto-skip outside the capsem VM (no special guards needed)\n4. `just exec \"capsem-doctor\"` picks up changes immediately (diagnostics repacked into initrd)\n5. For rootfs-baked changes: `just _build-assets` then `just exec \"capsem-doctor\"`\n\n## Where tests live on disk\n\n- **Source**: `guest\u002Fartifacts\u002Fdiagnostics\u002Ftest_*.py` (in the repo)\n- **In rootfs**: `\u002Fusr\u002Flocal\u002Flib\u002Fcapsem-tests\u002Ftest_*.py` (baked by Dockerfile.rootfs)\n- **In initrd**: overrides rootfs copies via `_pack-initrd` (fast iteration)\n\n## Writing good diagnostic tests\n\n- Test one thing per function. Name clearly: `test_readonly_rootfs`, `test_mitm_ca_in_system_bundle`\n- Use `run()` for shell commands, check `.returncode` and `.stdout`\u002F`.stderr`\n- Set reasonable timeouts (default 10s). Network tests may need longer.\n- Think adversarially: test what should be blocked, not just what should work\n- For VirtioFS tests, skip gracefully in block mode: `pytest.mark.skipif`\n- For Ironbank\u002Frelease gates, do not skip. If a package manager, protocol, or\n  diagnostic dependency is unavailable, the product or harness is broken.\n- Package-manager diagnostics must prove function, not installation presence:\n  run the installed binary\u002Fmodule and verify deterministic behavior.\n","# capsem-doctor\n\ncapsem-doctor is a pytest-based diagnostic suite that runs inside the guest VM. It verifies sandbox integrity, network isolation, runtime environment, and AI agent functionality. It's the smoke test gate -- every change must pass it before shipping.\n\nDoctor is also an Ironbank input. When doctor is used to close a\nrelease-critical VM\u002Fsecurity\u002Fprotocol\u002Fpackage-manager gate, load `\u002Fironbank`\nand assert the full ledger through `tests\u002Fironbank\u002F`: client result, DB rows,\nstructured logs, UDS\u002FHTTP route output, counters, and UI-facing JSON. A doctor\nexit code or \"row exists\" check is not enough.\n\n## Running\n\n```bash\njust exec \"capsem-doctor\"              # Full suite (~10s total including VM boot)\njust exec \"capsem-doctor -k sandbox\"   # Only sandbox tests\njust exec \"capsem-doctor -k network\"   # Only network tests\njust exec \"capsem-doctor -x\"           # Stop on first failure\njust exec \"capsem-doctor -v\"           # Extra verbose\n```\n\n## Test categories\n\n| File | What it validates |\n|------|-------------------|\n| `test_sandbox.py` | Read-only rootfs, binary permissions (chmod 555), no setuid\u002Fsetgid, kernel hardening (no modules, no debugfs, no IPv6, no swap, no kallsyms), process integrity (pty-agent, dnsmasq running; no systemd, sshd, cron), network isolation (dummy0, fake DNS, iptables, no real NICs) |\n| `test_network.py` | MITM CA in system store, curl without -k works, Python urllib HTTPS, CA env vars set (SSL_CERT_FILE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS), HTTP\u002F80 blocked, non-443 ports blocked, direct IP blocked, multi-domain DNS faking, AI provider domains reachable |\n| `test_environment.py` | TERM\u002FHOME\u002FPATH env vars correct, shell is bash, kernel version, aarch64 arch, mount points (\u002Fproc, \u002Fsys, \u002Fdev, \u002Fdev\u002Fpts), tmpfs verification |\n| `test_runtimes.py` | python3\u002Fpip3 versions; hermetic pip install into the venv; hermetic apt install of a local .deb; apt sandbox TLS trust; Python file I\u002FO |\n| `test_workflows.py` | Text write\u002Fread, Python JSON roundtrip, shell pipes, large file (10MB) |\n| `test_virtiofs.py` | VirtioFS root mount, ext4 loopback upper, loop device active, workspace write\u002Fread\u002Flarge file\u002Fsubdir, system overlay writable, pip install works, file delete+recreate (skipped in block mode) |\n| `test_mcp.py` | Guest MCP endpoint tool routing, domain blocking via MCP |\n| `test_injection.py` | Security injection tests |\n| `test_lifecycle.py` | capsem-sysutil lifecycle symlinks, read-only sysutil, VM identity env vars, hostname |\n| `test_storage_write_probes.py` | Bounded create\u002Fread\u002Fdelete probes on package-manager and workspace paths, `_apt` partial cache |\n| `conftest.py` | Test infrastructure (auto-skip outside VM, output dir fixture); `run()` lives in `diagnostic_support.py` |\n\nThe runtime rootfs is minimal (Debian base plus runc, umoci, python3, iptables, iproute2,\ncurl, procps, pytest, rich, venv). Tests may only use those: node, uv, git, AI CLIs and pip\npackages like certifi or fastmcp live in the OCI images under `images\u002F`, proven by `tests\u002Fimages\u002F`.\n\n## Infrastructure (conftest.py)\n\n```python\n# Auto-skip if not in capsem VM (checks root + writable \u002Froot)\ndef pytest_ignore_collect(collection_path, config):\n    if os.geteuid() != 0 or not os.access(\"\u002Froot\", os.W_OK):\n        return True\n\n# Shell command runner\ndef run(cmd, timeout=10):\n    return subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)\n\n# Shared output directory: \u002Froot\u002Ftests\n@pytest.fixture\ndef output_dir():\n    return TESTS_OUTPUT_DIR\n```\n\n## Adding a new test\n\n1. Add test functions to the appropriate `guest\u002Fartifacts\u002Fdiagnostics\u002Ftest_*.py` file, or create `test_\u003Ccategory>.py`\n2. Use `from conftest import run` for shell commands, `output_dir` fixture for temp files\n3. Tests auto-skip outside the capsem VM (no special guards needed)\n4. `just exec \"capsem-doctor\"` picks up changes immediately (diagnostics repacked into initrd)\n5. For rootfs-baked changes: `just _build-assets` then `just exec \"capsem-doctor\"`\n\n## Where tests live on disk\n\n- **Source**: `guest\u002Fartifacts\u002Fdiagnostics\u002Ftest_*.py` (in the repo)\n- **In rootfs**: `\u002Fusr\u002Flocal\u002Flib\u002Fcapsem-tests\u002Ftest_*.py` (baked by Dockerfile.rootfs)\n- **In initrd**: overrides rootfs copies via `_pack-initrd` (fast iteration)\n\n## Writing good diagnostic tests\n\n- Test one thing per function. Name clearly: `test_readonly_rootfs`, `test_mitm_ca_in_system_bundle`\n- Use `run()` for shell commands, check `.returncode` and `.stdout`\u002F`.stderr`\n- Set reasonable timeouts (default 10s). Network tests may need longer.\n- Think adversarially: test what should be blocked, not just what should work\n- For VirtioFS tests, skip gracefully in block mode: `pytest.mark.skipif`\n- For Ironbank\u002Frelease gates, do not skip. If a package manager, protocol, or\n  diagnostic dependency is unavailable, the product or harness is broken.\n- Package-manager diagnostics must prove function, not installation presence:\n  run the installed binary\u002Fmodule and verify deterministic behavior.\n",{"name":5,"description":7},"main","d357170bb677125c80cebed720e62bf47bf083ad","skills\u002Fdev-capsem-doctor",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":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add google\u002Fcapsem --skill dev-capsem-doctor",{"tool":54,"command":55},"bunx","bunx skills add google\u002Fcapsem --skill dev-capsem-doctor",{"tool":57,"command":58},"pnpm","pnpm dlx skills add google\u002Fcapsem --skill dev-capsem-doctor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fdev-capsem-doctor\u002FSKILL.md",true,[],[63,80,96,111,124,136],{"skillNo":64,"name":65,"nameZh":66,"description":67,"descriptionZh":68,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":69,"categories":70,"keywords":77,"publishedAt":34},"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",[71,74],{"categoryNo":72,"categoryName":73,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0DBCRG4XGJMB6QQEP11","编码任务委派",{"categoryNo":75,"categoryName":76,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[78,79],"use capsem","MCP",{"skillNo":81,"name":82,"nameZh":83,"description":84,"descriptionZh":85,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":86,"categories":87,"keywords":94,"publishedAt":34},"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",[88,91],{"categoryNo":89,"categoryName":90,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD6C0J544QTJ9R38Z7ZG","营销专员",{"categoryNo":92,"categoryName":93,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98WRP4APE9VKKKKJ6FV","社交媒体与内容平台管理",[95],"site marketing",{"skillNo":97,"name":98,"nameZh":99,"description":100,"descriptionZh":101,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":102,"categories":103,"keywords":108,"publishedAt":34},"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",[104,107],{"categoryNo":105,"categoryName":106,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[109,110],"site infra","docs",{"skillNo":112,"name":113,"nameZh":114,"description":17,"descriptionZh":115,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":116,"categories":117,"keywords":122,"publishedAt":34},"01M69950YKCZKCDB98JDQNBBRJ","site-architecture","站点架构设计","","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Fsite-architecture\u002FSKILL.md",[118,121],{"categoryNo":119,"categoryName":120,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TKQDF2K4KQS863Q79P4","开发参考",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[123],"site architecture",{"skillNo":125,"name":126,"nameZh":127,"description":17,"descriptionZh":115,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":134,"publishedAt":34},"01M6994Z61JWZ0G2YRJTWFH933","release-process","版本发布流程","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcapsem\u002Fblob\u002Fmain\u002Fskills\u002Frelease-process\u002FSKILL.md",[130,131],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":132,"categoryName":133,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[135],"release process",{"skillNo":137,"name":138,"nameZh":139,"description":140,"descriptionZh":141,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":142,"categories":143,"keywords":148,"publishedAt":34},"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",[144,147],{"categoryNo":145,"categoryName":146,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":75,"categoryName":76,"taxonomyType":23,"taxonomyTypeDesc":24},[149,32],"meta skill creation"]