teardown
ما الذي تفعله
تقدّم هذه المهارة قائمة مراجعة وسكربتات لإيقاف كل أجهزة smolvm التي بدأتها جلسة وتنظيف ملفاتها، ثم التحقق من أن الحاسوب نظيف. وهي لأي شخص استخدم smolvm على حاسوبه الخاص أو المشترك.
متى تستخدمها
- ✓عندما تنتهي من جلسة smolvm وتريد ألا يبقى شيء يعمل بعدها.
- ✓عندما يبدو أن جهازًا نجا من Ctrl-C أو من تعطل.
- ✓عندما تختفي مساحة القرص بعد استخدامك لـ smolvm.
رابط المهارة
https://github.com/smol-machines/smolvm/blob/main/docs/teardown/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“انتهيت من اختبارات smolvm. أوقف كل جهاز بدأته ونظّف ما تركته وراءه.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يسرد سكربت الفحص المسبق ما تركه smolvm على الحاسوب. ثم يوقف سكربت التنظيف الأجهزة التي أنشأتها الجلسة، ويحذف حالتها، ويتحقق من النتيجة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Leaving nothing running and nothing behind
Verified on smolvm v1.29.0 on macOS arm64, 2026-10-15, and on v1.18.2 on Linux aarch64, 2026-09-24. This packet exists on its own because the obvious cleanup steps fail here: the obvious assertion gives a false failure, the obvious reaper matches the wrong process or nothing at all, and killing a wrapper around a run does not stop its machine. Anything that starts machines needs this more than it needs any single feature. The Linux runs used the scripts of their date; this version's preflight and cleanup scripts ran on Linux aarch64 on v1.22.2 on 2026-10-03.
The cleanup scripts of credentials, dev-env, docker-in-machine, gpu-cuda and install are this
packet's scripts/cleanup.sh with the PACKET= line changed; branch-and-checkpoint, local-api, pack
and throwaway-machine build on it and add flags of their own.
Procedure
The commands below are relative to this packet's directory; its scripts write nothing to the working directory, so running them from there is safe.
1. See what is there. Read-only: deletes nothing, starts no VM.
scripts/preflight.sh
It reports each state directory with its size, whether an --oci-cache bake cache exists,
whether the launcher symlink and the PATH block are present, and whether state can be relocated
on this platform.
2. Delete the machines your scripts created, and report the rest.
scripts/cleanup.sh # report leftover VM processes
scripts/cleanup.sh --reap # and kill them
--reap kills every VM process under this HOME, a running machine you meant to keep included, so
run plain cleanup.sh first to read the list, and reap only when nothing there should keep running.
cleanup.sh waits up to 20 seconds, polling the machine list, and prints waiting=up to 20s
first: an ephemeral machine's entry retires after its run returns.
Only machines recorded in the state file are deleted, so a machine you or another session created
by hand is never deleted. A script records what it creates with
scripts/cleanup.sh --record <name>, and names must carry the smolskill- prefix or the delete
is skipped. --purge removes the state file once the list is empty.
When the user asks you to clean up machines they made themselves, which is what "clean up
after me" usually means, nothing is recorded and the script reports them as machines=remaining
and leaves them. That is the guard working, not the end of the job. List them, confirm they are
the user's and not another session's, and delete each by name. smolvm machine list --json gives
each machine's created_at, in Unix seconds, and its image: one created before the user's session
began, or under a name they do not recognise, is not theirs to delete without asking.
machine stop on a machine that is already stopped prints Machine '<name>' is not running and
exits 0, so the stop line is safe either way:
smolvm machine list
smolvm machine stop --name <NAME>
smolvm machine delete --name <NAME> --force --cascade
Then run scripts/cleanup.sh again for the process check, and step 3.
The state file lives under ${XDG_STATE_HOME:-$HOME/.local/state}/smolvm-skills/, outside
~/.smolvm and outside smolvm's own caches. Nothing here edits smolvm configuration.
3. Prove it.
scripts/verify-clean.sh
HOME=/tmp/sk SMOLVM=/tmp/sk/.local/bin/smolvm scripts/verify-clean.sh --protected "$HOME/.smolvm" \
--protected "$HOME/.local/share/smolvm" --protected "$HOME/.cache/smolvm" # typed in your real shell
Typed in your real shell, $HOME expands to the real profile before HOME=/tmp/sk applies, so the
checks audit the scratch profile and the three --protected directories are the real
installation's binary, data and cache. On macOS the last two are
~/Library/Application Support/smolvm and ~/Library/Caches/smolvm; a --protected directory
that does not exist fails rather than passing. SMOLVM= points the scan at the scratch install's
binary; on Linux, run it with XDG_DATA_HOME and XDG_CACHE_HOME unset, as the install was.
Anything the real installation wrote today counts, and a running real machine writes to its cache
directory. Stop the real machines first, and pass --since with the time the test began, such as
--since "2026-10-03 14:00".
Every check here is scoped to the HOME it runs under, and the audited_home= line says
which profile the result describes. Run it under a
الأسئلة الشائعة
هل ستحذف أشياء ما زلت أحتاجها؟
يستهدف التنظيف الأجهزة التي أنشأتها الجلسة. اقرأ قائمة الفحص المسبق أولًا لترى ما سيُحذف.
هل إغلاق الطرفية يوقف الجهاز؟
ليس دائمًا. تقول المهارة إن إنهاء الغلاف حول تشغيل لا يوقف جهازه، لذلك تستخدم سكربت التنظيف.
هل تُستخدم على حاسوب مشترك؟
نعم. المهارة مكتوبة لتسليم حاسوب مستعار أو مشترك دون أن يبقى فيه أي أثر.
التفاصيل
الوصف الأصلي من المؤلف
Stops every smolvm machine a session started, removes smolvm's state, and proves the host is clean. Use after any smolvm session; when a machine seems to have survived a Ctrl-C or a crash; when disk space has disappeared; when uninstalling smolvm; when tearing down the Kubernetes runtime from a node; or when a borrowed or shared host has to be handed back with nothing left behind. Also use it as the cleanup step for other smolvm work, because the obvious assertions here give false results. Do not use it to delete machines another session created: it removes only what a script recorded under it
repo: smol-machines/smolvm
الشعبية
- نجوم GitHub
- 6.9k
- الترتيب
- #13723
- الترخيص
- Apache-2.0
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
branch-and-checkpoint
6.9kيساعد وكيلك على حفظ جهاز smolvm افتراضي قيد التشغيل كنقاط حفظ، واستعادته لاحقًا، وإيقافه مؤقتًا واستئنافه، وتفريعه إلى نسخ.
coding-agent
6.9kيساعد وكيلك على تشغيل وكيل برمجة مثل Claude Code داخل جهاز smolvm افتراضي آمن مع ربط مجلد مشروعك.
credentials
6.9kيتيح لوكيلك استدعاء واجهة برمجية بمفتاحك دون أن يدخل المفتاح نفسه إلى جهازه الافتراضي، فلا يستطيع الكود غير الموثوق قراءته.
dev-env
6.9kيعلّم وكيلك إبقاء جهاز تطوير smolvm مع أدواته مثبتة، ليعود بسرعة ويحتفظ بالحزم بين الجلسات.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.