sdme
Operational guidance for using sdme and troubleshooting sdme-managed systemd-nspawn containers. Use when an AI agent needs to help with sdme commands…
от fiorix★ 51 звезда на GitHub
Установить sdme в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
sdme
Operating Model
Treat sdme as a rootful systemd-nspawn container manager. Containers use either an overlayfs upper layer or a btrfs subvolume snapshot as their writable root, boot a full systemd as PID 1, and drive host systemd/machined over D-Bus.
Prefer the current binary as source of truth. Run sdme --help, sdme <command> --help, and sdme dump-skill when behavior may have changed. Prefer repository docs and source over memory when editing sdme.
Assume most operational commands require root. Use sudo sdme ... for live operations unless the command is explicitly rootless, such as sdme dump-skill, sdme config completions, and sdme config apparmor-profile.
First Diagnostic Pass
Collect facts before changing state:
sdme --version
sudo sdme config get
sudo sdme ps
machinectl list --no-pager
systemctl is-active systemd-machined.service
systemctl status systemd-machined.service --no-pager
For a specific container, inspect both the host unit and the guest:
sudo systemctl status [email protected] --no-pager
sudo journalctl -u [email protected] -b --no-pager
machinectl status NAME --no-pager
sudo sdme logs NAME -b --no-pager
sudo sdme exec NAME -- systemctl --failed --no-pager
sudo sdme exec NAME -- journalctl -b --no-pager
If a command times out or hangs, capture the exact command, stderr, timeout, container name, sdme ps state, the host unit journal, and the guest journal tail.
Lifecycle Commands
Use these commands for normal operation:
sudo sdme new --name NAME -r FS
sudo sdme create --name NAME -r FS
sudo sdme start NAME
sudo sdme join NAME
sudo sdme exec NAME -- COMMAND...
sudo sdme logs NAME
sudo sdme stop NAME
sudo sdme restart NAME
sudo sdme rm NAME
Use sdme ps as the high-level status view. It summarizes container state, health, rootfs, network, resource limits, OCI app metadata, and pod relationships.
For stopped containers, inspect state files and overlay directories under the configured datadir, normally /var/lib/sdme. Do not edit state files manually unless the user is recovering from corruption and understands the risk.
Stop And Restart Troubleshooting
Know the three stop paths:
- Default graceful stop sends
KillMachine(name, "leader", SIGRTMIN+3)through machined. For guest systemd,SIGRTMIN+3startshalt.target; this matchessystemd-nspawn --bootorderly shutdown behavior and should make nspawn exit cleanly. sdme stop --term NAMEcallsTerminateMachine. Treat it as an escalation path through machined/nspawn when the direct guest-systemd halt path does not complete.sdme stop --kill NAMEsends SIGKILL to all machine processes throughKillMachine. Use it only after collecting logs or when the user explicitly wants force.
When default stop is stuck, check whether the guest reaches halt.target, poweroff.target, or reboot.target. A healthy default stop should show the halt path and then the host [email protected] should deactivate. If logs show reboot activity, investigate signal mapping, nspawn behavior, and guest target aliases before changing rootfs state.
Useful references from systemd behavior:
SIGRTMIN+3to systemd means halt (halt.target).SIGRTMIN+4means poweroff (poweroff.target).SIGRTMIN+5means reboot (reboot.target).systemd-nspawn --bootdefaults its orderly shutdown signal toSIGRTMIN+3when nspawn receives SIGTERM.
Start And Boot Troubleshooting
For start failures, inspect the host unit first:
sudo systemctl status [email protected] --no-pager
sudo journalctl -u [email protected] -b --no-pager
Then check whether machined registered the machine:
machinectl list --no-pager
machinectl status NAME --no-pager
Common causes include missing systemd/dbus in the rootfs, bad /etc/os-release, masked or broken essential services, networking setup failures, overlayfs permission problems, restrictive umask during create, missing bind mount sources, and unsupported user namespace or idmapped mount behavior on the host filesystem.
For guest boot failures, use sdme logs NAME -b --no-pager and, when the guest is reachable, sdme exec NAME -- systemctl --failed --no-pager.
Exec, Join, And Logs
Use sdme join for interactive login-like sessions. It prefers machinectl shell and may fall back to namespace entry when needed.
Use sdme exec for non-interactive commands and scripts. It uses systemd-run --machine=NAME --pipe --wait --quiet --collect, so stdout/stderr are suitable for shell pipelines.
Use sdme logs for container journals. The default sdme logs NAME reads the host unit journal (journalctl -u [email protected]). The --oci form reads an OCI app service journal from inside the container and detects the NixOS journalctl path when possible.
Rootfs And OCI Workflows
Use sdme fs import SOURCE for root filesystems from OCI registries, tarballs, directories, and disk images. The name is inferred from the
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sdme?
Operational guidance for using sdme and troubleshooting sdme-managed systemd-nspawn containers. Use when an AI agent needs to help with sdme commands, container lifecycle, rootfs import/build/export, OCI or Kubernetes pod workloads, networking, stop/start failures, systemd-nspawn, machined, machinectl, journalctl, systemctl diagnostics, or repository changes to sdme itself.
Как установить скилл sdme?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sdme запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…