
sentiment-analyzer
Analyze text sentiment (positive/negative/neutral) with confidence scores, emotion detection, and visualization. Supports single text, CSV batch, and trend analysis.
- Installs
- 90
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill sentiment-analyzer- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads sentiment-analyzer automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Sentiment Analyzer
Analyze the sentiment of text content with detailed scoring, emotion detection, and visualization capabilities. Process single texts, CSV files, or track sentiment trends over time.
Quick Start
from scripts.sentiment_analyzer import SentimentAnalyzer
# Analyze single text
analyzer = SentimentAnalyzer()
result = analyzer.analyze("I love this product! It's amazing.")
print(f"Sentiment: {result['sentiment']} ({result['score']:.2f})")
# Batch analyze CSV
results = analyzer.analyze_csv("reviews.csv", text_column="review")
analyzer.plot_distribution("sentiment_dist.png")
Features
- Sentiment Classification: Positive, negative, neutral with confidence
- Polarity Scoring: -1.0 (negative) to +1.0 (positive)
- Subjectivity Detection: Objective vs subjective content
- Emotion Detection: Joy, anger, sadness, fear, surprise
- Batch Processing: Analyze CSV files with any text column
- Trend Analysis: Track sentiment over time
- Visualizations: Distribution plots, trend charts, word clouds
API Reference
Initialization
analyzer = SentimentAnalyzer()
Single Text Analysis
result = analyzer.analyze("This is great!")
# Returns:
# {
# 'text': 'This is great!',
# 'sentiment': 'positive', # positive, negative, neutral
# 'score': 0.85, # -1.0 to 1.0
# 'confidence': 0.92, # 0.0 to 1.0
# 'subjectivity': 0.75, # 0.0 (objective) to 1.0 (subjective)
# 'emotions': {'joy': 0.8, 'anger': 0.0, ...}
# }
Batch Analysis
# From list
texts = ["Great product!", "Terrible service.", "It's okay."]
results = analyzer.analyze_batch(texts)
# From CSV
results = analyzer.analyze_csv(
"reviews.csv",
text_column="review_text",
output="results.csv"
)
Trend Analysis
# Analyze sentiment over time
results = analyzer.analyze_csv(
"posts.csv",
text_column="content",
date_column="posted_at"
)
analyzer.plot_trend("sentiment_trend.png")
Visualizations
# Sentiment distribution
analyzer.plot_distribution("distribution.png")
# Sentiment over time
analyzer.plot_trend("trend.png")
# Word cloud by sentiment
analyzer.plot_wordcloud("positive", "positive_words.png")
CLI Usage
# Analyze single text
python sentiment_analyzer.py --text "I love this product!"
# Analyze file
python sentiment_analyzer.py --input reviews.csv --column review --output results.csv
# With visualization
python sentiment_analyzer.py --input reviews.csv --column text --plot distribution.png
# Trend analysis
python sentiment_analyzer.py --input posts.csv --column content --date posted_at --trend trend.png
CLI Arguments
| Argument | Description | Default |
|---|---|---|
--text | Single text to analyze | - |
--input | Input CSV file | - |
--column | Text column name | text |
--date | Date column for trends | - |
--output | Output CSV file | - |
--plot | Save distribution plot | - |
--trend | Save trend plot | - |
--format | Output format (json, csv) | json |
Examples
Product Review Analysis
analyzer = SentimentAnalyzer()
results = analyzer.analyze_csv("amazon_reviews.csv", text_column="review")
# Summary statistics
positive = sum(1 for r in results if r['sentiment'] == 'positive')
negative = sum(1 for r in results if r['sentiment'] == 'negative')
print(f"Positive: {positive}, Negative: {negative}")
# Average sentiment score
avg_score = sum(r['score'] for r in results) / len(results)
print(f"Average sentiment: {avg_score:.2f}")
Social Media Monitoring
analyzer = SentimentAnalyzer()
# Analyze tweets with timestamps
results = analyzer.analyze_csv(
"tweets.csv",
text_column="tweet_text",
date_column="created_at"
)
# Plot sentiment trend
analyzer.plot_trend("twitter_sentiment.png", title="Brand Sentiment Over Time")
Customer Feedback Categorization
analyzer = SentimentAnalyzer()
feedback = [
"Your support team was incredibly helpful!",
"The product broke after one day.",
"Shipping was on time.",
"I'm extremely disappointed with the quality.",
"It works as expected, nothing special."
]
for text in feedback:
result = analyzer.analyze(text)
print(f"{result['sentiment'].upper():8} ({result['score']:+.2f}): {text[:50]}")
Output Format
JSON Output
{
"text": "I love this product!",
"sentiment": "positive",
"score": 0.85,
"confidence": 0.92,
"subjectivity": 0.75,
"emotions": {
"joy": 0.82,
"anger": 0.02,
"sadness": 0.01,
"fear": 0.03,
"surprise": 0.12
}
}
CSV Output
| text | sentiment | score | confidence | subjectivity |
|---|---|---|---|---|
| Great product! | positive | 0.85 | 0.91 | 0.80 |
| Terrible... | negative | -0.72 | 0.88 | 0.65 |
Dependencies
textblob>=0.17.0
pandas>=2.0.0
matplotlib>=3.7.0
Limitations
- English language optimized (other languages may have reduced accuracy)
- Sarcasm and irony may not be detected accurately
- Context-dependent sentiment may be missed
- Short texts (<5 words) have lower confidence
FAQ
What does the sentiment-analyzer skill do?
Analyze text sentiment (positive/negative/neutral) with confidence scores, emotion detection, and visualization. Supports single text, CSV batch, and trend analysis.
How do I install sentiment-analyzer?
Run npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill sentiment-analyzer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/sentiment-analyzer/ (personal) or .claude/skills/sentiment-analyzer/ (project).
Which AI agents can use sentiment-analyzer?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is sentiment-analyzer safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains sentiment-analyzer?
It is published by dkyazzentwatwa in dkyazzentwatwa/chatgpt-skills. It has 90 recorded installs.
More from dkyazzentwatwa/chatgpt-skills
ocr-document-processor
dkyazzentwatwa/chatgpt-skills
Extract text and structure from scans, images, and scanned PDFs. Use for OCR, searchable PDFs, table extraction, receipt parsing, and business card parsing.
crypto-ta-analyzer
dkyazzentwatwa/chatgpt-skills
Run multi-indicator technical analysis on crypto or market OHLCV data. Use for deterministic trend, momentum, volume, and divergence analysis.
text-summarizer
dkyazzentwatwa/chatgpt-skills
Generate extractive summaries from long text documents. Control summary length, extract key sentences, and process multiple documents.
financial-calculator
dkyazzentwatwa/chatgpt-skills
Run loan, investment, NPV, retirement, savings, and risk calculations with schedules and charts. Use for deterministic financial modeling tasks.
document-converter-suite
dkyazzentwatwa/chatgpt-skills
Convert PDFs, Office docs, markdown, HTML, and tables between editable formats. Use for best-effort document conversion, PDF utilities, form filling, and table extraction.
image-enhancement-suite
dkyazzentwatwa/chatgpt-skills
Open the skill to read its SKILL.md instructions.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.