Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Zerlegt Text und Dateien (.txt, .md, .py, .sh) oder ganze Ordner in überlappende Token-Chunks für RAG und LLM-Kontextfenster.
55% 86%+32 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 12 of 22 without it.
This test ran on v12. v19 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Deutsch — Hinweis: Der Inhalt dieser Datei ist derzeit englisch.
Splits documents into overlapping token chunks. Optimized for RAG pipelines and LLM context windows. Zero dependencies — Python stdlib + re only.
from document_chunker import DocumentChunker
chunker = DocumentChunker(chunk_size=400, overlap=80)
chunks = chunker.chunk_text("Long text...")
for chunk in chunks:
print(f"Chunk {chunk['chunk_id']}: {chunk['tokens']} tokens")
chunks = chunker.chunk_document("document.md", source="My Project")
from document_chunker import chunk_corpus
chunks = chunk_corpus(["doc1.md", "doc2.txt"], source="Corpus")
python document_chunker.py document.md # Single file
python document_chunker.py ./docs/ # Entire directory
Next to this one in the catalogue, plus more from the same author.