Communitygithub.com

Rylai PDF

使用本地開源工具建立、檢查、提取、合併、分割、旋轉和渲染 PDF 檔案,包括結構與視覺驗證。

Rylai PDF 是什麼?

Rylai PDF 技能讓開發者與 AI 代理能完全透過本地開源工具處理 PDF 檔案,無需依賴雲端服務。支援的操作包含 PDF 資訊檢視、頁面提取、合併、分割、旋轉與渲染,並可進行結構與視覺驗證。此技能適用於 Claude Code、Codex 與 Hermes 等 AI 代理平台,會自動使用 pypdf、pdfplumber、pypdfium2 或 Poppler 等工具,必要時也會使用 LibreOffice 進行 Office 轉 PDF。技能內建自動化腳本 `scripts/rylai_pdf.py`,可執行資訊查詢、提取、合併、分割、旋轉與渲染等功能。品質把關包括確認輸出檔案無需修復、頁面順序與數量正確、文字提取不為空、渲染沒有異常剪裁,並確保不將來源檔案、暫存檔案或密碼一併打包。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Rylaispirit/rylai-codex-hermes-skills/tree/HEAD/skills/pdf

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Rylai PDF 是做什麼的?

由 Rylai 原創的 Codex-Hermes-Claude 技能。

使用本地檔案與確定性工具。除非使用者明確要求原地取代,否則請保留原始文件。絕不憑空發明密碼、嵌入憑證,或未經直接核准將文件上傳至外部服務。

執行環境

使用 Python 3,搭配:

  • pypdf:進行頁面層級的檢查與編輯。
  • pdfplumber:需要高品質文字提取時使用。
  • pypdfium2 或 Poppler 的 pdftoppm:用於選擇性頁面渲染。
  • LibreOffice:僅在將 Office 來源檔案轉換為 PDF 時使用。

安裝前先探測:

python -c "import pypdf; print(pypdf.__version__)"
python -c "import pdfplumber; print(pdfplumber.__version__)"

只安裝缺少的 Python 套件:

python -m pip install pypdf pdfplumber pypdfium2

腳本 scripts/rylai_pdf.py 的路徑相對於此技能目錄。

工作流程

  1. 確認輸入路徑、要求的操作、輸出路徑與頁面範圍。
  2. 在編輯不熟悉或加密的 PDF 之前,先執行 info 檢查。
  3. 寫入新的輸出路徑。僅在打算取代時才使用 --force。
  4. 重新開啟結果,檢查頁數、中繼資料,並在適用情況下檢查提取的文字。
  5. 對於版面敏感的作業,渲染代表性頁面並檢視 PNG 輸出。
  6. 當 Poppler、LibreOffice、OCR 或其他選擇性相依套件不存在時,回報跳過的檢查。

對於沒有實用文字層的掃描頁面,使用可用的本地 OCR 引擎。保留原始 PDF,並說明使用了哪個 OCR 工具與語言模型。

內建 CLI

檢查:

python scripts/rylai_pdf.py info input.pdf

提取選定頁面:

python scripts/rylai_pdf.py extract input.pdf output.txt --pages 1-3,7

合併:

python scripts/rylai_pdf.py merge output.pdf first.pdf second.pdf

將選定頁面分割成個別檔案:

python scripts/rylai_pdf.py split input.pdf output-pages --pages 2-5

將選定頁面順時針旋轉:

python scripts/rylai_pdf.py rotate input.pdf rotated.pdf 90 --pages 1,3

使用本地 PDFium 或 Poppler 渲染:

python scripts/rylai_pdf.py render input.pdf rendered-pages --dpi 144

僅在使用者為該文件提供密碼時,才加上 --password。

品質標準

  • 輸出檔案開啟時無修復警告。
  • 頁面順序、數量、旋轉角度與選定範圍符合要求。
  • 提取的文字不會無聲地為空;掃描頁面會被識別。
  • 渲染的頁面無意料之外的裁剪或空白輸出。
  • 原始檔案、暫存檔案、密碼或使用者路徑不與技能打包在一起。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

Rylaispirit/rylai-codex-hermes-skills

Plan, build, render, and verify academic presentation decks with citations, accessible visuals, clear argument flow, speaker-ready pacing, and visual QA.

Rylaispirit/rylai-codex-hermes-skills

Create publication-quality chart images from supplied data using an available plotting library, with explicit scales, labels, and visual QA.

Rylaispirit/rylai-codex-hermes-skills

Plan, draft, and review persuasive copy for landing pages, product pages, ads, email, headlines, offers, calls to action, positioning, and message variants.

Rylaispirit/rylai-codex-hermes-skills

Plan, draft, revise, and audit creative or long-form writing with a portable core workflow that does not depend on missing legacy templates.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, edit, and verify Word DOCX files with python-docx, including Markdown conversion, text replacement, metadata inspection, and optional PDF render.

Rylaispirit/rylai-codex-hermes-skills

Create or optimize marketing images, social graphics, product mockups, banners, cover art, listing visuals, brand assets, image prompts, WebP files, and OG images.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, extract, edit, render, and verify PowerPoint presentations with python-pptx and optional LibreOffice.

Rylaispirit/rylai-codex-hermes-skills

Create editable PowerPoint decks from a local JSON specification using Rylai's visual system, python-pptx, deterministic slide types, and optional rendering.

Rylaispirit/rylai-codex-hermes-skills

Perform an evidence-led SEO audit using accessible pages, source code, crawl data, and current search documentation without assuming missing plugins.

Rylaispirit/rylai-codex-hermes-skills

Extract a practical design system from screenshots or mockups and produce implementation-ready UI specifications using vision and repository context.

Rylaispirit/rylai-codex-hermes-skills

Plan and produce video with available AI tools or programmatic frameworks. Use for video prompts, avatars, explainers, demos, templates, pipelines, and generation.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, edit, and verify Excel XLSX workbooks with openpyxl, including CSV import, formulas, styling, error checks, and optional LibreOffice rendering.

相關技能