home / skills / rscheiwe / open-skills / text-summarizer

text-summarizer skill

/examples/text-summarizer

This skill summarizes long text into concise bullet points and a statistics report to save time and improve comprehension.

npx playbooks add skill rscheiwe/open-skills --skill text-summarizer

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.5 KB
---
name: text_summarizer
version: 1.0.0
entrypoint: scripts/main.py
description: Summarizes long text into key bullet points
inputs:
  - type: text
    name: text
    description: Long text to summarize
  - type: integer
    name: max_points
    description: Maximum number of bullet points (default 5)
    optional: true
outputs:
  - type: text
    name: summary
    description: Summary in bullet points
  - type: object
    name: stats
    description: Statistics about the text
tags: [nlp, summarization, text, processing]
allow_network: false
timeout_seconds: 30
---

# Text Summarizer Skill

A more complex example that demonstrates text processing capabilities.

## What it does

This skill takes a long piece of text and:
1. Analyzes the text (word count, sentence count, etc.)
2. Extracts key points
3. Creates a bullet-point summary
4. Generates a statistics report

## Usage

### Input

```json
{
  "text": "Your long text here...",
  "max_points": 5
}
```

### Output

```json
{
  "summary": "• Point 1\n• Point 2\n• Point 3",
  "stats": {
    "word_count": 150,
    "sentence_count": 8,
    "avg_sentence_length": 18.75
  }
}
```

## Artifacts

- `summary.md`: Markdown file with the formatted summary
- `stats.json`: JSON file with detailed statistics

## Algorithm

This is a simple implementation that:
1. Splits text into sentences
2. Scores sentences by length and position
3. Selects top N sentences as summary points

*Note: This is a demonstration. For production use, consider using NLP libraries like spaCy or transformers.*

Overview

This skill summarizes long text into concise, actionable bullet points and produces basic text statistics. It extracts key sentences, formats a clean bullet summary, and returns a small stats report such as word and sentence counts. The output includes both a human-friendly summary and machine-friendly stats for downstream processing.

How this skill works

The skill splits the input into sentences, computes simple scores (based on length and position), and ranks sentences to pick the top N points. It generates a bullet-point summary and a JSON object with statistics like word_count, sentence_count, and average sentence length. Optional artifacts include a Markdown summary file and a JSON stats file for archiving or sharing.

When to use it

  • You need a quick, readable summary of a long article, report, or meeting transcript.
  • Preparing executive highlights from verbose content for presentations or emails.
  • Pre-processing long documents before feeding into downstream pipelines or search indexes.
  • Extracting main ideas from user-submitted content in apps or chatbots.
  • Generating condensed notes for research literature or technical docs.

Best practices

  • Provide clean, well-punctuated text for more accurate sentence splitting.
  • Set max_points to control summary length; tune for desired granularity.
  • Use this skill for fast, extractive summaries; consider NLP models for abstractive needs.
  • Combine the stats output with other tooling to track content trends over time.
  • For production, integrate with dedicated NLP libraries if you need advanced semantic scoring.

Example use cases

  • Summarize long blog posts into 3–5 bullet points for social sharing.
  • Turn meeting transcripts into concise action-oriented highlights.
  • Create quick summaries of academic abstracts or literature reviews.
  • Auto-generate content previews for document management systems.
  • Produce lightweight summaries for mobile push notifications.

FAQ

What input does the skill require?

A text string and an optional max_points integer to limit bullet count.

Is the summary abstractive or extractive?

It is extractive: it selects and formats top-ranked sentences rather than generating new wording.