scientific-skills/Others/file-management/SKILL.md
Organize, back up, compress, split, and merge files/folders using rule-driven plans; use when you need safe previews, conflict handling, and verification before executing file operations.
npx skillsauth add aipoch/medical-research-skills file-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
references/rule-schema.md).scripts/).Get-ChildItem, Copy-Item, Move-Item, Compress-Archive, Get-FileHashscripts/split_file.pyscripts/merge_parts.py# Inputs (adjust to your case)
$Root = "D:\Inbox"
$Target = "D:\Organized"
$Include = @("*.pdf","*.docx")
$ExcludeDirs = @("node_modules",".git")
$WhatIf = $true # set to $false to execute
# Build a manifest (preview plan)
$files = Get-ChildItem -Path $Root -Recurse -File |
Where-Object {
($Include | ForEach-Object { $_ }) -contains $_.Extension -eq $false
}
# Practical include filter (simple example)
$files = Get-ChildItem -Path $Root -Recurse -File -Include $Include
# Exclude directories by path segment
$files = $files | Where-Object {
$p = $_.FullName
-not ($ExcludeDirs | Where-Object { $p -match [regex]::Escape("\$_\") })
}
$plan = foreach ($f in $files) {
# Example target structure: by extension
$ext = $f.Extension.TrimStart(".").ToLower()
$destDir = Join-Path $Target $ext
$destPath = Join-Path $destDir $f.Name
[pscustomobject]@{
Source = $f.FullName
Destination = $destPath
Action = "Copy" # start with Copy; switch to Move after verification
}
}
# Preview
$plan | Format-Table -AutoSize
# Execute (safe defaults: create dirs; do not overwrite unless you decide to)
foreach ($item in $plan) {
$destDir = Split-Path $item.Destination -Parent
if (-not (Test-Path $destDir)) { New-Item -ItemType Directory -Path $destDir | Out-Null }
if (Test-Path $item.Destination) {
# Default conflict strategy: rename
$base = [IO.Path]::GetFileNameWithoutExtension($item.Destination)
$ext = [IO.Path]::GetExtension($item.Destination)
$dir = Split-Path $item.Destination -Parent
$item.Destination = Join-Path $dir ("{0}_{1}{2}" -f $base, (Get-Date -Format "yyyyMMddHHmmss"), $ext)
}
if ($item.Action -eq "Copy") {
Copy-Item -LiteralPath $item.Source -Destination $item.Destination -WhatIf:$WhatIf
} else {
Move-Item -LiteralPath $item.Source -Destination $item.Destination -WhatIf:$WhatIf
}
}
$Source = "D:\Project"
$BackupRoot = "E:\Backups"
$Stamp = Get-Date -Format "yyyyMMdd_HHmmss"
$BackupDir = Join-Path $BackupRoot ("Project_{0}" -f $Stamp)
# Copy backup
Copy-Item -Path $Source -Destination $BackupDir -Recurse
# Create a hash manifest for verification
$manifestPath = Join-Path $BackupDir "hash-manifest.sha256.txt"
Get-ChildItem -Path $BackupDir -Recurse -File |
ForEach-Object {
$h = Get-FileHash -Algorithm SHA256 -LiteralPath $_.FullName
"{0} {1}" -f $h.Hash, ($_.FullName.Substring($BackupDir.Length + 1))
} | Set-Content -Encoding UTF8 $manifestPath
$SourceDir = "D:\Project"
$ZipPath = "E:\Archives\Project.zip"
Compress-Archive -Path (Join-Path $SourceDir "*") -DestinationPath $ZipPath -Force
# Split into 100MB parts (binary-safe)
python scripts/split_file.py --input "E:\ISO\big.iso" --part-size 100MB --output-dir "E:\ISO\parts"
# Merge parts back (binary-safe)
python scripts/merge_parts.py --input-dir "E:\ISO\parts" --output "E:\ISO\big.iso"
Note: CLI flags may vary depending on the scripts’ implementation. If the scripts do not expose flags, adapt the commands to match their actual parameters.
Rule schema and planning
rootPath> N MB)skip, rename, overwrite)references/rule-schema.md as the canonical format for describing these rules.Preview-first execution
(source, destination, action) before any write operation.-WhatIf (or an explicit “dry run” mode) to validate the plan.Conflict handling
Verification
SHA256 via Get-FileHash, stored as a manifest for later validation.Binary-safe splitting/merging
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.