workstation-maintenance
Skill78 starsChanged 24 days agoApache-2.0View on GitHub
Inventory and tidy local Windows drives without breaking anything. Use when asked to clean up or organize drives or folders, plan file moves in small approval batches, move cluttered top-level folders of a drive behind junctions, or undo an earlier move. The folders to protect come from the user's config.json; nothing moves without an approved batch ID and a rollback manifest.
In this repository6 other files it gives its agents.
- lidang-perspectiveSkill
- communication-assistantSkill
- feishu-bridgeSkill
- literature-to-mangaSkill
- project-hardnessSkill
- wechat-video-channel-publishSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill to inventory Windows drives, propose file moves in small batches, move only the batches the user approves, and roll them …
- Very specific: line 38
Never move, delete, or open anything under a protected_roots entry, including when it is reached through a junction, symlink, relative …
- Distinctive: line 44
Never delete files. At most, write a list of deletion candidates for the user.
- Distinctive: line 46
No physical move without an inventory manifest, a move plan, a batch ID the user approved, and rollback data.
- Very specific: line 52
Check that config.json exists and protects what the user cares about.
- Very specific: line 55
Run scripts/New-WorkstationInventory.ps1.
- Very specific: line 60
Run scripts/New-MovePlan.ps1 on the inventory manifest.
- Distinctive: line 68
Stop before moving anything.
- Distinctive: line 71
Ask the user to approve batch IDs.
- Very specific: line 73
Only then run scripts/Invoke-ApprovedMoveBatch.ps1 -Approved (or Invoke-DriveRootOrganizationPlan.ps1 -Approved).
- Distinctive: line 76
Every applied batch writes an applied manifest with rollback fields.
- Very specific: line 79
Run scripts/Test-WorkstationMaintenance.ps1 after changing any script.
- Very specific: line 93
Run from this folder. powershell -NoProfile -ExecutionPolicy Bypass -File <script> ...
- Distinctive: line 107
After the user names a batch ID:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workstation Maintenance
Use this skill to inventory Windows drives, propose file moves in small batches, move
only the batches the user approves, and roll them back on request. A second mode moves
cluttered top-level folders of a drive into <drive>\_Organized\<Bucket>\_RootDirs\
and leaves a junction at the old path, so existing absolute paths keep working.
Setup: config.json
Everything specific to the machine lives in config.json next to this file. It is
git-ignored. If it is missing, copy config.example.json, ask the user which folders
must never move, and fill it in before any live run. A live inventory and the
drive-root scripts refuse to run without a config. -ConfigPath or
$env:WORKSTATION_MAINTENANCE_CONFIG can point at a config elsewhere. Paths may use
environment variables such as %USERPROFILE%.
| Key | Meaning |
protected_roots | Never scanned, never moved, never a destination. |
infrastructure_roots | Agent and tool installs. Recorded, never moved. |
project_roots | Active project folders. Recorded, never moved. |
inventory_roots | What to scan when -Roots is not given. |
organized_root | Where file-level moves go when -TargetRoot is not given. |
coursework_patterns | Extra filename regexes treated as coursework (kept in place). |
drive_root_rules | { "pattern", "category" } pairs: regexes on top-level folder names mapped to a drive-root bucket. |
Agent folders in the user profile (.codex, .claude, .openhands, opencode state)
are always treated as infrastructure.
Hard boundaries
- Never move, delete, or open anything under a
protected_rootsentry, including when it is reached through a junction, symlink, relative path, or different casing. - The Windows folder, Program Files, ProgramData, AppData, package caches, browser profiles, auth/session/db/log folders, git worktrees and reparse points are never moved.
infrastructure_rootsandproject_rootsstay in place unless the user asks for a migration of that one folder.- Never delete files. At most, write a list of deletion candidates for the user.
- Classify by path and filename only. Do not open documents.
- No physical move without an inventory manifest, a move plan, a batch ID the user approved, and rollback data.
Workflow
- Preflight
- Check that
config.jsonexists and protects what the user cares about. - Note uncommitted changes in any repos under the roots and leave them alone.
- Check that
- Inventory
- Run
scripts/New-WorkstationInventory.ps1. Keep its JSON/Markdown output in a local folder that is not committed; it contains private filenames. - Confirm there are zero entries under protected roots and zero move-eligible reparse points, directories, or git worktrees.
- Run
- Plan
- Run
scripts/New-MovePlan.ps1on the inventory manifest. - Executable batches include only low-risk files older than 30 days; newer ones are deferred so normal use is not disrupted.
- Batches are grouped by file type and capped at 100 items, so the user approves small, understandable units. Duplicate destinations get a stable item-ID suffix.
- For drive-root organization, run
scripts/New-DriveRootOrganizationPlan.ps1 -DriveRoot <drive>instead. It classifies the immediate children of the drive only.
- Run
- Approval gate
- Stop before moving anything.
scripts/New-ApprovalPacket.ps1writes a summary of batch IDs, counts and sizes, without filenames.scripts/Test-MovePlanBatches.ps1preflights every batch.- Ask the user to approve batch IDs. If they approve all currently passing low-risk batches at once, run them without asking again for each one, stopping at the first failure.
- Only then run
scripts/Invoke-ApprovedMoveBatch.ps1 -Approved(orInvoke-DriveRootOrganizationPlan.ps1 -Approved).
- Rollback and validation
- Every applied batch writes an applied manifest with rollback fields.
- Undo with
scripts/Invoke-RollbackBatch.ps1, orInvoke-DriveRootOrganizationPlan.ps1 -RollbackManifestPath <applied.json>. - Run
scripts/Test-WorkstationMaintenance.ps1after changing any script.
- Report
- Summarize what moved by bucket, count and size. Do not paste private filenames into chat logs, notes, or commits.
Categories
Protected-NoMove, AgentInfrastructure, ActiveProject, CourseworkArchive,
PersonalSensitive, MediaAssets, Downloads, TempCache, VendorSystemToolchain,
UnknownReview. Drive-root buckets: Downloads, Temp-Review, Media, Coursework,
Documents-Private, Games, Tools-Review.
Commands
Run from this folder. powershell -NoProfile -ExecutionPolicy Bypass -File <script> ...
works the same if the execution policy blocks .\scripts\....
$out = Join-Path $env:TEMP "workstation-maintenance"
.\scripts\New-WorkstationInventory.ps1 -OutputDir $out
.\scripts\New-MovePlan.ps1 -ManifestPath "<inventory.json>"
.\scripts\Test-MovePlanBatches.ps1 -MovePlanPath "<move-plan.json>"
.\scripts\New-ApprovalPacket.ps1 -MovePlanPath "<move-plan.json>"New-MovePlan.ps1 defaults to -MinimumAgeDays 30 -MaxItemsPerBatch 100. Lower the age
gate only when the user accepts the risk of moving recent files.
After the user names a batch ID:
.\scripts\Invoke-ApprovedMoveBatch.ps1 -MovePlanPath "<move-plan.json>" -BatchId "batch-downloads-archives-old" -PreflightOnly
.\scripts\Invoke-ApprovedMoveBatch.ps1 -MovePlanPath "<move-plan.json>" -BatchId "batch-downloads-archives-old" -Approved
.\scripts\Invoke-RollbackBatch.ps1 -AppliedManifestPath "<applied-batch.json>"Drive-root organization (<drive> is a drive root such as the one the user named):
.\scripts\New-DriveRootOrganizationPlan.ps1 -DriveRoot "<drive>" -OutputDir $out
.\scripts\Invoke-DriveRootOrganizationPlan.ps1 -PlanPath "<drive-root-plan.json>" -PreflightOnly
.\scripts\Invoke-DriveRootOrganizationPlan.ps1 -PlanPath "<drive-root-plan.json>" -Approved -SkipIds @("dr_0016")Folders that fail because of ACLs or open handles stay where they are: pass their IDs
through -SkipIds, report them, and retry after the lock is gone. Never leave a folder
half moved.
References
references/safety-boundaries.mdreferences/batch-move-workflow.mdreferences/manifest-schema.md
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.

