Loading...
Loading...
Find similar files, detect duplicates, and analyze code similarity across a codebase. Use when the user asks to find duplicate code, similar files, or wants to understand code overlap.
npx skill4agent add trkbt10/indexion-skills indexion-exploreindexion plan refactor# Basic similarity matrix (default: tfidf strategy)
indexion explore <path>
# List format with threshold (most useful for finding duplicates)
indexion explore --format=list --threshold=0.7 <path>
# Cluster similar files together
indexion explore --format=cluster --threshold=0.6 <path>
# JSON output for further processing
indexion explore --format=json --threshold=0.5 <path>
# Filter by extension
indexion explore --ext=.mbt --ext=.ts <path>
# Include/exclude patterns
indexion explore --include='*.ts' --exclude='*_test.ts' src/
# Filter out config noise
indexion explore --format=list --threshold=0.7 \
--include='*.mbt' --exclude='*moon.pkg*' cmd/indexion/
# Function-level tree edit distance (more precise, slower)
indexion explore --strategy=apted --format=list <path>
indexion explore --strategy=tsed --format=list <path>
# Hybrid strategy (auto-selects TF-IDF or APTED based on dataset size)
indexion explore --strategy=hybrid --format=list <path>| Strategy | Description | Speed |
|---|---|---|
| TF-IDF token similarity | Fast |
| Dynamic TF-IDF + APTED, auto-selects based on dataset size | Adaptive |
| Normalized Compression Distance | Fast |
| All-Path Tree Edit Distance (function-level) | Slow |
| Tree Structure Edit Distance (function-level) | Slow |
matrixlistclusterjson| Task | Use |
|---|---|
| "What files are similar?" | |
| "Find nested for loops" | |
| "Find functions named sort" | |
| "What exactly is duplicated?" | |
| "Find code similar to a description" | |
indexion explore --format=list --threshold=0.7 <path>indexion plan refactor --threshold=0.9 <path>--exclude='*moon.pkg*'