AI Agent Hub
Back to skills
SafeShrink Document Optimizer icon

SafeShrink Document Optimizer

Office Efficiency Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please install @user_cf349896/safe-shrink according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

Before sending .docx, .pdf, .xlsx, or scanned files to an LLM, the source documents often contain XML styling, comments, macros, redundant formatting, and sensitive fields. This makes the payloads heavier, raises token consumption, and creates privacy risk when phone numbers, ID numbers, bank card numbers, or amounts are exposed during sharing or model calls.

How It Works

SafeShrink processes documents locally and focuses on three operations:

  • Document slimming: removes redundant formatting and hidden content, then outputs results as standard slimming, aggressive compression, deep clean, or .ssd files.
  • Secure sanitization: detects and replaces sensitive values in structured files such as JSON, XML, YAML, CSV, and HTML, usually modifying string values without breaking keys or data structure.
  • SSD conversion: converts Office and PDF files into an .ssd format that is closer to Markdown, preserving headings, lists, and tables while reducing LLM reading overhead.

For scans and images, it supports OCR to turn PDF, .jpg, .png, and .webp files into searchable text; for .zip, .rar, and .7z archives, it extracts the files and batch-processes the documents inside. The workflow emphasizes interception, explanation, and user confirmation before processing, rather than reading or converting original files without approval.

Boundaries

It is best for AI pre-processing, external sharing with sanitization, and batch document reduction, not for replacing online collaboration, complex layout editing, or workflows that require preserving interactive document behavior. Aggressive compression outputs plain text and loses styling; deep clean is a maximum-compression mode that requires confirmation; OCR depends on Tesseract. The main target platform is Windows 10/11, and all processing stays local.

Use Cases

  • Redact phone numbers, names, and amounts in a Word contract before sharing it externally.
  • OCR a 50-page scanned PDF into searchable text, then convert it to .ssd for AI Q&A.
  • Slim down a .docx file full of comments, revisions, and style attributes to cut model tokens.
  • Batch-process JSON, CSV, and YAML files to replace sensitive string values without changing keys.

Best For

  • Operations or sales staff who need to redact phone numbers, names, and amounts from quotes or contracts before sharing.
  • Engineers preparing scanned PDFs or images for RAG workflows who need OCR and .ssd conversion.
  • LLM app developers who want to reduce Office document token cost by removing XML styling and hidden content.
  • DevOps engineers sanitizing JSON, YAML, or CSV config and report data while preserving structure.