Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    RAG Document Ingestion and Chunking Planner

    by Saizul Amin

    1

    Prepare business documents for RAG with heading-aware chunking, deduplication, and metadata enrichment.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    RAG Document Ingestion and Chunking Planner

    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

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. 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

    1. Source Inventory: Map out your documentation sources and drop drafts or archived content.
    2. Text Cleaning: Strip UI noise and convert unstructured files into clean Markdown or text.
    3. Chunking Script: Run python3 scripts/chunk_docs.py with defined --max-tokens and --overlap settings to produce JSONL output.
    4. Statistical Review: Analyze the output for tiny or oversized chunks and resolve issues in the source files.
    5. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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.

    Frequently Asked Questions

    This skill addresses "retrieval failure" by ensuring your documents are partitioned into context-aware chunks with clean metadata, preventing the AI from missing facts or quoting noisy UI elements like footers and banners.

    The skill outputs standard JSONL files, making it compatible with any embedding model (like OpenAI or Cohere) and any vector database (such as Pinecone, Weaviate, or Chroma).

    No, this skill is designed for text-based formats like Markdown and HTML; you will need to convert PDF or Word documents to Markdown before running the ingestion scripts.

    You receive a specialized Python chunking script, a structured configuration guide for metadata enrichment, and an audit script to validate the quality of your retrieval units.

    The skill uses heading-aware logic, meaning it tracks the path (e.g., Introduction > Installation > Prerequisites) for every chunk, ensuring the AI understands the hierarchical context of the text it retrieves.

    The included deduplication logic uses SHA256 hashing to identify and remove exact or near-duplicate boilerplate text, preventing your vector index from being cluttered with redundant information.

    New in LLM Ops