chunking-embeddings

chunking-embeddings is a skill for Claude Code from xberg-io/xberg. It costs 13 tokens per session (1,406 once invoked), scanned A, original, MIT.

Guidance for splitting documents into smaller pieces, creating numerical representations of text, and connecting those steps to a retrieval-augmented generation system. Retrieval-augmented generation lets an AI find relevant stored text before answering.

In plain words
What is it for?
Use it when changing text or Markdown splitting, semantic grouping, embedding generation, heading metadata, or retrieval-related processing in the Rust project.
Why use it?
It clarifies the available splitting methods, where the code lives, and how document pieces and their representations move through the extraction process.

Skill for Claude Code

Written for Claude Code: paths in frontmatter.

Good fit Use it when changing text or Markdown splitting, semantic grouping, embedding generation, heading metadata, or retrieval-related processing in the Rust project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/xberg/chunking-embeddings
About the project

Xberg is a document-intelligence engine that reads files, URLs, archives, and source trees and extracts text, metadata, images, tables, and structured data, with additional code-language understanding. Developers use it through language bindings, a command-line tool, REST API, or MCP server, and the catalogue entries support those integrations.

xberg-io/xberg · 9,629 stars · on GitHub · docs.xberg.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xberg-io/xberg --skill chunking-embeddings
Clone the repo
git clone --depth 1 https://github.com/xberg-io/xberg

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chunking-embeddings

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/xberg/chunking-embeddings/github.svg)](https://agentmods.dev/skills/xberg-io/xberg/chunking-embeddings)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/xberg/chunking-embeddings"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/chunking-embeddings/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chunking-embeddings

Your own site · 80×15
<a href="https://agentmods.dev/skills/xberg-io/xberg/chunking-embeddings"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/chunking-embeddings.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.01406
Opus 5.5 $0.00005 $0.00562
Sonnet 5.5 $0.00003 $0.00281
Haiku 4.5 $0.00001 $0.00141

Measured 29d ago against content hash e46b7ccdaa75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

chunking-embeddings scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai-rulez/skills/chunking-embeddings/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chunking & Embeddings

Text splitting, ONNX/static embedding generation, RAG pipeline integration

Locations: crates/xberg/src/chunking/ and crates/xberg/src/embeddings/ (both directories, not single files).

Chunking

ExtractionConfig.chunking: Option<ChunkingConfig> drives it. The standalone entry points are chunking::chunk_text(text, &ChunkingConfig, page_boundaries) -> Result<ChunkingResult> (chunking/core.rs) and chunking::rag::chunk_for_rag(text, &ChunkingConfig) (chunking/rag.rs), which upgrades ChunkerType::Text to Markdown and fills each chunk's heading_path.

ChunkingResult { chunks: Vec<Chunk>, chunk_count: usize }. Chunk carries content, chunk_type, metadata, and the optional vectors embedding, sparse_embedding, late_interaction (types/extraction.rs).

ChunkerType — there is no strategy enum beyond this

Text (default), Markdown, Yaml, Semantic (core/config/processing.rs). Semantic splits at embedding-based topic shifts when an EmbeddingConfig is present, and falls back to a structural-boundary heuristic otherwise — topic_threshold has no effect on the fallback path.

ChunkingConfig fields and their serde wire names

Field Wire name (config file) Default
max_characters max_chars (alias max_characters) 1000
overlap max_overlap (alias overlap) 200
trim trim true
chunker_type chunker_type Text
preset preset none

The renames are load-bearing: a config file that writes max_characters works only via the alias, and a typo'd key is silently ignored (see config-loading-precedence).

Presets set chunk size AND the embedding model

ChunkingConfig.preset resolves through resolve_preset(), which is #[cfg(feature = "embeddings")]-gated — without that feature it is a no-op and the preset name does nothing. A preset overrides max_characters and overlap and, if no embedding config was given, selects the model.

Read the full file on GitHub · 119 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago Changed · -19 tokens per session e46b7ccdaa75
  2. 1mo ago Changed · -2 tokens per session a2d56c6282c0
  3. 1mo ago Changed · +3 lines · +24 tokens per session 2125097fe03d
  4. 1mo ago Changed · +6 lines · -6 tokens per session 9957616ad7e6
  5. 3mo ago First seen · 110 lines · 16 tokens per session scan A 89cbfd1aecb0

Subscribe to this mod's changes

chunking-embeddings is a skill published in the GitHub repository xberg-io/xberg (9,629 stars, last pushed today), licensed MIT. It adds 13 tokens to every session and 1,406 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

chunking-embeddings compared with skills from other repositories

chunking-embeddings next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chunking-embeddingsxberg-io/xbergSkill9.6ktodayMITA13Claude Code
mcp-builderShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A123Claude Code, Codex
thinking-out-loudShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0A206Claude Code, Codex
advisor-orchestrator-workerShubhamsaboo/awesome-llm-appsSkill146ktodayApache-2.0C100Claude Code, Codex
rag-knowledgevstorm-co/full-stack-ai-agent-templateSkill2.0k2d agoMITA76Claude Code
sovereign-economics-enginewinstonkoh87/Athena-PublicSkill655yesterdayMITA43Claude Code, Codex
ragRailtownAI/railtracksSkill234yesterdayMITA39Claude Code