
llamaparse
Use this skill when the user asks to parse the content of an unstructured file (PDF, PPTX, DOCX...)
- Installs
- 1.3K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/run-llama/llamaparse-agent-skills --skill llamaparse- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads llamaparse automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
LlamaParse Skill
Parse unstructured documents (such as PDF, DOCX, PPTX, XLSX) with LlamaParse and extract their contents (text, markdown, images...).
Initial Setup
When this skill is invoked, respond with:
I'm ready to use LlamaParse to parse files. Before we begin, please confirm that:
- `LLAMA_CLOUD_API_KEY` is set as environment variable within the current environment
- `@llamaindex/llama-cloud@latest` is installed and available within the current Node environment
If both of them are set, please provide:
1. One or more files to be parsed
2. Specific parsing options, such as tier, API version, custom prompt, processing options...
3. Any requests you might have regarding the parsed content of the file.
I will produce a Typescript script to run the parsing job and, once you approved its execution, I will report the results back to you based on your request.
Then wait for the user's input.
Step 0 — Install llama-cloud (optional)
If the user does not have the @llamaindex/llama-cloud package installed, add it to the current environment by running:
npm install @llamaindex/llama-cloud@latest
Step 1 — Produce a Typescript Script
Once the user confirms the environment variables are set and provides the necessary details for the parsing job, produce a typescript script.
As a source of truth for the TS script, you can:
- Refer to the example.ts script, which covers most of the necessary configurations for LlamaParse
- Refer to the complete LlamaParse Documentation, fetching the
https://developers.llamaindex.ai/python/cloud/llamaparse/api-v2-guide/page.
Scripting Best Practices
Follow these guidelines when generating scripts:
1. Always Use the Top-Level LlamaCloud Client
Use LlamaCloud (the API client) for all parsing operations:
import LlamaCloud from "@llamaindex/llama-cloud";
// Define a client
const client = new LlamaCloud({
apiKey: process.env["LLAMA_CLOUD_API_KEY"], // This is the default and can be omitted
});
2. Two-Step Upload → Parse Pattern
Always upload first to get a file ID, then parse using the file ID. Never pass raw file bytes directly to parse().
import { readFile, writeFile } from "fs/promises";
import { basename } from "path";
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic",
version: "latest",
file_id: fileId,
...
});
If the user already has a file ID (e.g. from a prior upload), skip the upload step and use it directly.
3. Choose the Right Tier
| Tier | When to Use |
|---|---|
fast | Speed is the priority; simple documents |
cost_effective | Budget-conscious; straightforward text extraction |
agentic | Complex layouts, tables, mixed content (default recommendation) |
agentic_plus | Advanced analysis, highest accuracy |
Default to agentic unless the user specifies otherwise or the document is simple.
4. Always Include the expand Parameter
The expand parameter controls what content is returned. Omitting it returns minimal data. Always specify exactly what you need:
| Value | Returns |
|---|---|
text_full | Plain text via result.text_full |
markdown_full | Markdown via result.markdown_full |
items | Page-level JSON via result.items.pages |
text_content_metadata | Per-page text metadata |
markdown_content_metadata | Per-page markdown metadata |
items_content_metadata | Per-page items metadata |
images_content_metadata | Image list with presigned URLs |
output_pdf_content_metadata | Output PDF metadata |
xlsx_content_metadata | Excel-specific metadata |
Only request metadata *_content_metadata variants when you need presigned URLs or per-page detail — they increase payload size.
5. Handle None Results Defensively
result.text_full, result.markdown_full, and result.items may be undefined on failure. Always guard against this:
const text = result.text_full ?? "";
const markdown = result.markdown_full ?? "";
6. Use Structured Options for Advanced Configuration
Group options using the correct nested keys:
const result = await client.parsing.parse({
tier: "agentic",
version: "latest",
file_id: fileId,
input_options: {
presentation: {
skip_embedded_data: false,
},
},
output_options: {
images_to_save: ["screenshot"],
markdown: {
tables: { output_tables_as_markdown: true },
annotate_links: true,
},
},
processing_options: {
specialized_chart_parsing: "agentic",
ocr_parameters: { languages: ["de", "en"] },
},
agentic_options: {
custom_prompt:
"Extract text from the provided file and translate it from German to English.",
},
expand: [
"markdown_full",
"images_content_metadata",
"markdown_content_metadata",
],
});
Use agentic_options.custom_prompt whenever the user wants to guide extraction (translation, summarization, structured extraction, etc.).
7. Downloading Images Requires httpx and Auth
When images_content_metadata is in expand, download images via presigned URLs with Bearer auth:
if (result.images_content_metadata) {
for (const image of result.images_content_metadata.images) {
if (image.presigned_url) {
const response = await fetch(image.presigned_url, {
headers: {
Authorization: `Bearer ${process.env["LLAMA_CLOUD_API_KEY"]}`,
},
});
if (response.ok) {
const content = await response.bytes();
await writeFile(image.filename, content);
}
}
}
}
8. Use the Node shebang
Every generated script should include the node shebang:
#!/usr/bin/env node
Step 2 — Execute the Typescript Script
Once the typescript script has been produced, you should:
- Present the script to the user and ask for permissions to run it (depending on the current permissions settings)
- Once you obtained permission to run, execute the script
- Explore the results based on the user's requests
In order to run typescript scripts, it is highly recommended to use:
npx tsx script.ts.
FAQ
What does the llamaparse skill do?
Use this skill when the user asks to parse the content of an unstructured file (PDF, PPTX, DOCX...)
How do I install llamaparse?
Run npx skills add https://github.com/run-llama/llamaparse-agent-skills --skill llamaparse in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/llamaparse/ (personal) or .claude/skills/llamaparse/ (project).
Which AI agents can use llamaparse?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is llamaparse safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains llamaparse?
It is published by run-llama in run-llama/llamaparse-agent-skills. It has 1,319 recorded installs.
More from run-llama/llamaparse-agent-skills
liteparse
run-llama/llamaparse-agent-skills
Use this skill whenever a task involves a document file (PDF, DOCX, PPTX, XLSX, or image) and you need to read it or pull text, tables, or specific values out of it — to answer a question about its contents, look up a figure, or extract data. Provides fast, local, model-free extraction via the lit CLI with disciplined, low-cost search patterns.
effective-liteparse
run-llama/llamaparse-agent-skills
Open the skill to read its SKILL.md instructions.
llamacloud-index
run-llama/llamaparse-agent-skills
Open the skill to read its SKILL.md instructions.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.