environment-cleanup SKILL.md skillA
environment-cleanup from joe-qai/qa-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add joe-qai/qa-skills/environment-cleanup@v1.1.0Pins v1.1.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- joe-qai/qa-skills
- Path
environment-cleanup/SKILL.md- Versions recorded
- 1
- Latest version
- v1.1.0, committed Sep 15, 2026
- Size
- 13,705 bytes
- Repository stars
- 27
- License
- none declared
系统环境整理与磁盘清理。预检磁盘空间→备份环境变量→扫描软件→评估风险→逐项授权迁移→验证→决定是否删除备份→输出 HTML 报告。触发词:整理环境、清理环境、迁移环境、环境整理、磁盘清理、软件迁移。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 环境整理与磁盘清理
## Overview
对当前 Windows 系统进行环境整理。**预检磁盘空间 → 备份环境变量 → 扫描软件 → 评估风险 → 逐项授权迁移 → 验证 → 决定是否删除备份 → 输出 HTML 报告。**
**核心原则:**
1. **预检优先**:磁盘空间检查在一切操作之前,空间不足则提前中止,不进入后续流程
2. **逐项授权**:所有迁移/清理操作必须逐项获取用户授权,不得批量执行
3. **备份安全**:迁移成功且验证无误后,由用户决定是否删除备份;备份失败时由用户决定是否跳过备份继续
## When to Use
- 用户说"整理环境"、"清理环境"、"迁移环境"
- 用户说"清理磁盘"、"磁盘整理"、"C盘清理"
- 用户说"软件迁移"、"迁移软件"、"把XX迁移到D盘"
- 用户想了解系统安装了哪些软件、哪些可以清理/迁移
## 执行流程(7 阶段)
### 阶段 0:磁盘空间预检(最先执行,不可跳过)
**在任何扫描、备份、迁移之前,先检查磁盘空间。空间不足则提前中止,不进入后续阶段。**
1. 询问用户目标盘符(默认 D:)
2. 获取目标盘总容量、已用空间、剩余空间
3. 快速估算 C 盘可迁移软件总大小(仅扫描路径和 `EstimatedSize`,不深入扫描)
4. 计算所需空间 = 软件总大小 × 1.1(10% 安全余量)
**判断逻辑:**
```
如果 目标盘剩余空间 >= 所需空间:
→ 空间充足,继续阶段 1
→ 输出: "D 盘剩余 XX GB,待迁移 XX GB,空间充足 ✅"
否则:
→ 空间不足,输出差额,询问用户:
1. 按空间大小排序,选择部分迁移
2. 迁移到其他盘符
3. 清理不用的全局包(npm/pip 等)
4. 保持现状,中止流程
→ **不得进入阶段 1**
```
**输出格式:**
```
=== 磁盘空间预检 ===
目标盘: D:
D 盘总容量: XX GB
D 盘剩余: XX GB
C 盘可迁移估算: XX GB
所需空间 (含余量): XX GB
判定: ✅ 空间充足 / ❌ 空间不足 (差额 XX GB)
```
### 阶段 1:环境变量备份
**在任何迁移操作之前,先备份当前环境变量。**
1. 创建备份目录:`C:\Users\<user>\env_backup_<timestamp>\`
2. 备份内容:
- `system_path.txt` — 系统 PATH
- `user_path.txt` — 用户 PATH
- `system_vars.json` — 所有系统环境变量
…Read the whole file at its exact version.
How to install
mdr add joe-qai/qa-skills/environment-cleanup@sha256:85c60fb1d11c6604The line at the top of this page pins the label v1.1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_hbegivua7zgf3fdi)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Sep 15, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (13705 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
joe-qai/qa-skills · 27 stars · license none declared · pushed 2026-09-29 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_hbegivua7zgf3fdi GET https://markdownregistry.com/api/v1/resolve?ref=joe-qai/qa-skills/environment-cleanup GET https://markdownregistry.com/api/v1/blob/85c60fb1d11c6604e96cb0ff08d9ee766aaffa18c3994166aaa50a77aa3065f7
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.