Skip to content
Back to skills

Es

ASecurity

Divide documentos en fragmentos de tokens superpuestos para pipelines RAG y ventanas de contexto LLM. Cero dependencias.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 4, 2026
ai-agentspythongobashgit

Works with

  • cli

Security analysis

A100/100

Scanned September 28, 2026

npx -y skills add ellmos-ai/skills --skill es --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Es?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Es
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ellmos-ai-skills-172a258d/badge)](https://www.skillsdirectory.com/skills/ellmos-ai-skills-172a258d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: document-chunker
version: 1.0.0
type: tool
author: Lukas Geiger
created: 2026-03-12
updated: 2026-03-12
description: Divide documentos en fragmentos de tokens superpuestos para pipelines RAG y ventanas de contexto LLM. Cero dependencias.

standalone: true
anthropic_compatible: true
bach_compatible: true
bach_origin: true
category: utilities
tags: [chunking, rag, tokens, nlp, text-processing, embedding]
language: es
status: active
dependencies: {'tools': [], 'services': [], 'protocols': [], 'python': []}
provenance: {'origin': 'bach', 'origin_path': 'system/tools/document_chunker.py', 'origin_version': '1.0.0', 'origin_repo': 'github.com/ellmos-ai/bach', 'last_sync_from_origin': '2026-03-12', 'last_sync_to_origin': None, 'local_changes_since_sync': False}
---

<img src="../banner.png" width="100%" alt="document-chunker banner">

> **Español** — Versión oficial en español de `document-chunker`.


# Document Chunker (Español)

Divide documentos en fragmentos de tokens superpuestos. Optimizado para pipelines RAG
y ventanas de contexto de LLM. Cero dependencias: solo stdlib de Python + re.

## Uso

### Como biblioteca
```python
from document_chunker import DocumentChunker

chunker = DocumentChunker(chunk_size=400, overlap=80)
chunks = chunker.chunk_text("Long text...")

for chunk in chunks:
    print(f"Chunk {chunk['chunk_id']}: {chunk['tokens']} tokens")
```

### Fragmentar un archivo
```python
chunks = chunker.chunk_document("document.md", source="My Project")
```

### Fragmentar un directorio completo
```python
from document_chunker import chunk_corpus

chunks = chunk_corpus(["doc1.md", "doc2.txt"], source="Corpus")
```

### CLI
```bash
python document_chunker.py document.md    # Single file
python document_chunker.py ./docs/        # Entire directory
```

## Parámetros

| Parámetro | Por defecto | Descripción |
|-----------|-------------|-------------|
| chunk_size | 400 | Máximo de tokens por fragmento |
| overlap | 80 | Tokens de superposición entre fragmentos |

## Tipos de archivo soportados

`.txt`, `.md`, `.py`, `.sh`

## Registro de cambios

### 1.0.0 (2026-03-12)
- Adaptado desde BACH system/tools/document_chunker.py

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.