Works with the AI Agents you already use
RAG Document Ingestion and Chunking Planner
by Saizul Amin
Prepare business documents for RAG with heading-aware chunking, deduplication, and metadata enrichment.
$10
RAG Document Ingestion and Chunking Planner
Example session with this skill installed
Run the RAG Document Ingestion and Chunking Planner skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the rag document ingestion
Here is what the RAG Document Ingestion and Chunking Planner skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
4 file(s) -> 25 chunk(s), 25 written
tokens: total 1791, min 5, median 86, max 111
tiny (<40): 7, oversized (>120): 0, without heading: 1
exact duplicates: 11, near duplicates: 0
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Retrieval quality is decided at ingestion. If your agent misses facts present in your documents or quotes outdated policies, the issue is likely poor chunking and noisy metadata. This skill provides a systematic workflow to clean, inventory, and partition business documents into high-quality retrieval units.
What it does
- Inventory sources by tracking ownership, update frequency, and access levels across Markdown, HTML, and text files.
- Clean text by stripping navigation, cookie banners, and footers while preserving semantic structures like tables and code blocks.
- Execute chunking using heading-aware logic with configurable token sizes and overlaps to maintain context.
- Generate metadata including heading paths, SHA256 hashes, and source URLs for filtered retrieval.
- Deduplicate content by identifying and removing exact or near-duplicate chunks like boilerplate text.
- Audit quality via a script that reports size distributions, tiny chunks, and oversized blocks.
How it works
- Source Inventory: Map out your documentation sources and drop drafts or archived content.
- Text Cleaning: Strip UI noise and convert unstructured files into clean Markdown or text.
- Chunking Script: Run
python3 scripts/chunk_docs.pywith defined--max-tokensand--overlapsettings to produce JSONL output. - Statistical Review: Analyze the output for tiny or oversized chunks and resolve issues in the source files.
- Retrieval Smoke Test: Run a manual validation of 20 to 50 questions to ensure the correct chunks appear in top search results.
Frameworks & tools
Python 3.8+ standard library. The generated JSONL output is compatible with any embedding model, vector database, or search engine.
Why this beats prompting it yourself
Generic LLM prompts often fail to maintain heading context or handle large-scale deduplication across thousands of files. This skill uses a specialized Python script and a structured guide to ensure every chunk has a stable hash and clear metadata path.
Use cases
- Building a knowledge base from help-center articles, product docs, or wikis.
- Fixing a RAG system where the bot claims it does not know facts that exist in the docs.
- Re-ingesting documentation after a major platform migration.
- Auditing an existing vector index for duplicate content and poor chunk distribution.
Known limitations
Does not support direct processing of PDFs or Office files; these must be converted to Markdown/HTML first. Ranking and embedding model selection are out of scope.
Open source: saizul/ai-agent-builder-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Requires prior conversion of PDFs/Office docs to Markdown or HTML. Focused on ingestion logic; does not include embedding models or vector database connectors.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
- Software
Python 3.8+