chunking-embeddings

chunking-embeddings is a skill for Claude Code, Codex from xberg-io/xberg. It costs 16 tokens per session (1,339 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 CodeCodex

Written for no agent in particular: nothing here depends on one.

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,275 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, Codex.

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 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,339 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.00016 $0.01339
Opus 5 $0.00008 $0.00669
Sonnet 5 $0.00003 $0.00268
Haiku 4.5 $0.00002 $0.00134

Measured 9d ago against content hash 89cbfd1aecb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 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 · 110 lines

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. 9d 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,275 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 1,339 once invoked, about $0.0001 per session on Opus 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

Other skills, from other repositories

cuml-machine-learning

Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.

langchain-ai/deepagents · 43 tokens

optimize-for-gpu

GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…

K-Dense-AI/scientific-agent-skills · 151 tokens

thinking-out-loud

A contract for what the agent does when a long, messy, stream-of-consciousness ramble arrives (usually voice dictation): act on nothing until the echo brief is approved. The echo audits the entire transfer, mission, locked decisions and constraints, open questions, flips and parked tangents, with the model's…

Shubhamsaboo/awesome-llm-apps · 206 tokens

pydantic-ai

Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.

davila7/claude-code-templates · 32 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens