text-splitter

Split long text into uniform chunks at sentence or paragraph boundaries.

330|71|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/GongLingRui/screen-creative-skills --skill text-splitter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: text-splitter
Source: https://github.com/GongLingRui/screen-creative-skills/tree/main/category/tools/text-splitter
Command: npx skills add https://github.com/GongLingRui/screen-creative-skills --skill text-splitter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

将文本分割成指定大小的块,保持语义完整性。适用于长文本批处理、将文本分割为可处理的片段。

Core Features & Use Cases

  • 语义完整性优先: 在分割时尽量避免截断句子或段落,优先在自然边界处分割,确保每个块的语义完整性。
  • 可定制分割策略: 支持按句子、按段落或按自定义策略分割,确保输出块大小可控。
  • 应用场景广泛: 文本预处理、长文档分析、下游 NLP 模型输入分块等。

Quick Start

将输入文本按指定大小分割为若干块,优先在句子边界处断开,同时尽量保持语义完整。

Frequently Asked Questions about text-splitter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split long text into chunks while keeping semantic boundaries intact?

Text splitting preserves semantic boundaries by prioritizing natural sentence and paragraph breaks. It segments long-form content into uniform chunks while validating inputs, ensuring each piece retains contextual completeness for downstream processing.

What is the best way to preprocess long documents for NLP tasks with size limits?

Batch processing long documents involves splitting text into specified chunk sizes using sentence or paragraph strategies. This preprocessing standardizes text segments and returns chunk metadata, preparing uniform inputs for NLP models.

Can I customize the chunk size and splitting strategy for different text formats?

Customizable splitting strategies support sentence-based and paragraph-based segmentation. You specify the target chunk size, and the tool applies the chosen strategy to break long text at natural boundaries while maintaining control over output dimensions.

Does text splitting work for batch processing multiple long-form documents?

Batch processing long-form content is supported by validating inputs and applying consistent chunking rules. It processes extensive text collections by segmenting each document into manageable, semantically complete blocks suitable for downstream tasks.

Why does my text chunking cut off sentences in the middle of a phrase?

Chunking may truncate phrases if a pure size-limit strategy is applied without semantic prioritization. Using a sentence or paragraph splitting strategy ensures breaks occur at natural boundaries, preventing mid-sentence fragmentation.