RAG Chunking Strategy Advisor

RAG Chunking Strategy Advisor is a skill for Claude Code, Codex from Notysoty/openagentskills. It costs 31 tokens per session (1,453 once invoked), scanned A, original, MIT.

A guide that recommends how to split documents into searchable pieces for retrieval-augmented generation (RAG), a method where an AI retrieves relevant text before answering. It uses the document type and search goal to suggest a strategy.

In plain words
What is it for?
Use it to plan retrieval for PDFs, Markdown, HTML, code, emails, and similar documents. Provide the document details and search goal to get chunking advice.
Why use it?
Poorly sized or split pieces can make an AI miss relevant information or lose important context. This guide helps choose a suitable approach before building the retrieval system.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: mentions Claude Code; mentions Codex; built for cline.

Good fit Use it to plan retrieval for PDFs, Markdown, HTML, code, emails, and similar documents. Provide the document details and search goal to get chunking advice.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/notysoty/openagentskills/rag-chunking-advisor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Notysoty/openagentskills --skill rag-chunking-advisor
Clone the repo
git clone --depth 1 https://github.com/Notysoty/openagentskills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for RAG Chunking Strategy Advisor

README.md
[![agentmods](https://agentmods.dev/badge/skills/notysoty/openagentskills/rag-chunking-advisor/github.svg)](https://agentmods.dev/skills/notysoty/openagentskills/rag-chunking-advisor)
Your own site
<a href="https://agentmods.dev/skills/notysoty/openagentskills/rag-chunking-advisor"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/rag-chunking-advisor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for RAG Chunking Strategy Advisor

Your own site · 80×15
<a href="https://agentmods.dev/skills/notysoty/openagentskills/rag-chunking-advisor"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/rag-chunking-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.01453
Opus 5 $0.00015 $0.00727
Sonnet 5 $0.00006 $0.00291
Haiku 4.5 $0.00003 $0.00145

Measured 9d ago against content hash 21f708fff938, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

RAG Chunking Strategy Advisor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rag-chunking-advisor/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RAG Chunking Strategy Advisor

What this skill does

This skill analyzes your document types, content structure, and retrieval goals to recommend the right chunking strategy for your RAG pipeline. Poor chunking is the #1 cause of RAG failures — chunks too large lose precision, chunks too small lose context. This skill picks the right strategy and explains exactly how to implement it.

How to use

Claude Code / Cline

Copy this file to .agents/skills/rag-chunking-advisor/SKILL.md in your project root.

Then ask:

  • "Use the RAG Chunking Strategy Advisor to help me chunk our legal contract PDFs."
  • "What chunking strategy should I use for markdown documentation with code blocks?"

Provide:

  • Document type (PDFs, markdown, HTML, code, emails, etc.)
  • Typical document length
  • What users will search for (questions, keywords, concepts)
  • Your embedding model if known

Cursor / Codex

Paste the instructions below along with your document type and retrieval use case.

The Prompt / Instructions for the Agent

When asked to advise on RAG chunking, follow these steps:

Step 1 — Identify document characteristics

Ask or infer:

  • Document type: structured (tables, headers) vs. unstructured (prose) vs. code
  • Length: short (< 1 page), medium (1–20 pages), long (20+ pages)
  • Internal structure: does it have headers, sections, numbered lists, code blocks?
  • Query type: factual lookups, conceptual questions, code search, or multi-hop reasoning?

Step 2 — Select the primary chunking strategy

Document Type Recommended Strategy Chunk Size
Prose (articles, books) Sentence-window or recursive character 512–1024 tokens
Structured docs (markdown, HTML) Header-based (split on H2/H3) Full section
PDFs with mixed content Semantic chunking + page boundary 512 tokens
Source code Function/class boundary splitting Full function
Tables / spreadsheets Row-level or table-level 1 row or full table
Emails / short messages Document-level (no chunking) Full doc
Legal / contracts Clause-level splitting 256–512 tokens

Read the full file on GitHub · 143 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 143 lines · 31 tokens per session scan A 21f708fff938

Subscribe to this mod's changes

RAG Chunking Strategy Advisor is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 26d ago), licensed MIT. It adds 31 tokens to every session and 1,453 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

rag-expert

Design retrieval-augmented generation systems: chunking, embeddings, vector and hybrid search, reranking, grounding and evaluation. Use when the user mentions RAG, retrieval, semantic search, embeddings, vector databases, pgvector, Chroma, Qdrant, Pinecone, chunking or reranking, wants an assistant answering over…

personamanagmentlayer/pcl · 97 tokens

Vector Databases

Guides retrieval-store design, indexing, and query behavior for embedding-backed systems without confusing storage with application truth.

agentic-in/elephant-agent · 26 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

arrowspace

Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.

sickn33/agentic-awesome-skills · 28 tokens

nemotron-retrieval-recipes

Use when planning, debugging, tuning, evaluating, exporting, or deploying public Nemotron embed/rerank retrieval recipes.

NVIDIA-NeMo/Nemotron · 36 tokens

rag-retrieval

Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.

yonatangross/orchestkit · 58 tokens