Automated summary
This tool trims a long text (typically a novel) to a maximum character count, preferring to cut at sentence ends and then at paragraph breaks.
Strengths
- Explicit truncation priority: sentence-ending punctuation first, then spaces/newlines, then the hard length limit
- Never cuts in the middle of a word
- Returns a structured report with original length, final length, cut location, and the truncated text
- Optional, customizable truncation marker such as "[...]"
Limitations
- No allowed tools: the agent must perform the truncation purely by reasoning over the supplied text
- Does not split into multiple chunks or summarize; one cut per invocation
- Documentation points to an external references/examples.md file whose contents are not included here
Use it when a long narrative text must be brought under a character ceiling before being passed to another agent or to a model with a limited context window.
Avoid it when you need a summary, chapter splitting, or rewriting of the text rather than a clean cut.
Security analysis
SafeThe skill only provides instructions for truncating text within a maximum length. It declares no tools and does not involve executing commands, accessing network resources, handling secrets, or performing destructive actions. The content is purely textual guidance for an AI agent.
No concerns found
How this analysis is madeExamples
Voici le texte d'un chapitre de roman. Merci de le tronquer à 2000 caractères maximum, en coupant de préférence à la fin d'une phrase, et d'ajouter le marqueur « [...] » à la fin.Mon texte fait 15000 caractères, mais l'agent suivant ne peut en recevoir que 4000. Coupe-le proprement à la fin d'un paragraphe et donne-moi le rapport de troncature avec la longueur d'origine et la longueur finale.Tronque ce passage à 500 caractères sans jamais couper au milieu d'un mot, et indique précisément où la coupure a été effectuée (phrase, espace ou limite stricte).name: novel-truncator description: 智能截断文本,保持内容完整性。适用于小说文本预处理、确保文本不超过指定长度限制 category: novel-screening version: 2.1.0 last_updated: 2026-01-11 license: MIT compatibility: Claude Code 1.0+ maintainer: 宫凡 allowed-tools: [] model: opus changelog:
- version: 2.1.0
date: 2026-01-11
changes:
- type: improved content: 优化 description 字段,使其更精简并符合命令式语言规范
- type: improved content: 优化功能、使用场景、截断原则、输入要求、输出格式的描述,使其更符合命令式语言规范
- type: added content: 添加约束条件、示例和详细文档部分
- type: changed content: 模型更改为 opus
- version: 2.0.0
date: 2026-01-11
changes:
- type: breaking content: 按照 Agent Skills 官方规范重构
- type: improved content: 优化 description,使用命令式语言,精简主内容
- type: added content: 添加 license、compatibility 可选字段
- version: 1.0.0
date: 2026-01-10
changes:
- type: added content: 初始版本
文本截断工具(小说版)
功能
接收文本内容与最大长度限制,智能截断文本,保持内容完整性。
使用场景
- 对长篇小说文本进行预处理,使其符合长度限制。
- 在不破坏语义完整性的前提下,截取文本片段。
- 确保输入到其他智能体的文本不超过其处理能力。
截断原则
- 优先句子结束: 在句号、问号、感叹号处断开。
- 其次段落结束: 在空格、换行符处断开。
- 最后指定长度: 确保不超过设定的最大长度限制。
输入要求
- 文本内容: 待截断的原始文本(字符串)。
- 最大长度限制: 目标文本的最大字符数(整数)。
- 截断标记(可选): 用于标识文本截断位置的字符串,如 "[...]"。
输出格式
【文本截断报告】
原始长度:[字符数]
截断后长度:[字符数]
截断位置:[位置描述,如:在第 X 句句号处]
截断后的文本:
[文本内容]
约束条件
- 截断过程应最大限度地保留原文的语义和语境完整性。
- 严格遵守最大长度限制。
- 避免在词语中间进行截断。
示例
参见 {baseDir}/references/examples.md 目录获取更多详细示例:
examples.md- 包含不同截断场景(如按句子、按段落、强制截断)的详细示例。
详细文档
参见 {baseDir}/references/examples.md 获取关于文本截断工具的详细指导与案例。
版本历史
| 版本 | 日期 | 变更 | |------|------|------| | 2.1.0 | 2026-01-11 | 优化 description 字段,使其更精简并符合命令式语言规范;优化功能、使用场景、截断原则、输入要求、输出格式的描述,使其更符合命令式语言规范;添加约束条件、示例和详细文档部分;模型更改为 opus。 | | 2.0.0 | 2026-01-11 | 按官方规范重构 | | 1.0.0 | 2026-01-10 | 初始版本 |
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/intelligent-text-truncator-mmh8qqxo' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/intelligent-text-truncator-mmh8qqxo/download' --output '.skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md.part' && mv '.skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md.part' '.skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Environment declared by the author: Claude Code 1.0+
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md' && test -s '.skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/novel-truncator' && cp -R '.skill-downloads/intelligent-text-truncator-mmh8qqxo' '.claude/skills/novel-truncator'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/intelligent-text-truncator-mmh8qqxo'openskills read 'intelligent-text-truncator-mmh8qqxo'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/intelligent-text-truncator-mmh8qqxo/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Writing Fragments
Content
Mine raw writing fragments through a relentless interview, without imposing structure. Capture ideas, quotes, and leading words for later use.
UI Copywriting & Auditing
Content
Write or audit user-facing UI copy including buttons, errors, empty states, and tooltips across the monorepo, following the design system source of truth.
Music MIDI Extraction
Content
Extracts the MIDI or score from an existing music production via the CogMusic MCP tool and confirms availability.