Skip to main content

text-truncator

Intelligently truncate text while preserving content integrity and semantic coherence. Suitable for long text preprocessing, ensuring text does not exceed specified length limits

설치로 이동

소스 정보

저장소
VanGong1999/screen-creative-skills
최근 소스 활동
2026년 1월 11일 08:00
감지된 SKILL.md 언어
영어
스타
415
포크
81

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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
category
tools
version
2.1.0
last_updated
2026-01-11T00:00:00.000Z
license
MIT
compatibility
Claude Code 1.0+
maintainer
Gong Fan
allowed-tools
[]
model
opus
changelog
[{"version":"2.1.0","date":"2026-01-11T00:00:00.000Z","changes":["[Truncated]","[Truncated]","[Truncated]","[Truncated]"]},{"version":"2.0.0","date":"2026-01-11T00:00:00.000Z","changes":["[Truncated]","[Truncated]","[Truncated]"]},{"version":"1.0.0","date":"2026-01-10T00:00:00.000Z","changes":["[Truncated]"]}]
# 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 | Version | Date | Changes | |---------|------|---------| | 2.1.0 | 2026-01-11 | Optimized 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.0 | 2026-01-11 | Restructured according to official specifications | | 1.0.0 | 2026-01-10 | Initial version |
GitHub에서 보기