← 返回 Skills 市场
zli484

Llamaparse

作者 zli484 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
245
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install llamaparse
功能描述
Parse, extract, and analyze documents using the LlamaParse API (LlamaCloud). Use when the user asks to parse PDFs, images, spreadsheets, or other documents i...
使用说明 (SKILL.md)

LlamaParse

Parse documents (PDFs, images, spreadsheets, presentations — 130+ formats) into LLM-ready text, markdown, and structured data using the LlamaParse API.

Prerequisites

  • Python package: llama-cloud>=1.0 (pip install llama-cloud)
  • API key: Set LLAMA_CLOUD_API_KEY environment variable. Get one at https://cloud.llamaindex.ai

Verify setup:

pip install llama-cloud>=1.0
export LLAMA_CLOUD_API_KEY=llx-...

Quick Start

from llama_cloud import AsyncLlamaCloud
import asyncio

async def parse_document(file_path: str):
    client = AsyncLlamaCloud()  # Uses LLAMA_CLOUD_API_KEY env var
    file = await client.files.create(file=file_path, purpose="parse")
    result = await client.parsing.parse(
        file_id=file.id,
        tier="agentic",
        version="latest",
        expand=["markdown", "text"],
    )
    return result

result = asyncio.run(parse_document("document.pdf"))
print(result.markdown.pages[0].markdown)

Core Concepts

Tiers (required — choose one)

Tier Use Case Cost
agentic_plus Maximum accuracy, complex layouts, charts Highest
agentic Advanced parsing with intelligent agents Medium-high
cost_effective Balanced performance and cost Medium
fast Fastest, basic parsing Lowest

Always specify both tier and version. Use version="latest" for dev, or a date string like "2026-01-08" for production reproducibility.

Output Views (expand parameter)

Request one or more in the expand list:

  • markdown — Structured markdown with headings, lists, tables. Best for RAG/LLM pipelines.
  • text — Clean flattened text per page. Good for search/retrieval.
  • items — Structured tree of page elements (headers, paragraphs, tables, figures) with bounding boxes. Use for layout-aware processing.
  • metadata — Document metadata.
  • images_content_metadata — Image/screenshot metadata with presigned URLs.

Access results: result.markdown.pages[i].markdown, result.text.pages[i].text, result.items.pages[i].items

Output Options

Control markdown rendering:

output_options={
    "markdown": {
        "tables": {
            "output_tables_as_markdown": True,  # or False for HTML tables
        },
    },
    "images_to_save": ["screenshot"],  # Save page screenshots
}

Processing Options

processing_options={
    "ignore": {"ignore_diagonal_text": True},
    "ocr_parameters": {"languages": ["en"]},  # OCR language hints
    "specialized_chart_parsing": "agentic_plus",  # Extract charts as structured data
}

Custom Prompts (Agentic Parsing Instructions)

Guide the parser like an LLM — useful for extracting specific data or transforming output:

from llama_cloud.types.parsing_create_params import (
    ProcessingOptions, ProcessingOptionsAutoModeConfiguration,
    ProcessingOptionsAutoModeConfigurationParsingConf
)

result = await client.parsing.parse(
    file_id=file.id,
    tier="agentic",
    version="latest",
    expand=["markdown"],
    processing_options=ProcessingOptions(
        auto_mode_configuration=[ProcessingOptionsAutoModeConfiguration(
            parsing_conf=ProcessingOptionsAutoModeConfigurationParsingConf(
                custom_prompt="Extract only prices and totals from this receipt."
            )
        )]
    ),
)

Common Workflows

Parse a single document

Use scripts/parse_document.py:

python scripts/parse_document.py document.pdf --tier agentic --output markdown,text

Batch parse a folder

Use scripts/batch_parse.py:

python scripts/batch_parse.py ./documents/ --tier agentic --max-concurrent 5

Extract tables from a document

Request items in expand, then filter for table items:

for page in result.items.pages:
    for item in page.items:
        if hasattr(item, 'rows'):  # Table item
            print(f"Table on page {page.page_number}: {len(item.rows)} rows")
            # item.csv, item.html, item.md available

Extract chart data

Enable specialized chart parsing, then pull table rows from the chart page:

result = await client.parsing.parse(
    file_id=file.id,
    tier="agentic_plus",
    version="latest",
    processing_options={"specialized_chart_parsing": "agentic_plus"},
    expand=["items"],
)

Download page screenshots

import httpx, re

result = await client.parsing.parse(
    file_id=file.id, tier="agentic", version="latest",
    output_options={"images_to_save": ["screenshot"]},
    expand=["images_content_metadata"],
)

for img in result.images_content_metadata.images:
    if img.presigned_url and re.match(r"^page_\d+\.jpg$", img.filename):
        async with httpx.AsyncClient() as http:
            resp = await http.get(img.presigned_url)
            with open(img.filename, "wb") as f:
                f.write(resp.content)

API Reference

For complete API details, see references/api-reference.md.

External Service & Security

This skill uses the LlamaParse API (https://cloud.llamaindex.ai), a cloud document parsing service by LlamaIndex.

  • API key required: You must set the LLAMA_CLOUD_API_KEY environment variable. Get a key at https://cloud.llamaindex.ai.
  • Data sent externally: Documents are uploaded to the LlamaParse API for server-side parsing. Parsed results are returned to your local machine.
  • No other network calls: The scripts only communicate with api.cloud.llamaindex.ai. Screenshot downloads use presigned URLs from the same service.
  • Scripts are reference utilities: scripts/parse_document.py and scripts/batch_parse.py are helper scripts meant to be run manually by the user. They are not executed automatically by the skill.

Tips

  • Request only the expand views you need — more views = larger response + higher latency.
  • Use agentic_plus tier with specialized_chart_parsing for documents with charts/graphs.
  • For production, pin a specific version date instead of "latest".
  • Use semaphore-based concurrency for batch parsing to respect rate limits.
  • The items view provides bounding boxes (b_box) for each element — useful for spatial analysis.
安全使用建议
This skill will upload whatever files you point it at to LlamaCloud for parsing — ensure you trust that service before sending sensitive documents. The only secret it needs is LLAMA_CLOUD_API_KEY; treat that key like any API credential (scoped, rotated, and not shared). If you need higher assurance, review the llama-cloud package source (GitHub link is provided in the references) or run the scripts in an isolated environment. Note: the scripts will optionally fetch presigned image URLs (using httpx) to save screenshots; httpx isn't required but will be used if installed. Verify billing/usage on your LlamaCloud account if you plan to batch-process many files.
功能分析
Type: OpenClaw Skill Name: llamaparse Version: 1.0.1 The LlamaParse skill bundle is a legitimate integration for the LlamaIndex document parsing service. It includes well-documented Python scripts (scripts/parse_document.py and scripts/batch_parse.py) that use the official llama-cloud SDK to process documents, with appropriate security measures such as filename validation for screenshot downloads to prevent path traversal. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description, required env var (LLAMA_CLOUD_API_KEY), required binary (python3), the declared Python package (llama-cloud), SKILL.md, and the two scripts all align with a document-parsing integration against LlamaParse/LlamaCloud.
Instruction Scope
Instructions and both scripts explicitly upload local documents to the LlamaCloud API and save returned outputs; this matches the described purpose. Users should note that uploading sends their documents to an external service (expected for this skill). The scripts may optionally fetch presigned image URLs using httpx (the code gracefully handles httpx not being installed).
Install Mechanism
Install spec installs the Python package 'llama-cloud' (kind: uv). Installing a package is expected for a Python SDK; 'uv' as an install kind is uncommon in other ecosystems but the package referenced corresponds to the documented SDK. Installing from PyPI/GitHub is a normal moderate-risk operation — verify the package source if you require higher assurance.
Credentials
Only LLAMA_CLOUD_API_KEY is required and declared as the primary credential. That is proportional for a cloud parsing integration. No other unrelated secrets or system config paths are requested.
Persistence & Privilege
always is false, the skill does not request permanent/system-wide changes, and it does not modify other skills or agent configs. The scripts only read files provided by the user and write outputs to specified output directories.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install llamaparse
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /llamaparse 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Add runtime metadata (requires.env, bins, primaryEnv) to frontmatter and document external service usage to resolve security scan mismatch
v1.0.0
Initial release of llamaparse skill – parse, extract, and analyze documents using the LlamaParse API. - Supports parsing PDFs, images, spreadsheets, and 130+ document formats into markdown, text, or structured data. - Offers tiered parsing (fast, cost effective, agentic, agentic_plus) for accuracy/speed/cost trade-offs. - Provides output as markdown, text, structured items (with tables/charts/figures), and metadata. - Allows custom prompts to extract or transform specific data during parsing. - Enables OCR for scanned documents and batch processing of folders. - Includes options to extract tables, chart data, and download screenshots of document pages.
元数据
Slug llamaparse
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Llamaparse 是什么?

Parse, extract, and analyze documents using the LlamaParse API (LlamaCloud). Use when the user asks to parse PDFs, images, spreadsheets, or other documents i... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 245 次。

如何安装 Llamaparse?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install llamaparse」即可一键安装,无需额外配置。

Llamaparse 是免费的吗?

是的,Llamaparse 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Llamaparse 支持哪些平台?

Llamaparse 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Llamaparse?

由 zli484(@zli484)开发并维护,当前版本 v1.0.1。

💬 留言讨论