xberg-chunking
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
Skill by xberg-io
Chalk Labs
Need help deploying xberg-chunking?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xberg-io-xberg-chunking-de2be9
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
xberg-chunking- Description
- Use when splitting extracted text into chunks for LLM context windows or RAG ingestion. Covers chunk size, overlap, markdown/yaml/semantic chunkers, tokenizer-based sizing, and the standalone `chunk` command.
- License
- MIT
- Instructions
- 160 lines in SKILL.md · view on GitHub
Files (10)
- SKILL.md
- index.md
- advanced-features.md · references/
- cli-reference.md · references/
- configuration.md · references/
- nodejs-api.md · references/
- other-bindings.md · references/
- python-api.md · references/
- rust-api.md · references/
- supported-formats.md · references/
SKILL.md (first lines)
<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:aaaffebaf030b1c214ffc0a869f0a63366360a5a568638f6996b98e75901d121 Source-Hash: blake3:4a90223a333b0f963ae8cdec4f38db88b769132c5dd1b7f39a7fe8e84f57f83e Schema-Version: v1 --> # Chunking Use this when feeding documents into an LLM context window or a vector store. Xberg chunks two ways: inline during extraction (chunks land on each document's `chunks` field), or standalone via the `chunk` command for text you already have. Sizing is character-based by default, or token-based when a tokenizer model is supplied. ## Inline during extraction Turn on chunking with `--chunk` and the chunks appear on the structured result under `chunks`: ```bash # 1000-char chunks, 200-char overlap (defaults when --chunk is on) xberg extract report.pdf --chunk --format json | jq '.result.chunks | length' # Explicit size + overlap xberg extract report.pdf --chunk --chunk-size 1500 --chunk-overlap 300 --format json ``` Overlap must be smaller than chunk size — the CLI rejects `--chunk-overlap >= --chunk-size`. When you set only `--chunk-overlap` against an existing config, an overlap that exceeds the size is clamped to `chunk_size / 4`. ## Standalone `chunk` command Chunk text you already have, from `--text` or stdin. Output defaults to JSON: ```bash # From a flag xberg chunk --text "long document text ..." --chunk-size 800 --chunk-overlap 100 # From stdin (pipe extracted content straight in) xberg extract notes.md | xberg chunk --chunk-size 500 --format json ``` JSON output carries `chunks` (array of strings), `chunk_count`, the resolved `config` (`max_characters`, `overlap`, `chunker_type`), and `input_size_bytes`. Use `--format text` for a human-readable dump with `--- chunk N ---` separators. > Note: in the JSON output, `chunker_type` is rendered capitalized (`"Text"`, > `"Markdown"`, `"Yaml"`, `"Semantic"`) because it is emitted via Rust's Debug > formatting, whereas the `--chunker-type` input flag is lowercase > (`text`, `markdown`, `yaml`, `semantic`). Lowercase the value before > comparing if you parse it back. ## Chunker types `--chunker-type` selects the splitting strategy (standalone `chunk` command): | Type | Behavior | | ---------- | ------------------------------------------------------------------- | | `text` | **Default.** Plain character-window splitting with overlap. | | `markdown` | Markdown-aware — splits on structure (headings, blocks) where possible. | | `yaml` | YAML-aware splitting for structured config/data documents. | | `semantic` | Topic-boundary splitting driven by `--topic-threshold` (0.0–1.0, default 0.75). | ```bash # Markdown-aware chunking keeps headings and blocks intact xberg chunk --text "$(cat README.md)" --chunker-type markdown # Semantic chunking — lower threshold = more, smaller topic chunks xberg chunk --text "$(cat transcript.txt)" --chunker-type semantic --topic-threshold 0.6 ``` ## Token-based sizing By default `--chunk-size` counts characters. To size chunks by tokens for a specific model, pass `--chunking-tokenizer` with a HuggingFace tokenizer id. On the `extract` command this implicitly enables chunking. Requires the `chunking-tokenizers` feature (present in the default CLI build). ```bash # Size chunks by GPT-4o tokens during extraction xberg extract report.pdf --chunking-tokenizer Xenova/gpt-4o --format json # Or on the standalone command xberg chunk --text "$(cat doc.txt)" --chunking-tokenizer Xenova/gpt-4o --chunk-size 512 ``` With a tokenizer set, `--chunk-size` is interpreted in tokens, not characters. ## Config file alternative Field names in config files are snake_case under `[chunking]`: ```toml [chunking] max_characters = 1000 overlap = 200 chunker_type = "markdown" ``` ```bash xberg extract report.pdf --config xberg.toml --format json ``` > CLI flags map to config fields as `--chunk-size` → `max_characters` and > `--chunk-overlap` → `overlap`. In config files use the snake_case names. ## Programmatic access From Python, enable chunking on the config and read the chunks off the document in the result envelope (`result.results[0].chunks`): ```python
From xberg-io/xberg, MIT.
More from xberg-io/xberg
- 0.769score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-extracting-tables
xberg-io
Use when extracting tabular data from PDFs, spreadsheets, or images.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg
xberg-io
Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-batch-extraction
xberg-io
Use when extracting from many files at once with shared config, bounded parallelism, per-file overrides, and error recovery.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-extracting-keywords
xberg-io
Use when extracting keywords (YAKE/RAKE) from documents — and, secondarily, when detecting document language or generating embeddings for RAG and search.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
config-loading-precedence
xberg-io
How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, project config walk-up, user config fallback, field-level inline JSON merge…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
crate-structure
xberg-io
The Xberg workspace layout — the version source of truth (root Cargo.toml [workspace.package] version), the 19 workspace members and 3 excluded crates, the…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
wasm-constraints
xberg-io
WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
feature-flag-policy
xberg-io
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x86_64 emulator), type-only and tract inference companion features…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
mime-detection-routing
xberg-io
MIME type detection and extractor routing in core/mime.rs — the FORMATS registry that EXT_TO_MIME and SUPPORTED_MIME_TYPES are derived from, the path-based…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
alef-generated-bindings
xberg-io
Alef-managed generated bindings in packages/* and binding crates — the regeneration workflow (task alef:generate / alef:verify), the alef.toml section layout…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-extracting-with-ocr
xberg-io
Use when extracting text from scanned PDFs, photographed pages, or images that have no embedded text layer.
SkillAFreshness: A★ 9.4KClaude Code +9
Signals
- Stars
- 9,441
- Forks
- 600
- Open issues
- 7
- Last commit (this folder)
- Oct 23, 2026 (8 days ago)
- Last release
- Oct 13, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/xberg-io/xberg
- Website
- docs.xberg.io
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.769score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.406score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9
More from xberg-io
- 0.769score
feature-flag-policy
xberg-io
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x86_64 emulator), type-only and tract inference companion features…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
crate-structure
xberg-io
The Xberg workspace layout — the version source of truth (root Cargo.toml [workspace.package] version), the 19 workspace members and 3 excluded crates, the…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
config-loading-precedence
xberg-io
How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, project config walk-up, user config fallback, field-level inline JSON merge…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
alef-generated-bindings
xberg-io
Alef-managed generated bindings in packages/* and binding crates — the regeneration workflow (task alef:generate / alef:verify), the alef.toml section layout…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
wasm-constraints
xberg-io
WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
mime-detection-routing
xberg-io
MIME type detection and extractor routing in core/mime.rs — the FORMATS registry that EXT_TO_MIME and SUPPORTED_MIME_TYPES are derived from, the path-based…
SkillAFreshness: A★ 9.4KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get xberg-chunking running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
xberg-chunking skill. Agent Mart. https://agentmart.dev/skills/xberg-io-xberg-chunking-de2be9 (last updated 2026-10-24)