AGENT SKILL
cbox-boxfile
Inspect an existing project, compose or update its Boxfile.toml for cbox, and validate it with the real cbox parser.
- License 许可
- MIT
- 最近更新
- 2026-09-29
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- cbox-boxfile
- license
- MIT
- metadata
- { "project": "cardboard-box", "artifact": "Boxfile.toml" }
- description
- Inspect an existing project, compose or update its Boxfile.toml for cbox, and validate it with the real cbox parser.
- compatibility
- Requires cbox with the validate command; targets Linux projects using distrobox.
02 资源文件 4
- 其他examples/full/Boxfile.toml598 B
- 其他examples/full/config/example.conf81 B
- 其他examples/minimal/Boxfile.toml44 B
- 参考文档references/boxfile.md1.6 KB
03 SKILL.md 正文
Compose a cbox Boxfile
Use this skill when the user wants a development box described by
Boxfile.toml. The deliverable is the project file, not an agent configuration
file and not a command that creates a live box.
Workflow
- Inspect the repository before writing. Read its language manifests, lockfiles, documented setup commands, expected services, and existing container/devbox configuration. Do not invent dependencies that the project does not need.
- Ask only for choices that cannot be inferred safely, such as host Docker access or a host path to mount. Prefer a minimal file when information is missing.
- Compose
Boxfile.tomlusing the field reference. Start from the minimal example, then add only project-backed fields. - Never put credentials or tokens in the file. Declare secret names under
[secrets]withfrom = "keyring"; tell the user to populate them withcbox secret set <BOX> <KEY>. - Make every shell provision step non-interactive, repeatable, and safe to run again. Prefer package declarations for OS packages. Use copy steps only for project-owned files whose source path is relative to the Boxfile directory.
- Run
cbox validate --file Boxfile.toml. Fix all errors and rerun until it exits 0. Treat warnings as review items; explain any warning left in place. - Summarize what was inferred and what the user may need to customize. Do not
run
cbox up,apply,create, secret commands, or backend commands unless the user separately asks for that state-changing action.
Guardrails
nameis required and must match^[A-Za-z0-9][A-Za-z0-9_.-]*$.- Host and guest mount paths must be absolute; every guest path must be unique.
docker = "none"is the safe default. Usehostornestedonly when the project actually needs it and the user accepts the coupling/security tradeoff.- Prefer
isolated = truefor a project-specific home. An explicitbox.hometakes precedence. - Sandbox unshare values are
netns,ipc,process,devsys, andgroups, or the string"all". Combining unshare with Docker access produces a warning. - Plain
[env]values are committed to source control. Secret values never are. - Unknown top-level fields are warnings, while typos inside
[box],[sandbox], and secret entries are errors. Do not rely on ignored future fields. - Validation is syntax and schema validation only. It does not prove that an image, package, host path, or provisioning command exists.
Output quality
Keep the Boxfile readable, with comments only where they capture a real project decision. Preserve unrelated user content when updating an existing file. The examples in this skill are fixtures validated by cbox's own parser.