
Text Summarizer
Shrink long research notes, articles, or doc dumps into ratio-, sentence-, or word-limited summaries with TextRank, LSA, or frequency extractors.
Overview
Text Summarizer is an agent skill most often used in Build (also Idea research and Grow content) that generates extractive summaries from long text with configurable length and multiple ranking algorithms.
Install
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill text-summarizerWhat is this skill?
- Extractive summarization with TextRank, LSA, and frequency-based methods
- Length control by ratio, sentence count, or max words
- Key-points extraction and optional sentence-order preservation
- Batch processing across multiple documents or files
- Python API: TextSummarizer, summarize_file, and language option
- 3 summarization algorithms: TextRank, LSA, frequency-based
- 3 length modes: ratio, sentence count, word count
Adoption & trust: 699 installs on skills.sh; 60 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have pages of source text but need a short, faithful summary your agent can act on without rewriting facts.
Who is it for?
Solo builders batching research articles, support logs, or internal docs into briefing notes before implementation or content reuse.
Skip if: Teams needing abstractive marketing copy, multilingual nuance without testing, or summaries without running the bundled Python scripts in their environment.
When should I use this skill?
You need extractive summaries from long text or files with controlled length, key-point bullets, or batch document processing.
What do I get? / Deliverables
You get ratio-, sentence-, or word-bounded summaries and optional key-point lists ready to paste into plans, tickets, or prompts.
- Ratio-, sentence-, or word-capped summary strings
- Optional key-point bullet lists
- Batch summaries across multiple inputs
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Documentation and knowledge ingestion sit in Build; summarization is the canonical shelf for turning raw text into agent-ready briefs. Docs is where solo builders distill specs, READMEs, and pasted research before coding or shipping updates.
Where it fits
Condense three competitor blog posts into five sentences each before updating your positioning doc.
Summarize a long internal RFC to 100 words for the agent implementation plan.
Extract bullet key points from user interview transcripts to lock MVP scope.
Batch-summarize source articles into outlines for a weekly newsletter draft.
How it compares
Use for sentence-level extraction with length knobs—not as a replacement for full RAG pipelines or LLM-only paraphrase summaries.
Common Questions / FAQ
Who is text-summarizer for?
Indie developers and agent users who process long plaintext or files locally and want deterministic, extractive cuts rather than open-ended chat summarization.
When should I use text-summarizer?
During Idea research to condense competitor pages, in Build/docs to shorten specs before coding, and in Grow/content when turning source material into outlines—whenever length control and algorithm choice (TextRank, LSA, frequency) matter.
Is text-summarizer safe to install?
It is primarily local Python processing on text you provide; review the Security Audits panel on this Prism page and inspect scripts/text_summarizer before running on sensitive documents.
SKILL.md
READMESKILL.md - Text Summarizer
# Text Summarizer Create concise summaries from long text documents using extractive summarization. Identifies and extracts the most important sentences while preserving meaning. ## Quick Start ```python from scripts.text_summarizer import TextSummarizer # Summarize text summarizer = TextSummarizer() summary = summarizer.summarize(long_text, ratio=0.2) # 20% of original print(summary) # Summarize file summary = summarizer.summarize_file("article.txt", num_sentences=5) ``` ## Features - **Extractive Summarization**: Selects key sentences from original text - **Length Control**: By ratio, sentence count, or word count - **Multiple Algorithms**: TextRank, LSA, frequency-based - **Key Points**: Extract bullet-point summaries - **Batch Processing**: Summarize multiple documents - **Preserve Structure**: Maintains sentence order option ## API Reference ### Initialization ```python summarizer = TextSummarizer( method="textrank", # textrank, lsa, frequency language="english" ) ``` ### Summarization ```python # By ratio (20% of original length) summary = summarizer.summarize(text, ratio=0.2) # By sentence count summary = summarizer.summarize(text, num_sentences=5) # By word count summary = summarizer.summarize(text, max_words=100) ``` ### Key Points Extraction ```python # Get bullet points points = summarizer.extract_key_points(text, num_points=5) for point in points: print(f"• {point}") ``` ### Batch Processing ```python # Summarize multiple texts texts = [text1, text2, text3] summaries = summarizer.summarize_batch(texts, ratio=0.2) # Summarize files in directory summaries = summarizer.summarize_directory("./articles/", ratio=0.3) ``` ### Options ```python # Preserve original sentence order summary = summarizer.summarize(text, preserve_order=True) # Include title/first sentence summary = summarizer.summarize(text, include_first=True) # Minimum sentence length filter summarizer.min_sentence_length = 10 ``` ## CLI Usage ```bash # Summarize text file python text_summarizer.py --input article.txt --ratio 0.2 # Specific sentence count python text_summarizer.py --input article.txt --sentences 5 # Extract key points python text_summarizer.py --input article.txt --points 5 # Batch process python text_summarizer.py --input-dir ./docs --output-dir ./summaries --ratio 0.3 # Output to file python text_summarizer.py --input article.txt --output summary.txt --ratio 0.2 ``` ### CLI Arguments | Argument | Description | Default | |----------|-------------|---------| | `--input` | Input file path | Required | | `--output` | Output file path | stdout | | `--input-dir` | Directory of files | - | | `--output-dir` | Output directory | - | | `--ratio` | Summary ratio (0.0-1.0) | 0.2 | | `--sentences` | Number of sentences | - | | `--words` | Maximum words | - | | `--points` | Extract N key points | - | | `--method` | Algorithm to use | textrank | | `--preserve-order` | Keep sentence order | False | ## Examples ### News Article Summary ```python summarizer = TextSummarizer() article = """ [Long news article text...] """ # Get a 3-sentence summary summary = summarizer.summarize(article, num_sentences=3) print("Summary:") print(summary) # Get key points points = summarizer.extract_key_points(article, num_points=5) print("\nKey Points:") for i, point in enumerate(points, 1): print(f"{i}. {point}") ``` ### Research Paper Abstract ```python summarizer = TextSummarizer(method="lsa") paper = open("research_paper.txt").read() # Create abstract-length summary abstract = summarizer.summarize(paper, max_words=250) print(abstract) ``` ### Meeting Notes Summary ```python summarizer = TextSummarizer() notes = """ Meeting started at 2pm. John presented Q3 results showing 15% growth. Sarah raised concerns about supply chain delays affe