[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BSC2D1D4E21AWMKS3ZD4SY":3,"skill-same:01M7BSC2D1D4E21AWMKS3ZD4SY":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":14,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M7BSC2D1D4E21AWMKS3ZD4SY","bubblewrap",null,"Use this skill when the user wants to sandbox, isolate, or restrict an application using bubblewrap (bwrap). Trigger on mentions of \"bwrap\", \"bubblewrap\", \"sandbox a process\", \"sandbox an application\", \"isolate an app\", \"unprivileged sandbox\", \"namespace isolation\", \"restrict filesystem access\", or when the user wants to run untrusted code, limit what a program can see on the filesystem, create a minimal chroot-like environment without root, or write wrapper scripts that confine applications. Also trigger when the user asks about Flatpak's sandboxing internals, since Flatpak uses bwrap under the hood. Do NOT trigger for Docker, Podman, systemd-nspawn, Firejail, or toolbox\u002Fdistrobox questions unless bwrap is explicitly mentioned.","thimslugga\u002Fagent-plugins","thimslugga","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F285055?v=4","01M7BRYXXABGR31PBN8YW9YYD3","Adam Kaminski","01M7BRYXY1GHRY2VCK15WG8NCZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Flinux\u002Fskills\u002Fbubblewrap\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bubblewrap\ndescription: >\n  Use this skill when the user wants to sandbox, isolate, or restrict an\n  application using bubblewrap (bwrap). Trigger on mentions of \"bwrap\",\n  \"bubblewrap\", \"sandbox a process\", \"sandbox an application\", \"isolate\n  an app\", \"unprivileged sandbox\", \"namespace isolation\", \"restrict\n  filesystem access\", or when the user wants to run untrusted code, limit\n  what a program can see on the filesystem, create a minimal chroot-like\n  environment without root, or write wrapper scripts that confine\n  applications. Also trigger when the user asks about Flatpak's\n  sandboxing internals, since Flatpak uses bwrap under the hood.\n  Do NOT trigger for Docker, Podman, systemd-nspawn, Firejail, or\n  toolbox\u002Fdistrobox questions unless bwrap is explicitly mentioned.\ncompatibility: >\n  Requires Linux with user namespace support (CONFIG_USER_NS=y).\n  Package: bubblewrap (Fedora\u002FArch\u002FDebian) or bubblewrap-suid\n  (hardened kernels). bwrap binary must be in PATH.\nmetadata:\n  author: user\n  version: \"1.0\"\n  sources:\n    - https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap\n    - https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FBubblewrap\n    - https:\u002F\u002Fsloonz.github.io\u002Fposts\u002Fsandboxing-1\u002F\n---\n\n# Bubblewrap (bwrap)\n\nBubblewrap is a low-level, unprivileged sandboxing tool. It creates an\nempty filesystem namespace on a tmpfs root, then lets you construct the\nsandbox's view of the world entirely through command-line options. Think\nof it as building a room from scratch: you start with bare walls (empty\nnamespace) and bolt in only the doors and windows (bind mounts) you\nchoose. Nothing is visible unless you explicitly mount it.\n\nFlatpak, GNOME, sandwine, and many ad-hoc scripts use bwrap internally.\n\n## Mental model\n\nbwrap does two things:\n\n1. Creates Linux **namespaces** (mount, pid, net, ipc, uts, user, cgroup)\n   to isolate the process from the host.\n2. Constructs a **virtual filesystem** inside the mount namespace via\n   bind mounts, tmpfs, symlinks, and overlays.\n\nThe sandboxed process sees only what you explicitly provide. There is no\ndefault policy -- bwrap is a toolkit, not an opinionated framework.\n\n## Core option reference\n\nOptions are processed **in order**. Later mounts can overlay earlier ones.\nThis ordering matters: `--tmpfs $HOME` then `--ro-bind $HOME\u002F.config $HOME\u002F.config`\ngives a tmpfs home with only `.config` visible read-only inside it.\n\n### Filesystem construction\n\n```\n--bind SRC DEST          # Read-write bind mount\n--ro-bind SRC DEST       # Read-only bind mount\n--dev-bind SRC DEST      # Bind mount allowing device access\n--tmpfs DEST             # Fresh tmpfs\n--dir DEST               # Create empty directory\n--symlink SRC DEST       # Symlink (e.g. --symlink usr\u002Flib \u002Flib64)\n--proc DEST              # Mount procfs\n--dev DEST               # Mount devtmpfs (console, null, zero, random, etc.)\n--overlay-src SRC        # Add overlay lower layer (precedes --overlay\u002F--ro-overlay)\n--overlay RW WORK DEST   # Writable overlayfs\n--ro-overlay DEST        # Read-only overlayfs (needs 2+ --overlay-src)\n--tmp-overlay DEST       # Overlayfs with writes going to sandbox tmpfs\n--remount-ro DEST        # Remount existing mount read-only\n--perms OCTAL            # Set permissions on next --tmpfs\u002F--dir\u002F--file\n--size BYTES             # Set max size on next --tmpfs\n--chmod OCTAL PATH       # Change permissions of existing path\n--file FD DEST           # Copy fd content to file at DEST (mode 0666)\n--bind-data FD DEST      # Copy fd content, bind-mount at DEST (mode 0600)\n--ro-bind-data FD DEST   # Same as above but read-only\n```\n\n`--bind-try`, `--ro-bind-try`, `--dev-bind-try` variants silently skip\nif SRC does not exist. Useful for optional paths like `\u002Fetc\u002Flocaltime`.\n\n### Namespace isolation\n\n```\n--unshare-user           # New user namespace\n--unshare-pid            # New PID namespace (sandbox gets its own pid 1)\n--unshare-net            # New network namespace (no network by default)\n--unshare-ipc            # New IPC namespace\n--unshare-uts            # New UTS namespace (needed for --hostname)\n--unshare-cgroup         # New cgroup namespace\n--unshare-all            # All of the above (uses -try variants where needed)\n--share-net              # Re-enable network after --unshare-all\n--disable-userns         # Prevent sandbox from creating nested user namespaces\n```\n\n### Identity and environment\n\n```\n--uid UID                # Custom UID inside sandbox (needs --unshare-user)\n--gid GID                # Custom GID inside sandbox (needs --unshare-user)\n--hostname NAME          # Custom hostname (needs --unshare-uts)\n--chdir DIR              # Working directory inside sandbox\n--setenv VAR VALUE       # Set environment variable\n--unsetenv VAR           # Unset environment variable\n--clearenv               # Wipe all env vars except PWD and subsequent --setenv\n```\n\n### Security hardening\n\n```\n--new-session            # setsid() -- prevents TIOCSTI terminal injection (CVE-2017-5226)\n--die-with-parent        # SIGKILL sandbox when parent dies\n--seccomp FD             # Load compiled seccomp-bpf rules from fd\n--add-seccomp-fd FD      # Stack multiple seccomp filters\n--cap-add CAP            # Add capability (privileged only)\n--cap-drop CAP           # Drop capability (ALL to drop everything, which is the default)\n```\n\n### Monitoring\n\n```\n--info-fd FD             # Write sandbox info JSON to fd\n--json-status-fd FD      # Write child-pid and exit-code JSON lines to fd\n--lock-file DEST         # Hold lock while sandbox runs\n--sync-fd FD             # Keep fd open while sandbox runs\n--block-fd FD            # Block sandbox start until fd has data\n```\n\n## Building a sandbox step by step\n\nStart permissive, then tighten. The workflow:\n\n### Step 1: No-op baseline\n\nBind the entire host read-only to confirm the app runs at all:\n\n```bash\nbwrap \\\n  --ro-bind \u002F \u002F \\\n  --dev \u002Fdev \\\n  --proc \u002Fproc \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\n### Step 2: Minimal filesystem\n\nReplace the full bind with only what the app needs. Use `strace` to\ndiscover required paths:\n\n```bash\nstrace -e trace=open,openat,stat,access -f bwrap \\\n  --ro-bind \u002F \u002F \\\n  \u002Fusr\u002Fbin\u002Fmyapp 2>&1 | grep -v ENOENT\n```\n\nThen build a targeted mount set:\n\n```bash\nbwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\nOn merged-usr distros (Fedora, recent Arch, Debian 12+), `\u002Fbin`,\n`\u002Flib`, `\u002Flib64`, `\u002Fsbin` are already symlinks into `\u002Fusr`. Create\nmatching symlinks inside the sandbox.\n\n### Step 3: Isolate namespaces\n\n```bash\nbwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  --unshare-all \\\n  --share-net \\\n  --new-session \\\n  --die-with-parent \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\nDrop `--share-net` if the app doesn't need network access.\n\n### Step 4: Handle the home directory\n\nThree strategies:\n\n```bash\n# A) No home at all (app has no access to user data)\n# Simply don't bind $HOME -- it won't exist in the sandbox.\n\n# B) Tmpfs home (app can write but nothing persists)\n--tmpfs \"$HOME\"\n\n# C) Dedicated persistent home (app sees a separate directory as $HOME)\n--bind \"$HOME\u002Fsandboxes\u002Fmyapp\" \"$HOME\"\n\n# D) Read-only home with specific writable dirs\n--tmpfs \"$HOME\" \\\n--ro-bind \"$HOME\u002F.config\u002Fmyapp\" \"$HOME\u002F.config\u002Fmyapp\" \\\n--bind \"$HOME\u002FDocuments\" \"$HOME\u002FDocuments\"\n```\n\n### Step 5: Desktop integration (GUI apps)\n\nFor Wayland:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002F$WAYLAND_DISPLAY\" \"$XDG_RUNTIME_DIR\u002F$WAYLAND_DISPLAY\" \\\n--setenv WAYLAND_DISPLAY \"$WAYLAND_DISPLAY\" \\\n--setenv XDG_RUNTIME_DIR \"$XDG_RUNTIME_DIR\"\n```\n\nFor X11 (note: X11 socket forwarding is NOT a security boundary --\nany X11 client can keylog other clients. Use Xephyr or xpra for real\nisolation):\n```bash\n--ro-bind \u002Ftmp\u002F.X11-unix\u002FX0 \u002Ftmp\u002F.X11-unix\u002FX0 \\\n--ro-bind \"$HOME\u002F.Xauthority\" \"$HOME\u002F.Xauthority\" \\\n--setenv DISPLAY \"$DISPLAY\"\n```\n\nFor PulseAudio:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002Fpulse\" \"$XDG_RUNTIME_DIR\u002Fpulse\"\n```\n\nFor PipeWire:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002Fpipewire-0\" \"$XDG_RUNTIME_DIR\u002Fpipewire-0\"\n```\n\nFor D-Bus (use xdg-dbus-proxy to filter, raw socket = sandbox escape):\n```bash\n# Filtered D-Bus (recommended)\nxdg-dbus-proxy \"$DBUS_SESSION_BUS_ADDRESS\" \u002Frun\u002Fuser\u002F$UID\u002Fbus-proxy \\\n  --filter --talk=org.freedesktop.Notifications &\nPROXY_PID=$!\nbwrap ... \\\n  --ro-bind \u002Frun\u002Fuser\u002F$UID\u002Fbus-proxy \u002Frun\u002Fuser\u002F$UID\u002Fbus \\\n  --setenv DBUS_SESSION_BUS_ADDRESS \"unix:path=\u002Frun\u002Fuser\u002F$UID\u002Fbus\" \\\n  \u002Fusr\u002Fbin\u002Fmyapp\nkill $PROXY_PID\n```\n\n### Step 6: GPU access (for OpenGL\u002FVulkan)\n\n```bash\n--dev-bind \u002Fdev\u002Fdri \u002Fdev\u002Fdri \\\n--ro-bind \u002Fsys\u002Fdev\u002Fchar \u002Fsys\u002Fdev\u002Fchar \\\n--ro-bind \u002Fsys\u002Fdevices\u002Fpci0000:00 \u002Fsys\u002Fdevices\u002Fpci0000:00\n```\n\n## Wrapper script pattern\n\nThe standard approach is a shell script that replaces or wraps the\nreal binary:\n\n```bash\n#!\u002Fbin\u002Fsh\n# ~\u002F.local\u002Fbin\u002Fmyapp-sandboxed\nexec bwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  --dir \u002Frun --dir \"\u002Frun\u002Fuser\u002F$(id -u)\" \\\n  --tmpfs \"$HOME\" \\\n  --unshare-all \\\n  --share-net \\\n  --new-session \\\n  --die-with-parent \\\n  --clearenv \\\n  --setenv HOME \"$HOME\" \\\n  --setenv USER \"$USER\" \\\n  --setenv PATH \"\u002Fusr\u002Fbin:\u002Fusr\u002Fsbin\" \\\n  --setenv TERM \"$TERM\" \\\n  \u002Fusr\u002Fbin\u002Fmyapp \"$@\"\n```\n\nFor detailed reference on specific desktop app sandboxing (Transmission,\nMuPDF, Steam, browsers), see `references\u002Fapp-examples.md`.\n\n## Gotchas\n\n- **Order matters.** `--tmpfs $HOME --ro-bind $HOME\u002F.config $HOME\u002F.config`\n  works. Reverse the order and `.config` is hidden by the tmpfs.\n- **--new-session breaks shell job control.** The `bg`, `fg`, and `Ctrl-Z`\n  won't work for processes launched with `--new-session`. This is a\n  trade-off for TIOCSTI protection. Always use it unless you have a\n  specific reason not to (and then use seccomp to block TIOCSTI instead).\n- **--unshare-net creates a namespace with only loopback.** The app gets\n  no network at all unless you `--share-net`.\n- **Merged-usr symlinks.** On Fedora\u002FArch\u002FDebian 12+, you need\n  `--symlink usr\u002Fbin \u002Fbin` etc. or programs that reference `\u002Fbin\u002Fsh` will\n  fail. Don't bind `\u002Fbin` directly -- it's already a symlink on the host.\n- **D-Bus = sandbox escape.** Binding the session bus socket directly\n  lets the sandbox call arbitrary D-Bus methods (including systemd's\n  `StartTransientUnit`). Use xdg-dbus-proxy with `--filter`.\n- **X11 = sandbox escape.** Any X11 client can read keystrokes from\n  any other. Use Wayland, Xephyr, or xpra for real GUI isolation.\n- **Files owned by root appear as nobody.** When `--unshare-user` is\n  active, UIDs\u002FGIDs outside your mapping show as `nobody:nogroup`.\n  This is cosmetic but may confuse apps that check ownership.\n- **sudo\u002Fsu won't work inside the sandbox.** The user namespace maps\n  only your UID\u002FGID. Privileged operations are not possible by design.\n- **Chromium\u002FFirefox nested sandboxes.** These browsers have their own\n  seccomp sandboxing. Inside bwrap, the nested sandbox may fail.\n  Pass `--disable-gpu-sandbox` or set environment variables like\n  `CHROME_FLAGS=\"--no-sandbox\"` for the inner layer. The outer bwrap\n  sandbox still provides confinement.\n- **strace is your best friend.** When an app fails silently, run it\n  under `strace -e trace=open,openat,stat,access -f` to see which\n  files it's looking for and can't find.\n- **`--die-with-parent` uses PDEATHSIG.** It fires SIGKILL when the\n  direct parent of bwrap dies. If bwrap is started from a subshell or\n  pipeline, the \"parent\" may not be what you expect.\n","# Bubblewrap (bwrap)\n\nBubblewrap is a low-level, unprivileged sandboxing tool. It creates an\nempty filesystem namespace on a tmpfs root, then lets you construct the\nsandbox's view of the world entirely through command-line options. Think\nof it as building a room from scratch: you start with bare walls (empty\nnamespace) and bolt in only the doors and windows (bind mounts) you\nchoose. Nothing is visible unless you explicitly mount it.\n\nFlatpak, GNOME, sandwine, and many ad-hoc scripts use bwrap internally.\n\n## Mental model\n\nbwrap does two things:\n\n1. Creates Linux **namespaces** (mount, pid, net, ipc, uts, user, cgroup)\n   to isolate the process from the host.\n2. Constructs a **virtual filesystem** inside the mount namespace via\n   bind mounts, tmpfs, symlinks, and overlays.\n\nThe sandboxed process sees only what you explicitly provide. There is no\ndefault policy -- bwrap is a toolkit, not an opinionated framework.\n\n## Core option reference\n\nOptions are processed **in order**. Later mounts can overlay earlier ones.\nThis ordering matters: `--tmpfs $HOME` then `--ro-bind $HOME\u002F.config $HOME\u002F.config`\ngives a tmpfs home with only `.config` visible read-only inside it.\n\n### Filesystem construction\n\n```\n--bind SRC DEST          # Read-write bind mount\n--ro-bind SRC DEST       # Read-only bind mount\n--dev-bind SRC DEST      # Bind mount allowing device access\n--tmpfs DEST             # Fresh tmpfs\n--dir DEST               # Create empty directory\n--symlink SRC DEST       # Symlink (e.g. --symlink usr\u002Flib \u002Flib64)\n--proc DEST              # Mount procfs\n--dev DEST               # Mount devtmpfs (console, null, zero, random, etc.)\n--overlay-src SRC        # Add overlay lower layer (precedes --overlay\u002F--ro-overlay)\n--overlay RW WORK DEST   # Writable overlayfs\n--ro-overlay DEST        # Read-only overlayfs (needs 2+ --overlay-src)\n--tmp-overlay DEST       # Overlayfs with writes going to sandbox tmpfs\n--remount-ro DEST        # Remount existing mount read-only\n--perms OCTAL            # Set permissions on next --tmpfs\u002F--dir\u002F--file\n--size BYTES             # Set max size on next --tmpfs\n--chmod OCTAL PATH       # Change permissions of existing path\n--file FD DEST           # Copy fd content to file at DEST (mode 0666)\n--bind-data FD DEST      # Copy fd content, bind-mount at DEST (mode 0600)\n--ro-bind-data FD DEST   # Same as above but read-only\n```\n\n`--bind-try`, `--ro-bind-try`, `--dev-bind-try` variants silently skip\nif SRC does not exist. Useful for optional paths like `\u002Fetc\u002Flocaltime`.\n\n### Namespace isolation\n\n```\n--unshare-user           # New user namespace\n--unshare-pid            # New PID namespace (sandbox gets its own pid 1)\n--unshare-net            # New network namespace (no network by default)\n--unshare-ipc            # New IPC namespace\n--unshare-uts            # New UTS namespace (needed for --hostname)\n--unshare-cgroup         # New cgroup namespace\n--unshare-all            # All of the above (uses -try variants where needed)\n--share-net              # Re-enable network after --unshare-all\n--disable-userns         # Prevent sandbox from creating nested user namespaces\n```\n\n### Identity and environment\n\n```\n--uid UID                # Custom UID inside sandbox (needs --unshare-user)\n--gid GID                # Custom GID inside sandbox (needs --unshare-user)\n--hostname NAME          # Custom hostname (needs --unshare-uts)\n--chdir DIR              # Working directory inside sandbox\n--setenv VAR VALUE       # Set environment variable\n--unsetenv VAR           # Unset environment variable\n--clearenv               # Wipe all env vars except PWD and subsequent --setenv\n```\n\n### Security hardening\n\n```\n--new-session            # setsid() -- prevents TIOCSTI terminal injection (CVE-2017-5226)\n--die-with-parent        # SIGKILL sandbox when parent dies\n--seccomp FD             # Load compiled seccomp-bpf rules from fd\n--add-seccomp-fd FD      # Stack multiple seccomp filters\n--cap-add CAP            # Add capability (privileged only)\n--cap-drop CAP           # Drop capability (ALL to drop everything, which is the default)\n```\n\n### Monitoring\n\n```\n--info-fd FD             # Write sandbox info JSON to fd\n--json-status-fd FD      # Write child-pid and exit-code JSON lines to fd\n--lock-file DEST         # Hold lock while sandbox runs\n--sync-fd FD             # Keep fd open while sandbox runs\n--block-fd FD            # Block sandbox start until fd has data\n```\n\n## Building a sandbox step by step\n\nStart permissive, then tighten. The workflow:\n\n### Step 1: No-op baseline\n\nBind the entire host read-only to confirm the app runs at all:\n\n```bash\nbwrap \\\n  --ro-bind \u002F \u002F \\\n  --dev \u002Fdev \\\n  --proc \u002Fproc \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\n### Step 2: Minimal filesystem\n\nReplace the full bind with only what the app needs. Use `strace` to\ndiscover required paths:\n\n```bash\nstrace -e trace=open,openat,stat,access -f bwrap \\\n  --ro-bind \u002F \u002F \\\n  \u002Fusr\u002Fbin\u002Fmyapp 2>&1 | grep -v ENOENT\n```\n\nThen build a targeted mount set:\n\n```bash\nbwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\nOn merged-usr distros (Fedora, recent Arch, Debian 12+), `\u002Fbin`,\n`\u002Flib`, `\u002Flib64`, `\u002Fsbin` are already symlinks into `\u002Fusr`. Create\nmatching symlinks inside the sandbox.\n\n### Step 3: Isolate namespaces\n\n```bash\nbwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  --unshare-all \\\n  --share-net \\\n  --new-session \\\n  --die-with-parent \\\n  \u002Fusr\u002Fbin\u002Fmyapp\n```\n\nDrop `--share-net` if the app doesn't need network access.\n\n### Step 4: Handle the home directory\n\nThree strategies:\n\n```bash\n# A) No home at all (app has no access to user data)\n# Simply don't bind $HOME -- it won't exist in the sandbox.\n\n# B) Tmpfs home (app can write but nothing persists)\n--tmpfs \"$HOME\"\n\n# C) Dedicated persistent home (app sees a separate directory as $HOME)\n--bind \"$HOME\u002Fsandboxes\u002Fmyapp\" \"$HOME\"\n\n# D) Read-only home with specific writable dirs\n--tmpfs \"$HOME\" \\\n--ro-bind \"$HOME\u002F.config\u002Fmyapp\" \"$HOME\u002F.config\u002Fmyapp\" \\\n--bind \"$HOME\u002FDocuments\" \"$HOME\u002FDocuments\"\n```\n\n### Step 5: Desktop integration (GUI apps)\n\nFor Wayland:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002F$WAYLAND_DISPLAY\" \"$XDG_RUNTIME_DIR\u002F$WAYLAND_DISPLAY\" \\\n--setenv WAYLAND_DISPLAY \"$WAYLAND_DISPLAY\" \\\n--setenv XDG_RUNTIME_DIR \"$XDG_RUNTIME_DIR\"\n```\n\nFor X11 (note: X11 socket forwarding is NOT a security boundary --\nany X11 client can keylog other clients. Use Xephyr or xpra for real\nisolation):\n```bash\n--ro-bind \u002Ftmp\u002F.X11-unix\u002FX0 \u002Ftmp\u002F.X11-unix\u002FX0 \\\n--ro-bind \"$HOME\u002F.Xauthority\" \"$HOME\u002F.Xauthority\" \\\n--setenv DISPLAY \"$DISPLAY\"\n```\n\nFor PulseAudio:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002Fpulse\" \"$XDG_RUNTIME_DIR\u002Fpulse\"\n```\n\nFor PipeWire:\n```bash\n--ro-bind \"$XDG_RUNTIME_DIR\u002Fpipewire-0\" \"$XDG_RUNTIME_DIR\u002Fpipewire-0\"\n```\n\nFor D-Bus (use xdg-dbus-proxy to filter, raw socket = sandbox escape):\n```bash\n# Filtered D-Bus (recommended)\nxdg-dbus-proxy \"$DBUS_SESSION_BUS_ADDRESS\" \u002Frun\u002Fuser\u002F$UID\u002Fbus-proxy \\\n  --filter --talk=org.freedesktop.Notifications &\nPROXY_PID=$!\nbwrap ... \\\n  --ro-bind \u002Frun\u002Fuser\u002F$UID\u002Fbus-proxy \u002Frun\u002Fuser\u002F$UID\u002Fbus \\\n  --setenv DBUS_SESSION_BUS_ADDRESS \"unix:path=\u002Frun\u002Fuser\u002F$UID\u002Fbus\" \\\n  \u002Fusr\u002Fbin\u002Fmyapp\nkill $PROXY_PID\n```\n\n### Step 6: GPU access (for OpenGL\u002FVulkan)\n\n```bash\n--dev-bind \u002Fdev\u002Fdri \u002Fdev\u002Fdri \\\n--ro-bind \u002Fsys\u002Fdev\u002Fchar \u002Fsys\u002Fdev\u002Fchar \\\n--ro-bind \u002Fsys\u002Fdevices\u002Fpci0000:00 \u002Fsys\u002Fdevices\u002Fpci0000:00\n```\n\n## Wrapper script pattern\n\nThe standard approach is a shell script that replaces or wraps the\nreal binary:\n\n```bash\n#!\u002Fbin\u002Fsh\n# ~\u002F.local\u002Fbin\u002Fmyapp-sandboxed\nexec bwrap \\\n  --ro-bind \u002Fusr \u002Fusr \\\n  --symlink usr\u002Fbin \u002Fbin \\\n  --symlink usr\u002Fsbin \u002Fsbin \\\n  --symlink usr\u002Flib \u002Flib \\\n  --symlink usr\u002Flib64 \u002Flib64 \\\n  --ro-bind \u002Fetc \u002Fetc \\\n  --proc \u002Fproc \\\n  --dev \u002Fdev \\\n  --tmpfs \u002Ftmp \\\n  --tmpfs \u002Fvar \\\n  --dir \u002Frun --dir \"\u002Frun\u002Fuser\u002F$(id -u)\" \\\n  --tmpfs \"$HOME\" \\\n  --unshare-all \\\n  --share-net \\\n  --new-session \\\n  --die-with-parent \\\n  --clearenv \\\n  --setenv HOME \"$HOME\" \\\n  --setenv USER \"$USER\" \\\n  --setenv PATH \"\u002Fusr\u002Fbin:\u002Fusr\u002Fsbin\" \\\n  --setenv TERM \"$TERM\" \\\n  \u002Fusr\u002Fbin\u002Fmyapp \"$@\"\n```\n\nFor detailed reference on specific desktop app sandboxing (Transmission,\nMuPDF, Steam, browsers), see `references\u002Fapp-examples.md`.\n\n## Gotchas\n\n- **Order matters.** `--tmpfs $HOME --ro-bind $HOME\u002F.config $HOME\u002F.config`\n  works. Reverse the order and `.config` is hidden by the tmpfs.\n- **--new-session breaks shell job control.** The `bg`, `fg`, and `Ctrl-Z`\n  won't work for processes launched with `--new-session`. This is a\n  trade-off for TIOCSTI protection. Always use it unless you have a\n  specific reason not to (and then use seccomp to block TIOCSTI instead).\n- **--unshare-net creates a namespace with only loopback.** The app gets\n  no network at all unless you `--share-net`.\n- **Merged-usr symlinks.** On Fedora\u002FArch\u002FDebian 12+, you need\n  `--symlink usr\u002Fbin \u002Fbin` etc. or programs that reference `\u002Fbin\u002Fsh` will\n  fail. Don't bind `\u002Fbin` directly -- it's already a symlink on the host.\n- **D-Bus = sandbox escape.** Binding the session bus socket directly\n  lets the sandbox call arbitrary D-Bus methods (including systemd's\n  `StartTransientUnit`). Use xdg-dbus-proxy with `--filter`.\n- **X11 = sandbox escape.** Any X11 client can read keystrokes from\n  any other. Use Wayland, Xephyr, or xpra for real GUI isolation.\n- **Files owned by root appear as nobody.** When `--unshare-user` is\n  active, UIDs\u002FGIDs outside your mapping show as `nobody:nogroup`.\n  This is cosmetic but may confuse apps that check ownership.\n- **sudo\u002Fsu won't work inside the sandbox.** The user namespace maps\n  only your UID\u002FGID. Privileged operations are not possible by design.\n- **Chromium\u002FFirefox nested sandboxes.** These browsers have their own\n  seccomp sandboxing. Inside bwrap, the nested sandbox may fail.\n  Pass `--disable-gpu-sandbox` or set environment variables like\n  `CHROME_FLAGS=\"--no-sandbox\"` for the inner layer. The outer bwrap\n  sandbox still provides confinement.\n- **strace is your best friend.** When an app fails silently, run it\n  under `strace -e trace=open,openat,stat,access -f` to see which\n  files it's looking for and can't find.\n- **`--die-with-parent` uses PDEATHSIG.** It fires SIGKILL when the\n  direct parent of bwrap dies. If bwrap is started from a subshell or\n  pipeline, the \"parent\" may not be what you expect.\n",{"name":5,"metadata":24,"description":31,"compatibility":32},{"author":25,"sources":26,"version":30},"user",[27,28,29],"https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap","https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FBubblewrap","https:\u002F\u002Fsloonz.github.io\u002Fposts\u002Fsandboxing-1\u002F","1.0","Use this skill when the user wants to sandbox, isolate, or restrict an application using bubblewrap (bwrap). Trigger on mentions of \"bwrap\", \"bubblewrap\", \"sandbox a process\", \"sandbox an application\", \"isolate an app\", \"unprivileged sandbox\", \"namespace isolation\", \"restrict filesystem access\", or when the user wants to run untrusted code, limit what a program can see on the filesystem, create a minimal chroot-like environment without root, or write wrapper scripts that confine applications. Also trigger when the user asks about Flatpak's sandboxing internals, since Flatpak uses bwrap under the hood. Do NOT trigger for Docker, Podman, systemd-nspawn, Firejail, or toolbox\u002Fdistrobox questions unless bwrap is explicitly mentioned.\n","Requires Linux with user namespace support (CONFIG_USER_NS=y). Package: bubblewrap (Fedora\u002FArch\u002FDebian) or bubblewrap-suid (hardened kernels). bwrap binary must be in PATH.\n","main","62177b0f31651c18aefb738bccb54168b8a5a982","plugins\u002Flinux\u002Fskills\u002Fbubblewrap","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins","https:\u002F\u002Fgithub.com\u002Fthimslugga","https:\u002F\u002Fadamkaminski.com","I am interested in Linux, macOS, Python, Golang, Rust and Networking.\r\n\r\nOpinions expressed are my own and may not be the views of my employer.","2026-11-11 02:10:30",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add thimslugga\u002Fagent-plugins --skill bubblewrap",{"tool":47,"command":48},"bunx","bunx skills add thimslugga\u002Fagent-plugins --skill bubblewrap",{"tool":50,"command":51},"pnpm","pnpm dlx skills add thimslugga\u002Fagent-plugins --skill bubblewrap","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Flinux\u002Fskills\u002Fbubblewrap\u002FSKILL.md",true,[],[56,63,70,77,83,90],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7BSDA3CNHHP07666X3H90CB","shell-script-expert","Use when the user asks \"review this script\", \"write a bash script\", \"fix my shell script\", \"make this script safer\", \"why does this script fail\", \"convert this to a script\", or working with .sh\u002F.bash files, sh\u002Fbash syntax, shellcheck, cronjobs, and bash one-liners.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fshell-script-expert\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7BSD6STC24Q13N4J8E0T93X","prose-synthesize","Turn unstructured notes into a structured, actionable plan. Use when given brain dumps, stream-of-consciousness, or scattered thoughts needing order.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fprose-synthesize\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7BSD16KRRWFMM3EN1WPK8G3","prose-distill","Condense verbose text to its essence.  Use when asked to condense, tighten, shorten, reduce verbosity, or omit needless words while preserving substance.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fprose-distill\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7BSCYJWSP5VJK3822XRNXR2","mindcraft","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fmindcraft\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7BSCRQ1GCDCTPNZ3WA3R0JE","learn","Tutor for intellectual understanding: teach how or why something works rather than complete a task or provide an evaluative verdict.\nTrigger for explicit learning requests (teach, explain, ELI5, walkthroughs, quizzes, flashcards, definitions); terse concept prompts; confusion signals; prerequisite or sequencing questions; and conceptual questions about mechanisms, causes, or dynamics.\nDo not trigger for task completion (coding, writing, calculation, or translation), factual or news lookup, personal troubleshooting, resource recommendations, or opinion and interpretive verdicts.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Flearn\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7BSCNAY02WX6BGDW06Y60D9","deployment-readiness","Use to check deployment readiness of a host.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fdeployment-readiness\u002FSKILL.md",[],[]]