token-aware-chunking SKILL.md skillA
token-aware-chunking from alivirgo/major-ai-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add alivirgo/major-ai-skills/token-aware-chunking@git:20260911.25436b5Pins git:20260911.25436b5 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- alivirgo/major-ai-skills
- Path
plugins/mas-efficiency-pack/skills/token-aware-chunking/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260911.25436b5, committed Sep 11, 2026
- First version recorded
- Aug 26, 2026
- Size
- 6,033 bytes
- Repository stars
- 2
- License
- MIT
Split source code and documentation at semantic boundaries while respecting the target tokenizer's size limits.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Token-Aware Semantic Chunking Protocol (Boundary-Aligned RAG Slicing) ## Overview When indexing documentation or codebases for vector search and RAG retrieval, naive splitters slice text by fixed character counts (*`text[i:i+2000]`*). Fixed-character chunking causes severe retrieval degradations: 1. **Broken Code Blocks**: Splits a TypeScript interface or Python function midway through its body, creating unparseable syntax fragments. 2. **Mid-Word Token Clipping**: Slices words across token boundaries, corrupting embedding vector representations. 3. **Embedding Model Ceiling Exceedance**: A character count that translates to 8,250 tokens gets silently truncated by an embedding model with an 8,192-token ceiling. The **Token-Aware Semantic Chunking Protocol** measures chunk size strictly using the **target tokenizer (`tiktoken` / BPE)** and splits text recursively along **semantic boundaries (Markdown Headers, AST Function Blocks, Double Newlines)**. --- ## Fixed-Character Slicing vs. Token-Aware Semantic Chunking ``` ┌─────────────────────────────────────────────────────────────┐ │ Text Chunking Mechanics │ …
Read the whole file at its exact version.
How to install
mdr add alivirgo/major-ai-skills/token-aware-chunking@sha256:9443023b51f93839The line at the top of this page pins the label git:20260911.25436b5, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_x3awpdawv6ih3fsw)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Aug 26, 2026 and Sep 11, 2026, about one every 16 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260911.25436b5 latest | 2026-09-11 | 25436b5 | 6,033 B | A | view · diff |
| git:20260826.1e28b95 | 2026-08-26 | 1e28b95 | 6,128 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (6033 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
alivirgo/major-ai-skills · 2 stars · license MIT · pushed 2026-10-21 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_x3awpdawv6ih3fsw GET https://markdownregistry.com/api/v1/resolve?ref=alivirgo/major-ai-skills/token-aware-chunking GET https://markdownregistry.com/api/v1/blob/9443023b51f9383933bdc84ea91b75309d96026abfb94bad47c554dc110e74a6
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.