Skip to content
Back to skills

Novel Truncator

ASecurity

智能截断文本,保持内容完整性。适用于小说文本预处理、确保文本不超过指定长度限制

  • 523 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 20, 2026
ai-agents

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add VanGong1999/screen-creative-skills --skill novel-truncator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Novel Truncator?

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

Security grade badge for Novel Truncator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vangong1999-novel-truncator/badge)](https://www.skillsdirectory.com/skills/vangong1999-novel-truncator)

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: novel-truncator
description: 智能截断文本,保持内容完整性。适用于小说文本预处理、确保文本不超过指定长度限制
license: MIT
---

# 文本截断工具(小说版)

## 功能

接收文本内容与最大长度限制,智能截断文本,保持内容完整性。

## 使用场景

- 对长篇小说文本进行预处理,使其符合长度限制。
- 在不破坏语义完整性的前提下,截取文本片段。
- 确保输入到其他智能体的文本不超过其处理能力。

## 截断原则

1. **优先句子结束**: 在句号、问号、感叹号处断开。
2. **其次段落结束**: 在空格、换行符处断开。
3. **最后指定长度**: 确保不超过设定的最大长度限制。

## 输入要求

- **文本内容**: 待截断的原始文本(字符串)。
- **最大长度限制**: 目标文本的最大字符数(整数)。
- **截断标记**(可选): 用于标识文本截断位置的字符串,如 "[...]"。

## 输出格式

```
【文本截断报告】

原始长度:[字符数]
截断后长度:[字符数]
截断位置:[位置描述,如:在第 X 句句号处]

截断后的文本:
[文本内容]
```

## 约束条件

- 截断过程应最大限度地保留原文的语义和语境完整性。
- 严格遵守最大长度限制。
- 避免在词语中间进行截断。

## 参考资料

- [examples.md](references/examples.md)

Files in this skill

  • SKILL.md3.1 KB
  • references/examples.md2.6 KB
  • scripts/novel_truncator.py13.9 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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