Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add GongLingRui/screen-creative-skills --skill text-truncatorgit clone --depth 1 https://github.com/GongLingRui/screen-creative-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/gonglingrui/screen-creative-skills/text-truncator)<a href="https://agentmods.dev/skills/gonglingrui/screen-creative-skills/text-truncator"><img src="https://agentmods.dev/badge/skills/gonglingrui/screen-creative-skills/text-truncator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/gonglingrui/screen-creative-skills/text-truncator"><img src="https://agentmods.dev/badge/skills/gonglingrui/screen-creative-skills/text-truncator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.01075 |
| Opus 5 | $0.00018 | $0.00537 |
| Sonnet 5 | $0.00007 | $0.00215 |
| Haiku 4.5 | $0.00004 | $0.00108 |
Grade A, and why
text-truncator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
86% identical to drama-evaluator — 143 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
文本截断工具
功能
智能截断文本,在保持内容完整性和语义连贯性的前提下,将文本截断至指定长度。
使用场景
- 对超出长度限制的文本进行预处理,使其符合智能体的输入要求。
- 在展示文本预览或生成摘要时,截取关键部分以提高效率和可读性。
- 辅助内容创作,对生成的长文本进行智能裁剪,避免冗余。
核心能力
- 语义优先截断: 优先在自然语义边界(如句号、问号、感叹号)处进行截断,最大限度地保持句子的完整性。
- 段落完整性: 在语义边界不足时,优先考虑在段落末尾或换行符处截断,避免破坏段落结构。
- 精确长度控制: 严格遵守用户指定的最大长度限制,确保输出文本不会超限。
- 截断标记插入(可选): 可以在截断文本的末尾自动添加自定义截断标记(如"..."),以指示内容有删节。
输入要求
- 文本内容: 待截断的原始文本(字符串)。
- 最大长度限制: 文本截断后的最大长度(整数,如字符数或 token 数)。
- 截断标记(可选): 自定义截断标记,如 "..." 或 "[内容已截断]"。
输出格式
【文本截断报告】
- 原始文本长度: [整数] 字/Token
- 截断后长度: [整数] 字/Token
- 截断位置: [位置描述,如 "在第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 | 初始版本 |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 103 lines · 36 tokens per session scan A 14386a01268c
text-truncator is a skill published in the GitHub repository GongLingRui/screen-creative-skills (402 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 1,075 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to drama-evaluator, differing in 143 lines, and is treated as a copy.
Other skills, from other repositories
a0-development
Develop or operate Agent Zero: projects, chats, tasks, framework, tools and API/WebUI.
frontmcp-development
Use when building any FrontMCP server component other than a tool (for tools, use create-tool). Covers @Resource static resources and parameterized URI templates; @Prompt reusable prompts (RAG, multi-turn); @Provider singleton dependency-injection providers (database pools, API clients); @Agent autonomous LLM agents…
a0-development
Development guide for extending and building features for the Agent Zero AI framework. Covers architecture, tools, extensions, API endpoints, agent profiles, projects, prompts, and skills — with correct paths, imports, and patterns matching the current codebase.
workers-best-practices
Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.
find-journalists
Build, refine, dedupe, and enrich small fit-checked journalist lists for newsjack campaigns. Uses the newsjack CLI (preferred) or the medialyst MCP for news search and journalist enrichment, and falls back to a best-effort local mode with no verified contacts; the agent owns how returned data is organized.
story-origin-check
Recover the first public timestamp and canonical major coverage for a newsjacking signal, then decide whether newer coverage is the same story, a different story, or a materially new development.