Scan Source Directory and Plan Organization
Use this skill at the start to scan the source directory, identify all files, create a processing plan, and establish the destination folder structure.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- Scan Source Directory and Plan Organization
- description
- Use this skill at the start to scan the source directory, identify all files, create a processing plan, and establish the destination folder structure.
03 SKILL.md 正文
When to use this skill
- At the beginning of the file organization task
- Before starting to extract content or classify files
- To set up the systematic workflow
Source directory scanning
Identify all supported files
import os
from pathlib import Path
from collections import defaultdict
def scan_source_directory(source_path):
supported_extensions = {'.pdf', '.pptx', '.docx'}
files_by_type = defaultdict(list)
total_count = 0
for root, dirs, files in os.walk(source_path):
for file in files:
ext = Path(file).suffix.lower()
if ext in supported_extensions:
files_by_type[ext].append({
'name': file,
'full_path': os.path.join(root, file)
})
total_count += 1
return files_by_type, total_count
Report on file distribution
Note:
- Total PDF files
- Total PPTX files
- Total DOCX files
- Any files with unusual naming patterns (e.g., arXiv IDs)
Create destination folder structure
Setup 5 required folders
def setup_destination_folders(base_destination_path):
folders = [
'LLM',
'trapped_ion_and_qc',
'black_hole',
'DNA',
'music_history'
]
for folder in folders:
folder_path = os.path.join(base_destination_path, folder)
os.makedirs(folder_path, exist_ok=True)
return {folder: os.path.join(base_destination_path, folder)
for folder in folders}
Verify folder structure
Confirm all 5 folders exist and are empty before starting
Create processing plan
Document the workflow
- Scan source directory → obtain file list and count
- For each file: extract content (PDF, PPTX, or DOCX)
- For each file: classify subject based on content
- For each file: move to correct destination folder
- After all files moved: verify count matches original
Establish extraction priority
- Start with PDFs (most common for research papers)
- Then PPTX files (presentations)
- Finally DOCX files (documents)
Track file groups
Organize processing by file type to batch similar extraction and classification tasks
Logging setup
Create a master log file to record:
- Scan timestamp
- Total files found (by type)
- Files requiring manual review
- Processing start time
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.