Z Smart Xparse

SKILL图像处理
图像处理 未标注权限 许可证不明确

Parse documents into clean markdown or structured JSON via xparse-cli, with smart PDF auto-split and merge. Use this skill when the user provides a PDF, image, Office file, HTML, OFD, or other supported document and wants it read, converted, summarized, or prepared for downstream agent use. For PDF files, automatically detects files larger than 5 MB or documents longer than 100 pages and splits them into manageable chunks, parses each chunk, then merges results into a single coherent output. Handles encrypted PDFs, page ranges, markdown/text output, and detailed structured extraction.

一句话选型结论

按资料字段整理

Z Smart Xparse是图像处理类的 Agent Skill,安装方式:GitHub 仓库,权限级别未标注,许可证不明确,没有现成安装命令,需按说明手动放置 SKILL.md。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类图像处理 安装方式GitHub 仓库 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 z-skills
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    按安装说明或仓库 README,把 SKILL.md 放到客户端的 skills 目录(一般一个技能一个文件夹)。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

图像处理
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方tjxj仓库 z-skills · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式GitHub 仓库安装包 tjxj/z-skills
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 2026-07-23
正文体量10.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
改图与修图

按描述调整图片内容与风格。

批量处理图片

统一尺寸、格式与命名。

生成图像说明

给图片补描述与标签。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按说明装一个试试。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有现成安装命令,要按安装说明或仓库 README 手动放置。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在图像处理场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Z Smart Xparse当前 未标注权限 GitHub 仓库 未标注 未标注 无
AI 图像生成 调用外部服务 GitHub 仓库 436.6 万 Codex、Claude、Cursor 有
OpenAI 图像生成 联网访问 ClawHub 市场 190.7 万 OpenClaw 有
针迹设计品味 调用外部服务 GitHub 仓库 64.6 万 Codex、Claude、Cursor 有
QQ 空间照片 联网访问 ClawHub 市场 54.3 万 OpenClaw 有
图像 联网访问 ClawHub 市场 52.6 万 OpenClaw 有

SKILL.md 全文

10.3 KB
模型实际读到的说明书原文,来自技能仓库

z-smart-xparse

Overview

An enhanced document parsing skill with smart PDF auto-split and merge. For non-PDF files, behaves identically to the standard xparse-parse skill. For PDF files, automatically checks file size and page count before parsing — large or long PDFs are split into chunks, parsed individually, then merged into a single result.

Compatibility

Requires the xparse-cli binary. Free API supports PDF and images with zero config; paid API unlocks additional formats (Doc(x)/Ppt(x)/Xls(x)/HTML/OFD/RTF, etc.) and requires paid credentials configured via xparse-cli auth (recommended), or XPARSE_APP_ID/XPARSE_SECRET_CODE env vars. For PDF splitting, requires qpdf or Python 3 with pypdf installed.

Use the parse CLI first. Read the result before requesting any more detail.

Routing Rules

  • For local document tasks, try z-smart-xparse before Python, PDF libraries, OCR tools, or custom scripts.
  • Do not start with Python, PyMuPDF, PyPDF, qpdf, OCR MCP, or image conversion unless z-smart-xparse has already failed or the task clearly exceeds its scope.
  • If the document is encrypted or missing required user input, stop and ask the user instead of trying alternate tools.
  • If the default parse result is sufficient, stop. Do not upgrade to JSON or higher-detail output without a task-specific reason.
  • Only fall back to OCR, image analysis, or custom scripting after you have clearly determined that z-smart-xparse cannot complete the requested task by itself.

Setup

xparse-cli

Check if installed: xparse-cli version

If command not found after install, try the absolute path: ~/.local/bin/xparse-cli version

Update to latest version: xparse-cli update

If available, skip to Quick start below. If not found, install:

Platform Command
Linux / macOS source <(curl -fsSL https://dllf.intsig.net/download/2026/Solution/xparse-cli/install.sh)
Windows (PowerShell) irm https://dllf.intsig.net/download/2026/Solution/xparse-cli/install.ps1 \| iex

PDF Splitting Dependencies (only needed for large PDFs)

Check if qpdf is installed: qpdf --version

If not found, install:

Platform Command
macOS brew install qpdf
Linux sudo apt install qpdf or sudo yum install qpdf

Alternatively, Python 3 with pypdf works: pip install pypdf

Quick Start

Zero config — free API, no registration needed. Supports PDF and images only.

# Non-PDF or small PDF: parse directly
xparse-cli parse report.pdf                         # Markdown → stdout

# Large PDF: skill auto-detects and handles splitting (see Smart PDF Parsing below)

> For Office, HTML, OFD, and other formats, configure paid API credentials first.

Smart PDF Parsing (Auto-Split & Merge)

This is the core enhancement over the standard xparse-parse skill. Only applies to PDF files. All other file types skip directly to Step 5.

Step 1: Detect — Check File Size and Page Count

# Get file size in bytes
FILE_SIZE=$(stat -f%z "input.pdf" 2>/dev/null || stat -c%s "input.pdf" 2>/dev/null)

# Get page count using qpdf
PAGE_COUNT=$(qpdf --show-npages "input.pdf" 2>/dev/null)

# Fallback: use Python if qpdf is unavailable
PAGE_COUNT=$(python3 -c "from pypdf import PdfReader; print(len(PdfReader('input.pdf').pages))" 2>/dev/null)

Step 2: Decide — Determine if Splitting is Needed

NEED_SPLIT = false
CHUNK_SIZE = 50   # pages per chunk (safe for free API limit of 50 pages/request)

IF file_size > 5242880 (5 MB):
    NEED_SPLIT = true

IF page_count > 100:
    NEED_SPLIT = true

IF page_count is unknown AND file_size > 5242880:
    NEED_SPLIT = true

Thresholds:
| Condition | Action |
|-----------|--------|
| ≤ 5 MB AND ≤ 100 pages | Parse directly with xparse-cli parse (no splitting) |
| > 5 MB OR > 100 pages | Split into chunks, parse each, then merge |

Chunk sizing:
- Default: 50 pages per chunk (safe for both free and paid API)
- If paid API is configured: can increase to 200 pages per chunk for efficiency
- If file is > 5 MB but ≤ 100 pages: split by file size (~4MB per chunk) using page estimation

Step 3: Split — Extract PDF Chunks

Option A: Using qpdf (preferred)

# Create temp directory for chunks
mkdir -p /tmp/xparse-chunks

# Split into chunks of CHUNK_SIZE pages
# Example: 150-page PDF with CHUNK_SIZE=50 → 3 chunks
qpdf input.pdf --pages . 1-50   -- /tmp/xparse-chunks/chunk_001.pdf
qpdf input.pdf --pages . 51-100 -- /tmp/xparse-chunks/chunk_002.pdf
qpdf input.pdf --pages . 101-150 -- /tmp/xparse-chunks/chunk_003.pdf

Option B: Using Python pypdf

from pypdf import PdfReader, PdfWriter
import math, os

reader = PdfReader("input.pdf")
chunk_size = 50
total = len(reader.pages)
out_dir = "/tmp/xparse-chunks"
os.makedirs(out_dir, exist_ok=True)

for i in range(0, total, chunk_size):
    writer = PdfWriter()
    for page in reader.pages[i:i+chunk_size]:
        writer.add_page(page)
    chunk_path = os.path.join(out_dir, f"chunk_{i//chunk_size+1:03d}.pdf")
    with open(chunk_path, "wb") as f:
        writer.write(f)

For size-based splitting (>5 MB but ≤100 pages):

Estimate pages per chunk: pages_per_chunk = floor(total_pages * 4MB / file_size_MB)

Then split using the same methods above.

Step 4: Parse & Merge

Parse each chunk sequentially:

# Parse chunk 1 → save markdown
xparse-cli parse /tmp/xparse-chunks/chunk_001.pdf --output /tmp/xparse-chunks/chunk_001.md

# Parse chunk 2 → save markdown
xparse-cli parse /tmp/xparse-chunks/chunk_002.pdf --output /tmp/xparse-chunks/chunk_002.md

# Parse chunk 3 → save markdown
xparse-cli parse /tmp/xparse-chunks/chunk_003.pdf --output /tmp/xparse-chunks/chunk_003.md

> Run parse requests serially. Do not start another until the previous result has been inspected. Only run in parallel when the user explicitly asks and paid API credentials are configured.

Merge results into a single file:

# Merge all chunk markdown files into one
cat /tmp/xparse-chunks/chunk_*.md > /tmp/xparse-chunks/merged_output.md

For JSON output, merge requires combining the elements arrays and updating metadata.page_count:

import json, glob

chunks = sorted(glob.glob("/tmp/xparse-chunks/chunk_*.json"))
merged = {"code": 200, "message": "success", "data": {"elements": [], "markdown": ""}}

for chunk_file in chunks:
    with open(chunk_file) as f:
        chunk = json.load(f)
    merged["data"]["elements"].extend(chunk["data"]["elements"])
    merged["data"]["markdown"] += chunk["data"]["markdown"] + "\n"

with open("/tmp/xparse-chunks/merged_output.json", "w") as f:
    json.dump(merged, f, ensure_ascii=False, indent=2)

Cleanup:

rm -rf /tmp/xparse-chunks

Step 5: Non-PDF Files — Parse Directly

For all non-PDF file types (images, Office, HTML, OFD, etc.), parse directly without any splitting:

xparse-cli parse <FILE>

No size or page checking needed. Proceed with the standard workflow.

Quick Reference

Goal Command
Parse small PDF / image xparse-cli parse <FILE>
Parse large PDF (auto-split) Follow Steps 1-4 above
JSON output xparse-cli parse <FILE> --view json
Save markdown xparse-cli parse <FILE> --view markdown --output <DIR\|FILE>
Save JSON xparse-cli parse <FILE> --view json --output <DIR\|FILE>
Page range xparse-cli parse <FILE> --page-range 1-5
Encrypted doc xparse-cli parse <FILE> --password <PWD>
Character details xparse-cli parse <FILE> --view json --output <DIR\|FILE> --include-char-details

> --output <DIR> auto-generates <basename>.md or <basename>.json; --output <FILE> writes directly.

Default Path

  1. Detect file type — is it a PDF?
  2. If PDF: check file size and page count (Step 1)
  3. If needs splitting: split → parse chunks → merge (Steps 2-4)
  4. If no splitting needed: parse directly with xparse-cli parse <FILE>
  5. If non-PDF: parse directly with xparse-cli parse <FILE>
  6. Read the markdown result
  7. If the task needs more structure, then and only then upgrade to JSON
  8. If required input is missing, stop and ask the user
  9. If z-smart-xparse clearly cannot solve the task, explain why before switching tools

When to Stop

Stop and ask the user if:

  • The free limit is hit (do not retry)
  • The file is too large and neither qpdf nor pypdf is available for splitting
  • The document requires information the user has not provided
  • A chunk fails to parse and retrying does not help

If the error looks temporary, retry once at most. Never silently skip a failed parse.

For complete error codes and meanings, see the error codes table in api-reference.md.

Splitting Failure Handling

Situation Action
qpdf not installed and pypdf not available Install one: brew install qpdf or pip install pypdf
qpdf fails to split (corrupted PDF) Try Python pypdf as fallback
A chunk parse fails Retry that chunk once; if still fails, stop and report which chunk failed
Merge produces garbled output Check individual chunk outputs, identify the problematic chunk

Learn More

Detailed references in skill directory:

  • api-reference.md — Parameters, response fields, error codes
  • cli-guidance.md — Commands, paid API, output views, troubleshooting
  • error-handling.md — Agent decision logic (when to stop, retry rules)
  • textin-key-setup.md — Configure paid API credentials

常见问题

5 问
答案由本站依据条目字段整理
Z Smart Xparse怎么安装?

没有现成安装命令:按安装说明或仓库 README,把 SKILL.md 放进客户端的 skills 目录(一般一个技能一个文件夹)。

Z Smart Xparse支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Z Smart Xparse权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Z Smart Xparse收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Z Smart Xparse用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。