Agent skill · Data & Analytics

api-ai-llamaindex

LlamaIndex.TS data framework for RAG, indexing, retrieval, query engines, chat engines, and agentic workflows in TypeScript

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-ai-llamaindex --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 19 KB
Bundled scripts: none
Path: skills/ai-llm/api-ai-llamaindex/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides building context-aware LLM applications in TypeScript using LlamaIndex.TS. It instructs configuring LLM and embedding models via a Settings singleton, loading documents with SimpleDirectoryReader, splitting with SentenceSplitter, indexing with VectorStoreIndex.fromDocuments(), and querying with index.asQueryEngine(). For agents, it uses agent() with tool() definitions backed by Zod schemas, and supports chat engines, streaming, and multi-step workflows.

How it works

The skill describes a sequence: configure Settings.llm and Settings.embedModel, load documents via SimpleDirectoryReader, create a VectorStoreIndex from those documents, then obtain a query engine via index.asQueryEngine() to run queries. For agents, define tools with tool(...) using a Zod schema for parameters, then instantiate an agent with agent({ tools: [...] }) and run it. For chat, instantiate a ContextChatEngine from a retriever derived from the index and call .chat(...) for multi-turn conversations. It emphasizes all operations are async (Promises), and Persistence should be handled using storageContextFromDefaults({ persistDir }) when creating or loading the index. It also notes you must install provider packages separately (e.g., @llamaindex/openai).

When to use it

  • Building Retrieval-Augmented Generation (RAG) applications with custom documents
  • Loading, chunking, and indexing documents for LLM consumption
  • Creating query engines or chat engines over indexed data
  • Implementing agentic RAG with tool-calling agents that query indexes
  • Working with multiple data sources and persisting vector indexes across restarts

What it can touch

  • Uses Settings.llm and Settings.embedModel for global config
  • Uses SimpleDirectoryReader for document loading
  • Uses VectorStoreIndex for indexing and persistence
  • Exposes asQueryEngine() for querying and ContextChatEngine for chat
  • Supports agent tooling via tool(...) and agent()
  • Utilizes storageContextFromDefaults({ persistDir }) for persistence

Caveats

  • Requires explicit configuration of the LLM provider packages (e.g., @llamaindex/openai) as they are not included in the base llamaindex package
  • All core operations are async and must be awaited
  • API keys must be supplied via environment variables rather than hardcoding
  • Server-side only; Node.js >= 20 required; not intended for client-side/browser usage
From the SKILL.md

# LlamaIndex.TS Patterns > **Quick Guide:** LlamaIndex.TS is a data framework for building context-aware LLM applications in TypeScript. Use `Settings` singleton to configure LLM and embedding models globally. Load documents with `SimpleDirectoryReader`, chunk with `SentenceSplitter`, index with `VectorStoreIndex.fromDocuments()`, and query with `index.asQueryEngine()`. For agents, use `agent()` from `@llamaindex/workflow` with `tool()` definitions using Zod schemas. All core operations are async -- every function returns a Promise. The `llamaindex` package re-exports most things, but LLM providers require separate packages like `@llamaindex/openai` or `@llamaindex/ollama`. --- <critical_requirements> ## CRITICAL: Before Using This Skill > **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants) **(You MUST configure `Settings.llm` and `Settings.embedModel` before any indexing or querying -- the Settings singleton is lazily initialized and defaults to OpenAI, which will fail without an API key)** **(You MUST await all LlamaIndex operations -- `fromDocuments()`, `asQueryEngine()`, `query()`, `chat()`, `loa

What's inside
Steps it walks through
  1. CRITICAL: Before Using This Skill
  2. Examples Index
  3. Philosophy
  4. Core Patterns
  5. Pattern 1: Settings Configuration
  6. Pattern 2: Document Loading and Indexing
  7. Pattern 3: Index Persistence
  8. Pattern 4: Agents with Tool Definitions
  9. Pattern 5: Chat Engine
  10. Pattern 6: Streaming Responses
  11. Pattern 7: Text Splitting and Node Parsing
  12. Decision Framework
  13. Which Index Type to Use
  14. Query Engine vs Chat Engine vs Agent
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-ai-llamaindex skill do?

LlamaIndex.TS data framework for RAG, indexing, retrieval, query engines, chat engines, and agentic workflows in TypeScript

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-ai-llamaindex --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going