-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Document shared agent skills #25588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dvdksn
wants to merge
2
commits into
docker:main
Choose a base branch
from
dvdksn:codex/document-shared-agent-skills
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Document shared agent skills #25588
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,14 +2,96 @@ | |||||||||
| title: Workflow patterns | ||||||||||
| linkTitle: Workflows | ||||||||||
| weight: 30 | ||||||||||
| description: Workflow patterns for Docker Sandboxes, covering git strategies, local services, authenticated tools, commit signing, and CI integration. | ||||||||||
| keywords: docker sandboxes, sbx, workflows, clone mode, git, branches, commit signing, github cli, local services, ci, headless | ||||||||||
| description: Workflow patterns for Docker Sandboxes, covering shared agent skills, git strategies, local services, authenticated tools, and CI integration. | ||||||||||
| keywords: docker sandboxes, sbx, workflows, agent skills, shared skills, clone mode, git, branches, commit signing, github cli, local services, ci, headless | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| Use this page when you need to choose an approach for a specific way of working | ||||||||||
| with sandboxes. For command syntax and lifecycle basics, see | ||||||||||
| [Usage](usage.md). | ||||||||||
|
|
||||||||||
| ## Share agent skills | ||||||||||
|
|
||||||||||
| Shared agent skills make skills from supported agents on your host available | ||||||||||
| inside your sandboxes. Importing copies the skills into a persistent store that | ||||||||||
| survives sandbox deletion and is shared by default with new sandboxes that run | ||||||||||
| a supported agent. | ||||||||||
|
|
||||||||||
| > [!NOTE] | ||||||||||
| > Shared agent skills are experimental. | ||||||||||
| Preview the skills that `sbx` finds without copying them: | ||||||||||
|
|
||||||||||
| ```console | ||||||||||
| $ sbx skills import --dry-run | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| The command scans the following directories in order and copies each skill | ||||||||||
| subdirectory into the shared store. When the sandbox starts, `sbx` mounts the | ||||||||||
| store at the path the agent reads inside the sandbox. | ||||||||||
|
|
||||||||||
| | Agent | Host source | Sandbox mount target | | ||||||||||
| | ----------- | ------------------- | ----------------------------- | | ||||||||||
| | Claude Code | `~/.claude/skills` | `/home/agent/.claude/skills` | | ||||||||||
| | Codex | `~/.agents/skills` | `/home/agent/.agents/skills` | | ||||||||||
|
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We actually import Codex first because a few coding agents also read from |
||||||||||
| | Copilot | `~/.copilot/skills` | `/home/agent/.copilot/skills` | | ||||||||||
| | Cursor | `~/.cursor/skills` | `/home/agent/.cursor/skills` | | ||||||||||
| | Droid | `~/.factory/skills` | `/home/agent/.factory/skills` | | ||||||||||
|
|
||||||||||
| All imported skills go into the same store, regardless of their source. If | ||||||||||
| more than one source contains a skill with the same directory name, the skill | ||||||||||
| from the first source in the table wins and `sbx` warns about the others. | ||||||||||
|
|
||||||||||
| Import the skills: | ||||||||||
|
|
||||||||||
| ```console | ||||||||||
| $ sbx skills import | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| The final output reports the shared store path. The default locations are: | ||||||||||
|
|
||||||||||
| | Platform | Shared store path | | ||||||||||
| | -------- | --------------------------------------------------------------------------- | | ||||||||||
| | macOS | `~/Library/Application Support/com.docker.sandboxes/sandboxes/agent-skills` | | ||||||||||
| | Linux | `~/.local/state/sandboxes/sandboxes/agent-skills` | | ||||||||||
| | Windows | `%LOCALAPPDATA%\DockerSandboxes\sandboxes\state\agent-skills` | | ||||||||||
|
|
||||||||||
| On Linux, `sbx` uses `$XDG_STATE_HOME/sandboxes/sandboxes/agent-skills` when | ||||||||||
| `XDG_STATE_HOME` is set. | ||||||||||
|
|
||||||||||
| When a skill already exists in the store, `sbx` prompts before replacing it. | ||||||||||
| Use `--force` to replace existing skills without prompts. Importing replaces | ||||||||||
| the complete skill directory rather than merging files. Run the import command | ||||||||||
| again when you want to copy updates from the host. Running `sbx reset` clears | ||||||||||
| the shared store. | ||||||||||
|
|
||||||||||
| Sandboxes created with `sbx` version 0.37.0 or later for a supported agent are | ||||||||||
| configured to mount the store read-write by default. These sandboxes mount the | ||||||||||
| current contents of the store each time they start, so you can import skills | ||||||||||
| before or after creating them. To create a sandbox without the shared store, | ||||||||||
| use `--no-share-skills`: | ||||||||||
|
|
||||||||||
| ```console | ||||||||||
| $ sbx run --no-share-skills claude | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Upgrading `sbx` does not enable shared skills for sandboxes created with an | ||||||||||
| earlier version. Remove and recreate those sandboxes after upgrading. The | ||||||||||
| `--no-share-skills` option also only applies when the sandbox is created. To | ||||||||||
| turn off shared skills for an existing sandbox, remove it and recreate it with | ||||||||||
| the option. | ||||||||||
|
|
||||||||||
| > [!WARNING] | ||||||||||
| > The shared skills store is mounted read-write. A sandbox can modify any skill | ||||||||||
| > in the store, and another sandbox can later load the modified instructions or | ||||||||||
| > run the modified scripts. The store is dedicated sandbox state, so this does | ||||||||||
| > not by itself execute the modified skill on your host. It does put every | ||||||||||
| > sandbox that shares the store in the same trust boundary. Use | ||||||||||
| > `--no-share-skills` to keep a sandbox outside that boundary. | ||||||||||
| Some agents scan for skills when a session starts. If imported skills don't | ||||||||||
| appear in an existing session, start another agent session. | ||||||||||
|
|
||||||||||
| ## Git workflows | ||||||||||
|
|
||||||||||
| Sandboxes support three approaches for working with Git repositories. The | ||||||||||
|
|
||||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MEDIUM] Security diagram alt-text is now incomplete after adding shared agent skills to the boundary description
The PR adds the shared agent skills store to the trust-boundary bullet lists ("What crosses the boundary into the VM" and "What crosses the boundary back to the host"), but the alt-text of the diagram image directly below remains unchanged. It still says only "The workspace directory is shared read-write" — it no longer mentions the shared skills store as a second cross-boundary share.
This leaves the diagram description inaccurate for screen-reader users and anyone relying on the alt-text alone. Consider updating the alt-text to reflect both shared paths, for example:
If the diagram image itself will be updated in a follow-up PR, a brief note in the alt-text (or a caption) that the diagram predates the shared skills feature would also address this.