convert-to-apple-container
Skill1 starsChanged 6 months agoMITView on GitHub
Switch from Docker to Apple Container for macOS-native container isolation. Use when the user wants Apple Container instead of Docker, or is setting up on macOS and prefers the native runtime. Triggers on "apple container", "convert to apple container", "switch to apple container", or "use apple container".
- Reads credentials
- Deletes or force-pushes
4 other projects use a version of this, 4 of them edited.
Adopted by
Most recently taken up by
- microsoft/amplifier-app-nanoclawedited, first seen Jun 12, 2026
- DingyangLyu/MatClawedited, first seen Mar 17, 2026
- sskarz/nanoclawbsteredited, first seen Mar 11, 2026
- breakcafe/picoclawedited, first seen Mar 6, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 4
- DingyangLyu/MatClaw★ 9868% same
- microsoft/amplifier-app-nanoclaw★ 594% same
- sskarz/nanoclawbster★ 265% same
- breakcafe/picoclaw★ 168% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- container/AGENTS.mdAGENTS.md
- add-atomic-chat-toolSkill
- add-dashboardSkill
- add-discordSkill
- add-emacsSkill
- add-gcal-toolSkill
- add-gchatSkill
- add-githubSkill
- add-gmail-toolSkill
- add-imessageSkill
- add-karpathy-llm-wikiSkill
- add-linearSkill
- add-macos-statusbarSkill
- add-matrixSkill
- add-ollama-providerSkill
- add-ollama-toolSkill
- add-parallelSkill
- add-resendSkill
- add-signalSkill
- add-slackSkill
- add-teamsSkill
- add-telegramSkill
- add-vercelSkill
- add-webexSkill
- add-wechatSkill
- add-whatsapp-cloudSkill
- add-whatsappSkill
- clawSkill
- customizeSkill
- debugSkill
- get-qodo-rulesSkill
- init-first-agentSkill
- manage-channelsSkill
- manage-mountsSkill
- migrate-from-openclawSkill
- migrate-clawbridgeSkill
- qodo-pr-resolverSkill
- setupSkill
- update-clawbridgeSkill
- update-skillsSkill
- x-integrationSkill
The file
We split this skill into the rules it gives an agent
11 rules. 4 are common, 5 are distinctive, and 2 are very specific to this project.
4
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 21
All exported interfaces and IPC protocol
- Common: line 27
Verify Apple Container is installed:
- Very specific: line 48
If it already shows 'container', the runtime is already Apple Container.
- Very specific: line 58
If upstream is missing, add it:
- Distinctive: line 78
If the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.
- Common: line 87
All tests must pass and build must be clean before proceeding.
- Distinctive: line 93
Use AskUserQuestion to ask the user:
- Distinctive: line 107
If they chose the public network option, set up and persist the firewall rule:
- Distinctive: line 118
Verify the rule is working:
- Distinctive: line 124
If the verification shows "EXPOSED", warn the user and retry.
- Common: line 202
Check directory permissions on the host.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Convert to Apple Container
This skill switches ClawBridge's container runtime from Docker to Apple Container (macOS-only). It uses the skills engine for deterministic code changes, then walks through verification.
What this changes:
- Container runtime binary:
docker→container - Mount syntax:
-v path:path:ro→--mount type=bind,source=...,target=...,readonly - Startup check:
docker info→container system status(with auto-start) - Orphan detection:
docker ps --filter→container ls --format json - Build script default:
docker→container - Dockerfile entrypoint:
.envshadowing viamount --bindinside the container (Apple Container only supports directory mounts, not file mounts like Docker's/dev/nulloverlay) - Container runner: main-group containers start as root for
mount --bind, then drop privileges viasetpriv
What stays the same:
- Mount security/allowlist validation
- All exported interfaces and IPC protocol
- Non-main container behavior (still uses
--userflag) - All other functionality
Prerequisites
Verify Apple Container is installed:
container --version && echo "Apple Container ready" || echo "Install Apple Container first"If not installed:
- Download from https://github.com/apple/container/releases
- Install the
.pkgfile - Verify:
container --version
Apple Container requires macOS. It does not work on Linux.
Phase 1: Pre-flight
Check if already applied
grep "CONTAINER_RUNTIME_BIN" src/container-runtime.tsIf it already shows 'container', the runtime is already Apple Container. Skip to Phase 4.
Phase 2: Apply Code Changes
Ensure upstream remote
git remote -vIf upstream is missing, add it:
git remote add upstream https://github.com/other2368-byte/clawbridge-agent.gitMerge the skill branch
git fetch upstream skill/apple-container
git merge upstream/skill/apple-containerThis merges in:
src/container-runtime.ts— Apple Container implementation (replaces Docker)src/container-runtime.test.ts— Apple Container-specific testssrc/container-runner.ts— .env shadow mount fix and privilege droppingcontainer/Dockerfile— entrypoint that shadows .env viamount --bindcontainer/build.sh— default runtime set tocontainer
If the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.
Validate code changes
pnpm test
pnpm run buildAll tests must pass and build must be clean before proceeding.
Phase 3: Credential proxy network binding
Apple Container uses a bridge network (bridge100) that only exists while containers are running. The credential proxy must start before any container, so it cannot bind to the bridge IP. It must bind to 0.0.0.0, which exposes port 3001 on all network interfaces — anyone on your local network could route API requests through the proxy using your credentials.
Use AskUserQuestion to ask the user:
"The credential proxy needs to bind to all interfaces (0.0.0.0). Is this Mac on a trusted private network?"
Options:
- Yes, private/home network — description: "No firewall rule needed."
- No, shared/public network — description: "Add a macOS firewall rule to block external access to port 3001."
For both options, add CREDENTIAL_PROXY_HOST=0.0.0.0 to .env:
grep -q 'CREDENTIAL_PROXY_HOST' .env 2>/dev/null || echo 'CREDENTIAL_PROXY_HOST=0.0.0.0' >> .envIf they chose the public network option, set up and persist the firewall rule:
echo "block in on en0 proto tcp to any port 3001" | sudo pfctl -ef -grep -q 'clawbridge proxy' /etc/pf.conf 2>/dev/null || echo '# clawbridge proxy — block LAN access to credential proxy
block in on en0 proto tcp to any port 3001' | sudo tee -a /etc/pf.conf > /dev/nullVerify the rule is working:
curl -sf http://$(ipconfig getifaddr en0):3001 && echo "EXPOSED — rule not working" || echo "BLOCKED — rule active"If the verification shows "EXPOSED", warn the user and retry. If "BLOCKED", confirm success and continue.
Phase 4: Verify
Ensure Apple Container runtime is running
container system status || container system startBuild the container image
./container/build.shTest basic execution
echo '{}' | container run -i --entrypoint /bin/echo clawbridge-agent:latest "Container OK"Test readonly mounts
mkdir -p /tmp/test-ro && echo "test" > /tmp/test-ro/file.txt
container run --rm --entrypoint /bin/bash \
--mount type=bind,source=/tmp/test-ro,target=/test,readonly \
clawbridge-agent:latest \
-c "cat /test/file.txt && touch /test/new.txt 2>&1 || echo 'Write blocked (expected)'"
rm -rf /tmp/test-roExpected: Read succeeds, write fails with "Read-only file system".
Test read-write mounts
mkdir -p /tmp/test-rw
container run --rm --entrypoint /bin/bash \
-v /tmp/test-rw:/test \
clawbridge-agent:latest \
-c "echo 'test write' > /test/new.txt && cat /test/new.txt"
cat /tmp/test-rw/new.txt && rm -rf /tmp/test-rwExpected: Both operations succeed.
Full integration test
pnpm run build
launchctl kickstart -k gui/$(id -u)/com.clawbridgeSend a message via WhatsApp and verify the agent responds.
Troubleshooting
Apple Container not found:
- Download from https://github.com/apple/container/releases
- Install the
.pkgfile - Verify:
container --version
Runtime won't start:
container system start
container system statusImage build fails:
# Clean rebuild — Apple Container caches aggressively
container builder stop && container builder rm && container builder start
./container/build.shContainer can't write to mounted directories: Check directory permissions on the host. The container runs as uid 1000.
Summary of Changed Files
| File | Type of Change |
src/container-runtime.ts | Full replacement — Docker → Apple Container API |
src/container-runtime.test.ts | Full replacement — tests for Apple Container behavior |
src/container-runner.ts | .env shadow mount removed, main containers start as root with privilege drop |
container/Dockerfile | Entrypoint: mount --bind for .env shadowing, setpriv privilege drop |
container/build.sh | Default runtime: docker → container |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

