From run-llama-llamaparse-agent-skills
Retrieves passages, locates files, and searches indexed content in a LlamaCloud Index v2 knowledge base via curl and the LlamaParse Platform REST API. Teaches agentic retrieval, navigating the index like a file system instead of one-shot RAG.
How this skill is triggered — by the user, by Claude, or both
Slash command
/run-llama-llamaparse-agent-skills:llamacloud-indexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Answer questions from documents stored in [Index v2](https://developers.llamaindex.ai/llamaparse/cloud-index-v2/getting_started/), the managed knowledge base of the LlamaParse Platform. Every operation is a single authenticated HTTP call, so from a shell the cheapest interface is `curl` + `jq`: you can compose calls, batch independent lookups into one command, and bound exactly how much output ...
Answer questions from documents stored in Index v2, the managed knowledge base of the LlamaParse Platform. Every operation is a single authenticated HTTP call, so from a shell the cheapest interface is curl + jq: you can compose calls, batch independent lookups into one command, and bound exactly how much output enters the conversation.
Index v2 is built for agentic retrieval: beyond semantic search, it gives you file-system-like access to the underlying documents (PDFs, Office documents, images, and other unstructured files). This skill is about using that access well — navigating the index the way you would a file system, instead of firing a single one-shot RAG query and hoping the top results contain the answer.
export LLAMA_BASE="https://api.cloud.llamaindex.ai/api/v1" # EU accounts: https://api.cloud.eu.llamaindex.ai/api/v1
AUTH=(-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" -H "Content-Type: application/json")
If a call returns 401/403, ask the user to check LLAMA_CLOUD_API_KEY (and the region) — do not retry in a loop.
| Operation | Call | Key body fields |
|---|---|---|
| List indexes | GET /indexes | — |
| Retrieve passages | POST /retrieval/retrieve | index_id, query, top_k, rerank ({enabled, top_n}, enabled by default), score_threshold, static_filters, custom_filters |
| Find files | POST /retrieval/files/find | index_id, file_name_contains (substring, recommended) or file_name (exact) |
| Grep a file | POST /retrieval/files/grep | index_id, file_id, pattern (regex), context_chars |
| Read a file | POST /retrieval/files/read | index_id, file_id, offset, max_length (chars; omit for full file) |
file_id values come from the find and retrieve responses. Full parameter reference: retrieval · file operations.
Discover once per conversation, not before every query:
curl -s "${AUTH[@]}" "$LLAMA_BASE/indexes" | jq '.items[] | {id, name, description}'
If more than one index plausibly matches the user's question, ask the user which one to use — do not silently query the wrong knowledge base. If the user already gave you an index ID, skip discovery entirely.
Treat the index like a file system you can explore, not a black box you query once:
GET /indexes to find the right index.find to identify the files relevant to the question.grep for exact patterns within a file.retrieve for hybrid (sparse + dense) semantic search.read a bounded window of a file when you need surrounding context.You rarely need all five steps for one question. The skill is choosing the right entry point (below) and iterating: a first retrieval that names a promising document is a reason to grep inside it, not a reason to stop.
| Situation | Start with |
|---|---|
| Open or conceptual question ("what does the report say about churn?") | retrieve |
| Question spans multiple documents or you don't know the wording used | retrieve |
| Looking for an exact term, identifier, figure, or section heading in a known file | grep |
| The user names or implies a specific document ("in the Q3 report…") | find, then grep/retrieve within it |
| You need continuous context around a passage you already located | read with offset/max_length |
Rules of thumb:
retrieve matches meaning; grep matches patterns. Use retrieval when you know what you mean but not how the document phrases it. Use grep when you know the literal string (a product name, an account code, "Section 4.2")."static_filters": {"parsed_directory_file_id": {"operator": "eq", "value": "<file-id>"}} runs semantic search inside just that document.top_k for retrieval (and rerank.top_n to cap what the reranker returns), context_chars for grep, offset/max_length for reads. Never let an unbounded response into the conversation.# Retrieve passages (bounded, with file and page provenance)
curl -s "${AUTH[@]}" -X POST "$LLAMA_BASE/retrieval/retrieve" -d '{
"index_id": "<index-id>", "query": "carbon intensity targets", "top_k": 5
}' | jq -r '.results[] | "== file \(.static_fields.parsed_directory_file_id) pp.\(.static_fields.page_range_start)-\(.static_fields.page_range_end) score \(.score)\n\(.content)"'
# Locate a document by name substring
curl -s "${AUTH[@]}" -X POST "$LLAMA_BASE/retrieval/files/find" \
-d '{"index_id": "<index-id>", "file_name_contains": "quarterly"}' | jq '.items[] | {file_id, file_name}'
# Grep it — context comes back with the match, no follow-up read needed
curl -s "${AUTH[@]}" -X POST "$LLAMA_BASE/retrieval/files/grep" \
-d '{"index_id": "<index-id>", "file_id": "<file-id>", "pattern": "revenue|profit", "context_chars": 200}' \
| jq -r '.items[] | "[\(.start_char)-\(.end_char)] \(.content)"'
# Read a window around a grep hit (never the whole file by default)
curl -s "${AUTH[@]}" -X POST "$LLAMA_BASE/retrieval/files/read" \
-d '{"index_id": "<index-id>", "file_id": "<file-id>", "offset": 12000, "max_length": 4000}' | jq -r '.content'
Batch independent lookups into one command instead of one call per turn — several greps or retrievals in a single for-loop with labeled output cost one round-trip, not five.
Every claim in your answer must be backed by content you actually retrieved:
static_fields.page_range_start/_end) for exactly this purpose.read on a large document floods the conversation with content you'll pay for on every subsequent turn. If you need one fact, grep; if you need the relevant passages, retrieve (optionally filtered to the file); if you need a region, read a window. Read a file in full only when nothing narrower can answer the question.retrieve.jq to project just the fields you need; a raw retrieval response is mostly metadata you don't want in context.If you are running in an environment without a shell, the same operations are exposed as tools by the LlamaParse MCP server (https://mcp.llamaindex.ai/mcp, or scoped to one index at /index/{indexId}/mcp) — the workflow and discipline above apply unchanged.
npx claudepluginhub joshuarweaver/cascade-data-analytics --plugin run-llama-llamaparse-agent-skillsIndexes local files and searches them using BM25, vector embeddings, and hybrid reranking. Includes MCP mode for tool integration.
Indexes local files and searches them using BM25, vector embeddings, and hybrid reranking. Includes MCP mode for tool integration.
Creates, ingests documents into, and queries Pinecone full-text-search indexes using preview API (2026-01.alpha). Ships ingest.py for bulk upsert with error handling and polling.