Skip to content
Skills Library
Documents & office · Automation

document-classifier

/document-classifier

How to classify and organize documents (PDFs, DOCX, PPTX) into categories based on their content. Use this skill whenever the user mentions organizing, sorting, or classifying documents into subjects or folders, even if they don't explicitly ask for it.

Licence
MIT
Last repository change
02.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

How to classify and organize documents (PDFs, DOCX, PPTX) into categories based on their content. Use this skill whenever the user mentions organizing, sorting, or classifying documents into subjects or folders, even if they don't explicitly ask for it.

Original author description

How to classify and organize documents (PDFs, DOCX, PPTX) into categories based on their content. Use this skill whenever the user mentions organizing, sorting, or classifying documents into subjects or folders, even if they don't explicitly ask for it.

How it works

  1. Overview
  2. Workflow
  3. Example Classification Logic
  4. Troubleshooting
Original SKILL.md headings · 68 lines, 395 words
SKILL.md preview
---
name: document-classifier
description: How to classify and organize documents (PDFs, DOCX, PPTX) into categories based on their content. Use this skill whenever the user mentions organizing, sorting, or classifying documents into subjects or folders, even if they don't explicitly ask for it.
---
# Document Classifier

A guide for classifying and organizing a large number of documents (PDFs, DOCX, PPTX) into specific folders based on their subject matter.

## Overview

When asked to organize files into categories, use text extraction libraries and an LLM classification script to efficiently process and move the files.

## Workflow

1. **Create Target Folders**: Ensure the destination folders exist.
2. **Text Extraction**: Read a small snippet of text from each document (e.g., first few pages or paragraphs).
   - **PDF**: Use `pdftotext` (via `subprocess`) or `pdfplumber`/`pypdf` to extract the first page.
   - **DOCX**: Use `pandoc` or extract the raw XML and read a bit of it, or use `python-docx` if available, or just grep for text.
   - **PPTX**: Extract text using `python -m markitdown` or by unpacking.
3. **Classification**: 
   - Write a python script to process all files.
   - For each file, extract text (first page is usually enough for academic papers).
   - Use simple keyword matching or regex if categories are distinct (e.g., "LLM", "quantum", "black hole", "DNA", "music").
   - Move the file to the corresponding folder based on the match.
   - If a file doesn't match the first 4 specific categories, move it to the 5th default category.
4. **Execution**: Run the script and verify that all files have been moved and no files are left out.

## Example Classification Logic

```python
import os
import shutil
import subprocess

def extract_text(file_path):
    if file_path.endswith('.pdf'):
        result = subprocess.run(['pdftotext', '-l', '2', file_path, '-'], capture_output=True, text=True)
        return result.stdout.lower()
    elif file_path.endswith('.docx'):
        result = subprocess.run(['pandoc', file_path, '-t', 'plain'], capture_output=True, text=True)
        return result.stdout.lower()
    elif file_path.endswith('.pptx'):
        result = subprocess.run(['python', '-m', 'markitdown', file_path], capture_output=True, text=True)
        return result.stdout.lower()
    return ""

def classify_and_move(source_dir, dest_dirs):
    for root, dirs, files in os.walk(source_dir):
        for file in files:
            file_path = os.path.join(root, file)
            text = extract_text(file_path)
            
            # Simple keyword matching
            if 'llm' in text or 'language model' in text or 'transformer' in text:
                target = dest_dirs['LLM']
            elif 'quantum' in text or 'trapped ion' in text or 'qubit' in text:
                target = dest_dirs['trapped_ion_and_qc']
            elif 'black hole' in text or 'schwarzschild' in text or 'hawking' in text:
                target = dest_dirs['black_hole']
            elif 'dna' in text or 'gene' in text or 'genome' in text or 'chromosome' in text:
                target = dest_dirs['DNA']
            else:
                target = dest_dirs['music_history']
                
            shutil.move(file_path, os.path.join(target, file))
```

## Troubleshooting

- If `pdftotext` is missing, install it via `sudo apt-get install poppler-utils`.
- Only process files with known extensions to avoid errors.

Versions

RepositoryScoreLicence
This page · cxcscmu/SkillLearnBench100MIT
cxcscmu/SkillLearnBench90MIT

Database snapshot: 13.11.2026 · package version 93671e3fddf6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100document-organizer
    Organizes mixed document files (PDF, PPTX, DOCX) into subject-based folders by analyzing content. Use this skill when sorting, categorizing, or organizing documents into topic folders.
  • 90file-classifier
    Use this skill to classify PDF, PPTX, or DOCX files into subject categories: LLM, trapped_ion_and_qc, black_hole, DNA, or music_history. Analyze filenames and available content to determine the correct category.
  • 95document-processing
    Create, edit, and analyze office documents (PDF, DOCX, PPTX, XLSX). Use when working with PDFs, Word documents, PowerPoint presentations, or Excel spreadsheets. Covers text extraction, form filling, document creation, and data analysis.
  • 95Documents
    Read, write, convert, and analyze documents — routes to PDF, DOCX, XLSX, PPTX sub-skills for creation, editing, extraction, and format conversion. USE WHEN document, process file, create document, convert format, extract text, PDF, DOCX, XLSX, PPTX, Word, Excel, spreadsheet,…
  • 95aurochs-office
    Inspect, build, and verify Office documents (PPTX, DOCX, XLSX) using the aurochs CLI. Use this skill when: (1) Inspecting existing Office files, (2) Building PPTX/DOCX/XLSX from JSON spec, (3) Previewing slide/document/sheet content in terminal, (4) Extracting text or data, (5)…
  • 95Documents
    Read, write, convert, and analyze documents — routes to PDF, DOCX, XLSX, PPTX sub-skills for creation, editing, extraction, and format conversion. USE WHEN document, process file, create document, convert format, extract text, PDF, DOCX, XLSX, PPTX, Word, Excel, spreadsheet,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.