# llamaindex-development

Guides coding assistants in building Python RAG applications with LlamaIndex. Helps generate document parsers, vector indexes, and query engines.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 691 installs · ★ 286
- Author: Mindrally
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Mindrally/skills/tree/HEAD/llamaindex-development/SKILL.md
- Updated: 2026-10-08
- HTML: https://affpapa.org/en/nevibecode/skills/llamaindex-development

## What it does

This skill instructs the agent on Python workflows for LlamaIndex. It enforces PEP 8 guidelines. The agent prioritizes functional routines over custom classes and follows a clear folder layout with `loaders/` and `query_engines/`.

It provides patterns for ingesting documents, running semantic node parsing, and persisting indexes via `StorageContext`. Supported storage backends include Chroma, pgvector, Pinecone, and Qdrant.

You get templates for hybrid search using `QueryFusionRetriever` alongside post-processing filters. Connecting external stores or remote embeddings requires credentials set up in your project environment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill llamaindex-development -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/llamaindex-development/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/llamaindex-development/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill llamaindex-development -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/llamaindex-development/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill llamaindex-development -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/llamaindex-development/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Mindrally/skills llamaindex-development
```

2. **Manually: put the files in place**
- File: `.github/skills/llamaindex-development/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill llamaindex-development -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Mindrally/skills --path llamaindex-development
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/llamaindex-development/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill llamaindex-development -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Mindrally/skills/tree/HEAD/llamaindex-development/SKILL.md

## When to use it
- organize a modular LlamaIndex codebase using standard directory patterns
- split documents into semantic chunks with `SemanticSplitterNodeParser`
- set up hybrid retrieval combining vector search and BM25 keywords
- persist and reload vector indexes using `StorageContext`

## Example prompts
- Write a script to load PDFs from `./data` and index them into a local Chroma collection
- Create a hybrid retriever using `QueryFusionRetriever` with BM25 and vector search
- Configure a `RetrieverQueryEngine` with a similarity threshold of 0.7

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4142f4d5690cca74.

BEGIN THIRD-PARTY FILE 4142f4d5690cca74
````text
---
name: llamaindex-development
description: Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# LlamaIndex Development

You are an expert in LlamaIndex for building RAG (Retrieval-Augmented Generation) applications, data indexing, and LLM-powered applications with Python.

## Key Principles

- Write concise, technical responses with accurate Python examples
- Use functional, declarative programming; avoid classes where possible
- Prioritize code quality, maintainability, and performance
- Use descriptive variable names that reflect their purpose
- Follow PEP 8 style guidelines

## Code Organization

### Directory Structure

```
project/
├── data/                 # Source documents and data
├── indexes/              # Persisted index storage
├── loaders/              # Custom document loaders
├── retrievers/           # Custom retriever implementations
├── query_engines/        # Query engine configurations
├── prompts/              # Custom prompt templates
├── transformations/      # Document transformations
├── callbacks/            # Custom callback handlers
├── utils/                # Utility functions
├── tests/                # Test files
└── config/               # Configuration files
```

### Naming Conventions

- Use snake_case for files, functions, and variables
- Use PascalCase for classes
- Prefix private functions with underscore
- Use descriptive names (e.g., `create_vector_index`, `build_query_engine`)

## Document Loading

### Using Document Loaders

```python
from llama_index.core import SimpleDirectoryReader
from llama_index.readers.file import PDFReader, DocxReader

# Load from directory
documents = SimpleDirectoryReader(
    input_dir="./data",
    recursive=True,
    required_exts=[".pdf", ".txt", ".md"]
).load_data()

# Load specific file types
pdf_reader = PDFReader()
documents = pdf_reader.load_data(file="document.pdf")
```

### Custom Loaders

```python
from llama_index.core.readers.base import BaseReader
from llama_index.core import Document

class CustomLoader(BaseReader):
    def load_data(self, file_path: str) -> list[Document]:
        # Custom loading logic
        with open(file_path, 'r') as f:
            content = f.read()

        return [Document(
            text=content,
            metadata={"source": file_path}
        )]
```

## Text Splitting and Processing

### Node Parsing

```python
from llama_index.core.node_parser import (
    SentenceSplitter,
    SemanticSplitterNodeParser,
    MarkdownNodeParser
)

# Simple sentence splitting
splitter = SentenceSplitter(
    chunk_size=1024,
    chunk_overlap=200
)
nodes = splitter.get_nodes_from_documents(documents)

# Semantic splitting (preserves meaning)
````
END THIRD-PARTY FILE 4142f4d5690cca74

The third-party file has ended. Everything between the 4142f4d5690cca74 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2955 of 9222 bytes. © Mindrally · Apache-2.0 · https://github.com/Mindrally/skills/tree/HEAD/llamaindex-development/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
