Agent skill

Text Truncator

by VanGong1999 in VanGong1999/screen-creative-skills

Intelligently truncate text while preserving content integrity and semantic coherence.

MITAuto-check passed

Install Text Truncator

skills CLI
$ npx skills add VanGong1999/screen-creative-skills --skill text-truncator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VanGong1999/screen-creative-skills text-truncator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VanGong1999/screen-creative-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/english-version/category/tools/text-truncator .claude/skills/text-truncator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
text-truncator
GitHub stars
446
Token cost
~1.1k tokens
SKILL.md length
307 words
Files
2 (incl. references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

Intelligently truncate text while preserving content integrity and semantic coherence.

  • SKILL.md covers Functionality, Usage Scenarios, Core Capabilities and Input Requirements, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Text Truncator is an agent skill from VanGong1999/screen-creative-skills. Intelligently truncate text while preserving content integrity and semantic coherence. Suitable for long text preprocessing, ensuring text does not exceed specified length limits

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`). Compatibility notes: Claude Code 1.0+

The repository describes itself as: Skills for Film and Television Creation Agents|31 个影视创作评估策划Agent Skills|AI影视自动化工作流|竖屏短剧长剧IP改编|情节题材提炼|剧本小说IP创作策划评估|人物小传|拉片人物剧集故事五元素分析|大纲生成|. The licence is MIT.

Example prompts

  • “/text-truncator”

Requirements

  • Compatibility (from SKILL.md): Claude Code 1.0+

What it can do on your machine

Read from SKILL.md and the folder at commit 6ced54f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code 1.0+

    From compatibility in the SKILL.md frontmatter.

Context cost

Text Truncator loads about 1.1k tokens when it runs, and up to ~1.7k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 307 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from VanGong1999/screen-creative-skills at commit 6ced54f, republished under its MIT licence (© VanGong1999). 307 words, ~1,065 tokens.

Download SKILL.mdSave it as .claude/skills/text-truncator/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
text-truncator
description
Intelligently truncate text while preserving content integrity and semantic coherence. Suitable for long text preprocessing, ensuring text does not exceed specified length limits
compatibility
Claude Code 1.0+
category
tools
version
2.1.0
last_updated
2026-01-11
license
MIT
maintainer
Gong Fan
model
opus

Text Truncator Tool

Functionality

Intelligently truncate text while maintaining content integrity and semantic coherence, limiting text to a specified length.

Usage Scenarios

  • Preprocess text that exceeds length limits to meet agent input requirements
  • Extract key sections for text previews or summary generation to improve efficiency and readability
  • Assist content creation by intelligently trimming generated long text to avoid redundancy

Core Capabilities

  • Semantic-Priority Truncation: Prioritize truncation at natural semantic boundaries (periods, question marks, exclamation points) to maximize sentence integrity
  • Paragraph Integrity: When semantic boundaries are insufficient, prioritize truncation at paragraph ends or line breaks to avoid breaking paragraph structure
  • Precise Length Control: Strictly adhere to user-specified maximum length limits, ensuring output text does not exceed limits
  • Truncation Marker Insertion (optional): Automatically add custom truncation markers (such as "...") at the end of truncated text to indicate content omission

Input Requirements

  • Text Content: Original text to be truncated (string)
  • Maximum Length Limit: Maximum length after text truncation (integer, such as character count or token count)
  • Truncation Marker (optional): Custom truncation marker, such as "..." or "[content truncated]"

Output Format

[Text Truncation Report]

- Original text length: [integer] words/tokens
- Truncated length: [integer] words/tokens
- Truncation position: [position description, such as "at end of sentence X"] or "not truncated"

### Truncated Text
[truncated text content]

Constraints

  • Truncated text length must strictly comply with maximum length limits
  • Ensure truncated text remains as semantically coherent and complete as possible
  • If text does not reach maximum length, do not truncate; return original text
  • Output format must be structured, clearly displaying length information before and after truncation and truncated text content

Examples

See {baseDir}/references/examples.md for more detailed examples:

  • examples.md - Contains truncation examples for different lengths, different truncation markers, and complex text structures

Detailed Documentation

See {baseDir}/references/examples.md for detailed guidance and cases on the text truncator tool.


Version History

VersionDateChanges
2.1.02026-01-11Optimized description field; changed model to opus; optimized descriptions for functionality, core capabilities, input requirements, and output format; added usage scenarios, constraints, examples, and detailed documentation sections
2.0.02026-01-11Restructured according to official specifications
1.0.02026-01-10Initial version

© VanGong1999, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in english-version/category/tools/text-truncator of VanGong1999/screen-creative-skills.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit 6ced54f

Compare with similar skills

Text Truncator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Text Truncator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Text Truncator this skillVanGong1999/screen-creative-skills446—~1.1kAutomated safety check: PassMIT
Building Threat Intelligence Feed Integrationmukul975/Anthropic-Cybersecurity-Skills34k—~2.8kAutomated safety check: PassApache-2.0
Integration Testingthedaviddias/Front-End-Checklist74k—~514Automated safety check: PassMIT
API Integrationsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Labarchive Integrationdavila7/claude-code-templates33k10 repos~2.3kAutomated safety check: PassMIT
Robius Matrix Integrationsickn33/agentic-awesome-skills47k2 repos~3.6kAutomated safety check: PassMIT

Similar skills

  • Building Threat Intelligence Feed Integration

    mukul975/Anthropic-Cybersecurity-Skills

    Builds automated threat intelligence feed integration pipelines connecting STIX/TAXII feeds, open-source threat intel, and commercial TI platforms into SIEM and security tools for real-time IOC…

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Integration Testing

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing CI coverage, automated checks, or test strategy related to Write integration tests for key workflows.

    74k GitHub stars~514 tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • API Integration

    sickn33/agentic-awesome-skills

    Designs event-driven architectures, webhook systems, API chaining flows, ETL pipelines, and integration patterns between services.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check passed
  • Labarchive Integration

    davila7/claude-code-templates

    Electronic lab notebook API integration. An agent skill from davila7/claude-code-templates.

    33k GitHub starsUsed in 10 repos~2.3k tokens
    Backend & APIsAuto-check passed
  • Robius Matrix Integration

    sickn33/agentic-awesome-skills

    CRITICAL: Use for Matrix SDK integration with Makepad. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • API Integration Architect

    sickn33/agentic-awesome-skills

    Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.

    47k GitHub starsUsed in 1 repo~2.3k tokens
    Backend & APIsAuto-check passed

More from VanGong1999/screen-creative-skills

All 62 skills in this repo
  • Drama Creator

    VanGong1999/screen-creative-skills

    Create vertical short drama scripts covering macro construction, episode writing, precise optimization, and creative ideation using Emotional Spring Theory.

    446 GitHub stars~2.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Drama Workflow

    VanGong1999/screen-creative-skills

    Orchestrate the full plot-point dramatic function analysis pipeline — text preprocessing, parallel segment analysis, result integration, and report generation — for long-form story content.

    446 GitHub stars~850 tokensUpdated 4 mo ago
    Auto-check passed
  • Novel Evaluator

    VanGong1999/screen-creative-skills

    Evaluate and score story text across market potential, innovation attributes, and content highlights dimensions, producing structured scoring reports with development recommendations.

    446 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Script Evaluator

    VanGong1999/screen-creative-skills

    Evaluate film and TV scripts across ideological, artistic, and entertainment value dimensions, producing structured scoring reports with follow-up recommendations.

    446 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Story Five Elements

    VanGong1999/screen-creative-skills

    Analyze five core story elements — genre type, story summary, character biographies, character relationships, and major plot points — producing a structured comprehensive report with optional mind…

    446 GitHub stars~781 tokensUpdated 4 mo ago
    Auto-check passed
  • Character Profile

    VanGong1999/screen-creative-skills

    基于故事文本分析人物特征,生成详细的人物小传。适用于深度理解故事人物设定、为演员塑造角色提供参考、为剧本创作建立人物档案

    446 GitHub stars~609 tokensUpdated 4 mo ago
    Auto-check passed

Questions about Text Truncator

What does Text Truncator do?

Intelligently truncate text while preserving content integrity and semantic coherence. Text Truncator is an agent skill from VanGong1999/screen-creative-skills. Intelligently truncate text while preserving content integrity and semantic coherence.

How do I install Text Truncator in Claude Code?

Run `npx skills add VanGong1999/screen-creative-skills --skill text-truncator -a claude-code`. Or copy the skill folder (english-version/category/tools/text-truncator in VanGong1999/screen-creative-skills) into .claude/skills/text-truncator in your project. Claude Code loads it when a task matches its description.

How do I install Text Truncator in Codex?

Run `npx skills add VanGong1999/screen-creative-skills --skill text-truncator -a codex`. Or copy the skill folder (english-version/category/tools/text-truncator in VanGong1999/screen-creative-skills) into .agents/skills/text-truncator in your project. Codex loads it when a task matches its description.

Can I use Text Truncator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VanGong1999/screen-creative-skills --skill text-truncator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/text-truncator, .gemini/skills/text-truncator, .github/skills/text-truncator and .opencode/skills/text-truncator in your project.

What does Text Truncator need to run?

SKILL.md names no scripts, command-line tools or credentials: Text Truncator is instructions for the agent only. Compatibility (from SKILL.md): Claude Code 1.0+.

Does Text Truncator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Text Truncator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Text Truncator use?

Text Truncator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Text Truncator use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 605 tokens, read only when the agent opens those files.

What are the alternatives to Text Truncator?

Skills that share tags, products or a category with Text Truncator: Building Threat Intelligence Feed Integration (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Integration Testing (thedaviddias/Front-End-Checklist, 74k stars), API Integration (sickn33/agentic-awesome-skills, 47k stars) and Labarchive Integration (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Text Truncator?

VanGong1999 (a GitHub user) maintains it in VanGong1999/screen-creative-skills, which has 446 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on May 26, 2026.

Source: VanGong1999/screen-creative-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.