
Indexion Segment
This splits text into meaningful chunks for RAG pipelines and embeddings, which is harder than it sounds if you want segments that actually respect context boundaries. It offers three strategies: window-based divergence detection (the default), TF-IDF for topic shifts, and simple punctuation breaks. The hybrid mode combines divergence and TF-IDF with configurable weights, which is probably what you want for mixed content documents. You get sensible defaults (500 char target, adaptive thresholds) but can tune min/max sizes and divergence sensitivity. Honestly, if you're building a RAG system and currently just chunking every N tokens, this will likely improve your retrieval quality with minimal setup.
- skills.sh installs
- 4.9K
- GitHub stars
- 2
- last updated
- Aug 21, 2026
Install
$ npx -y skills add trkbt10/indexion-skills --skill indexion-segment --agent claude-codeInstalls into .claude/skills of the current project.
Files
indexion segment
Split text into contextual segments using divergence-based, TF-IDF, or punctuation strategies.
When to Use
- User needs to chunk text for RAG or embedding pipelines
- User wants to split a document into meaningful sections
- User asks to segment text for processing
- Preparing text for similarity analysis at sub-document level
Usage
# Default window divergence strategy
indexion segment <input-file> <output-dir>
# TF-IDF based segmentation
indexion segment --strategy=tfidf <input-file> <output-dir>
# Punctuation-based segmentation
indexion segment --strategy=punctuation <input-file> <output-dir>
# Custom segment sizes
indexion segment --min-size=200 --max-size=3000 --target-size=800 document.txt output/
# Custom divergence threshold
indexion segment --threshold=0.5 document.txt output/
# Adaptive threshold mode (default)
indexion segment --adaptive document.txt output/
# Hybrid NCD+TF-IDF mode
indexion segment --hybrid --ncd-weight=0.6 --tfidf-weight=0.4 document.txt output/
# Custom window size
indexion segment --window-size=5 document.txt output/
# Custom output prefix
indexion segment --prefix=chunk document.txt output/
Sponsors
Details
- Repository
- github.com/trkbt10/indexion-skills
- Category
- AI & Agent Building
- First seen
- Jul 14, 2026