text-summarizer▌
dkyazzentwatwa/chatgpt-skills · updated May 29, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Extractive summarization from long documents with flexible length control and batch processing.
- ›Supports three algorithms (TextRank, LSA, frequency-based) with configurable language support
- ›Control summary length by ratio, sentence count, or word count; optionally preserve original sentence order
- ›Extract key points as bullet-point summaries alongside full-text summaries
- ›Batch process multiple documents or entire directories with consistent parameters
- ›Available as Python API or
Text Summarizer
Create concise summaries from long text documents using extractive summarization. Identifies and extracts the most important sentences while preserving meaning.
Quick Start
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
summarizer = TextSummarizer(
method="textrank", # textrank, lsa, frequency
language="english"
)
Summarization
# 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
# Get bullet points
points = summarizer.extract_key_points(text, num_points=5)
for point in points:
print(f"• {point}")
Batch Processing
# 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
# 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
# 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
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
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
summarizer = TextSummarizer()
notes = """
Meeting started at 2pm. John presented Q3 results showing 15% growth.
Sarah raised concerns about supply chain delays affecting Q4 projections.
The team discussed mitigation strategies including dual-sourcing.
Budget allocation for marketing was approved at $50k.
Next steps include vendor outreach by Friday.
Follow-up meeting scheduled for next Tuesday.
"""
summary = summarizer.summarize(notes, num_sentences=3)
points = summarizer.extract_key_points(notes, num_points=4)
print("Summary:", summary)
print("\nAction Items:")
for point in points:
print(f"• {point}")
Batch Document Summarization
summarizer = TextSummarizer()
import os
for filename in os.listdir("./documents"):
if filename.endswith(".txt"):
text = open(f"./documents/{filename}").read()
summary = summarizer.summarize(text, ratio=0.2)
with open(f"./summaries/{filename}", "w") as f:
f.write(summary)
print(f"Summarized: {filename}")
Algorithm Comparison
| Algorithm | Speed | Quality | Best For |
|---|---|---|---|
| TextRank | Medium | High | General text |
| LSA | Fast | Good | Technical docs |
| Frequency | Fast | Medium | Quick summaries |
Dependencies
nltk>=3.8.0
numpy>=1.24.0
scikit-learn>=1.2.0
Limitations
- Extractive only (doesn't paraphrase or generate new text)
- Works best with well-structured text (paragraphs, clear sentences)
- Very short texts may not summarize well
- Doesn't understand context deeply (may miss nuance)
How to use text-summarizer on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add text-summarizer
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches text-summarizer from GitHub repository dkyazzentwatwa/chatgpt-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate text-summarizer. Access the skill through slash commands (e.g., /text-summarizer) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★59 reviews- ★★★★★Xiao Sharma· Dec 28, 2024
Solid pick for teams standardizing on skills: text-summarizer is focused, and the summary matches what you get after install.
- ★★★★★Diya Taylor· Dec 16, 2024
text-summarizer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Ava Huang· Dec 16, 2024
We added text-summarizer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Benjamin Taylor· Dec 8, 2024
text-summarizer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Hiroshi Ramirez· Dec 4, 2024
I recommend text-summarizer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Kiara Khanna· Nov 27, 2024
Registry listing for text-summarizer matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yash Thakker· Nov 23, 2024
text-summarizer has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Kofi Ghosh· Nov 23, 2024
Keeps context tight: text-summarizer is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Ava Yang· Nov 7, 2024
text-summarizer has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Diya Sethi· Nov 7, 2024
Useful defaults in text-summarizer — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 59