К основному содержанию
скилл CX Codex

analyzing-twitter-sentiment-for-topic — скилл для Claude Code

Собирает твиты через Apify и оценивает тональность вокруг темы, бренда или события. Выдаёт распределение мнений, ключевые тезисы и твиты с высокой реакцией.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add apidojo-io/apidojo-skills --skill analyzing-twitter-sentiment-for-topic -a claude-code
Открыть на GitHub

Что делает analyzing-twitter-sentiment-for-topic

Скилл выгружает твиты через скрапер apidojo~tweet-scraper на платформе Apify. По умолчанию агент запрашивает выборку из 500 постов за последние 7 дней на английском языке, отсекая ретвиты. Поисковые параметры настраиваются: можно задать фильтры по верифицированным профилям, авторам, геопозиции, языку и порогу лайков или ответов.

Обработка делит твиты на три категории: позитивные, негативные и нейтральные. Классификация опирается на словарные маркеры и эмодзи, с перевесом в сторону твитов с высокой активностью читателей. Из негативных и позитивных групп скилл вычленяет от трёх до пяти повторяющихся тем, чтобы показать конкретные претензии или поводы для похвалы.

Для сбора данных обязательно требуется переменная окружения APIFY_TOKEN. Скрипт запускается через команду node scripts/run_actor.js, сервер Apify MCP или обычный запрос через curl. Без токена скрапер Apify не ответит.

Какие задачи решает

  • собрать и классифицировать посты в Twitter/X по тональности
  • выделить главные претензии и темы похвалы к бренду или продукту
  • сравнить реакцию аудитории на две конкурирующие темы
  • отследить всплеск негатива или позитива вокруг инфоповода

Примеры запросов агенту

  • Проанализируй тональность твитов про OpenAI за последнюю неделю
  • Сравни отношение пользователей Twitter к PlayStation 5 и Xbox Series X
  • Собери негативные отзывы о последнем релизе в X и выдели основные жалобы

Как установить analyzing-twitter-sentiment-for-topic

1Через Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill analyzing-twitter-sentiment-for-topic -a claude-code

2Вручную: положить файлы

~/.claude/skills/analyzing-twitter-sentiment-for-topic/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/analyzing-twitter-sentiment-for-topic/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о analyzing-twitter-sentiment-for-topic

Как установить analyzing-twitter-sentiment-for-topic в Claude Code?

Выполните команду npx skills add apidojo-io/apidojo-skills --skill analyzing-twitter-sentiment-for-topic -a claude-code. Также файл спецификации можно сохранить по пути ~/.claude/skills/analyzing-twitter-sentiment-for-topic/SKILL.md.

Что делает analyzing-twitter-sentiment-for-topic?

Скилл находит посты в Twitter/X по поисковому запросу через Apify, разбивает их на позитивные, негативные и нейтральные, а затем выводит отчёт с главными темами и цитатами.

Что нужно подготовить перед запуском?

Необходимо задать переменную окружения APIFY_TOKEN. Для работы со скрапером используется вспомогательный скрипт scripts/run_actor.js, вызов через Apify MCP или прямой HTTP-запрос.

Исходный текст

SKILL.md · Apache-2.0
---
name: analyzing-twitter-sentiment-for-topic
description: >
  Analyzes public sentiment on Twitter/X for any topic, brand, or event using apidojo's Tweet scrapers on Apify.
  Triggers when the user asks to: analyze Twitter sentiment about a topic, measure public opinion on Twitter,
  see if sentiment is positive or negative about a brand or issue on X, analyze the emotional tone of tweets
  about an event, research how Twitter reacts to a news story, measure brand or product sentiment from tweets,
  or compare sentiment between two competing topics or brands on Twitter.
  Returns sentiment classification, top positive and negative tweets, volume over time, and key themes.
  Ideal for PR teams, market researchers, political analysts, and social listening platforms.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actors: apidojo/tweet-scraper, apidojo/tweet-scraper
---

# Analyzing Twitter Sentiment for a Topic

Collects a sample of tweets about any topic or keyword and performs sentiment analysis across the dataset. Identifies dominant emotional tone, key themes driving positive/negative sentiment, and volume patterns over time.

## Prerequisites

- `APIFY_TOKEN` environment variable set
- Optional: Apify MCP server installed


## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `searchTerms` | array | ✅ | `[]` | Twitter advanced search queries (e.g. `["#AI lang:en", "from:NASA"]`) |
| `sort` | string | Optional | `Top` | Sort order: `Latest`, `Top`, or `Latest+Top` |
| `tweetLanguage` | string | Optional | — | ISO 639-1 language code (e.g. `en`) |
| `maxItems` | number | Optional | Unlimited | Maximum tweets to return |
| `onlyVerifiedUsers` | boolean | Optional | `false` | Only tweets from verified users |
| `onlyTwitterBlue` | boolean | Optional | `false` | Only Twitter Blue subscribers |
| `onlyImage` | boolean | Optional | `false` | Only tweets with images |
| `onlyVideo` | boolean | Optional | `false` | Only tweets with videos |
| `onlyQuote` | boolean | Optional | `false` | Only quote tweets |
| `author` | string | Optional | — | Filter to a specific author handle |
| `inReplyTo` | string | Optional | — | Tweets replying to a specific handle |
| `mentioning` | string | Optional | — | Tweets mentioning a specific handle |
| `geotaggedNear` | string | Optional | — | Tweets near a location |
| `withinRadius` | string | Optional | — | Radius around geotaggedNear |
| `geocode` | string | Optional | — | Lat/lng + radius string |
| `placeObjectId` | string | Optional | — | Tweets tagged with a place |
| `minimumRetweets` | number | Optional | — | Minimum retweet count |
| `minimumFavorites` | number | Optional | — | Minimum like count |
| `minimumReplies` | number | Optional | — | Minimum reply count |
| `start` | string | Optional | — | Tweets after this date (YYYY-MM-DD) |
| `end` | string | Optional | — | Tweets before this date (YYYY-MM-DD) |
| `includeSearchTerms` | boolean | Optional | `false` | Add the matched search term to each tweet |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |
## Workflow

```
Progress:
- [ ] Step 1: Define topic and sentiment scope
- [ ] Step 2: Collect tweets via search
- [ ] Step 3: Classify sentiment per tweet
- [ ] Step 4: Identify themes per sentiment bucket
- [ ] Step 5: Deliver sentiment report
```

### Step 1: Clarify Parameters

Ask the user for:
- **Topic, keyword, or brand** to analyze
- **Date range** (default: last 7 days — Twitter sentiment data decays fast)
- **Language** (default: English)
- **Sample size** (default: 500 tweets — sufficient for reliable distribution)
- **Exclude retweets?** (default: yes — reduces duplicated opinion signals)
- **Comparison topic** (optional — for side-by-side sentiment comparison)

### Step 2: Collect Tweets


**Recommended — run_actor.js (handles waiting, output, and file saving automatically):**
```bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json
```
> `APIFY_TOKEN` must be set in environment or `.env` file.

**If Apify MCP is available:**
```
Tool: apify:run-actor
Actor: "apidojo~tweet-scraper"
Input:
{
  "searchTerms": ["[TOPIC_KEYWORD]"],
  "maxItems": 500,
  "tweetLanguage": "en",
  "since": "[YYYY-MM-DD]",
  "until": "[YYYY-MM-DD]"
}
```

**REST API fallback:**
```bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["[TOPIC_KEYWORD]"],
    "maxItems": 500,
    "tweetLanguage": "en",
    "since": "[YYYY-MM-DD]"
  }'
```

### Step 3: Classify Sentiment

For each tweet's `text`, classify as Positive, Negative, or Neutral using lexical signals:

**Positive indicators:** love, great, amazing, perfect, best, win, excited, congrats, excellent, recommend, beautiful, proud, happy, thank, awesome, incredible
**Negative indicators:** hate, awful, worst, terrible, broken, scam, disappointed, angry, frustrated, disgusted, avoid, never again, shame, sad, fail, wrong, bad
**Strong negative amplifiers:** "can't believe", "what a joke", "are you serious", "wtf", "this is ridiculous"
**Neutral default:** Everything else

For ambiguous cases, use emoji signals:
- 😍🥰❤️🙌👏✨🔥 → lean Positive
- 😡🤬😤💀🗑️🤢👎 → lean Negative
- 🤔😐🤷 → lean Neutral

Weight tweets by engagement: a tweet with 1,000 likes carries more signal than one with 0.

### Step 4: Theme Extraction

For Negative tweets: identify the top 3-5 recurring nouns/themes. What are people upset about specifically?
For Positive tweets: identify the top 3-5 recurring praise themes.

Look for proper nouns (people, places, products), specific events, or feature names that appear repeatedly.

### Step 5: Format Report

## Output Format

```
# Twitter Sentiment Analysis: "[TOPIC]"
Period: [DATE_RANGE] | Tweets analyzed: [N] | Date: [DATE]

## Overall Sentiment
```
████████████░░░░░░░░  Positive: [X%] ([N] tweets)
████░░░░░░░░░░░░░░░░  Negative: [X%] ([N] tweets)
██████████░░░░░░░░░░  Neutral:  [X%] ([N] tweets)
```

Weighted by engagement:
- Positive sentiment accounts for [X%] of total likes/RTs
- Negative sentiment accounts for [X%] of total likes/RTs

**Overall verdict:** [Mostly Positive / Mixed / Mostly Negative / Polarized]

## Top Negative Themes
1. "[Theme]" — [N] tweets, [N] total likes
   Example: "@[handle]: [tweet excerpt]"
2. "[Theme]" — [N] tweets
3. "[Theme]" — [N] tweets

## Top Positive Themes
1. "[Theme]" — [N] tweets, [N] total likes
   Example: "@[handle]: [tweet excerpt]"
2. "[Theme]" — [N] tweets

## Most Engaged Tweets
🔴 Most-liked negative: @[handle] ([N] likes): "[excerpt]"
🟢 Most-liked positive: @[handle] ([N] likes): "[excerpt]"

## Volume Over Time
[Day 1]: [N] tweets | [Day 2]: [N] tweets | [Day 3]: [N] tweets

## Notable Spikes
[Date with highest volume] — [N] tweets | Likely cause: [describe if detectable from tweet context]
```

## Troubleshooting

**Sentiment feels inaccurate:** Lexical analysis misses sarcasm. For high-stakes decisions, manually review the top 20 tweets per bucket.
**Topic too broad:** Narrow the search term. "Apple" returns tech and food — use "Apple iPhone" instead.
**Very low tweet volume:** Topic may not be actively discussed on Twitter right now. Expand date range.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Похожие скиллы

Все скиллы по теме «Маркетинг и контент» →
seo-audit coreyhaines31 Скилл проводит технический и on-page аудит сайта: краулинг, индексация, Core Web Vitals, метатеги, hreflang. Пригодится, когда трафик упал или страницы застряли на второй выдаче. CX Codex +1 238 500установок programmatic-seo coreyhaines31 Скилл помогает планировать генерацию сотен посадочных страниц на базе шаблонов и структурированных данных. Позволяет избежать санкций поисковиков за пустой контент. CX Codex +1 150 800установок copy-editing coreyhaines31 Правит уже написанный маркетинговый текст: убирает речевые штампы, чистит формулировки и обновляет устаревшие страницы. Для нового текста с нуля не подходит. CX Codex +1 149 800установок marketing-ideas coreyhaines31 Скилл помогает подобрать маркетинговые идеи для SaaS или другого программного продукта с учётом этапа развития и доступных ресурсов. Пригодится, когда непонятно, с какого канала начать. CX Codex +1 147 400установок sales-enablement coreyhaines31 Скилл для ИИ-агента, который собирает презентации, one-pager'ы, скрипты демо и документы для отработки возражений. Пригодится, когда команда продаж просит материалы, а не очередную презентацию о продукте. CX Codex +1 119 400установок revops coreyhaines31 Скилл помогает проектировать RevOps: вести лидов по этапам, считать скоринг и выстраивать передачу из маркетинга в продажи. Нужен для CRM-процессов. CX Codex +1 114 000установок

Из того же набора96

discovering-viral-youtube-videos-by-category Скилл собирает тренды YouTube по категориям и странам через актор Apify. Находит популярные ролики, их просмотры, лайки, теги и авторов для контентных исследований. CX Codex +1 851установок scraping-tiktok-profile-data Собирает статистику и метаданные TikTok-аккаунтов пачкой: подписчики, подписки, лайки, число видео, био. Пригодится, когда нужно проверить список креаторов перед работой. CX Codex +1 834установок finding-instagram-creators-by-location Находит Instagram-авторов, которые регулярно публикуют из заданного места: города, района или заведения. Пригодится для локальных кампаний и гео-таргетинга. CX Codex +1 833установок finding-healthcare-practices-via-google-search Ищет клиники, стоматологии и другие медицинские организации через Google. Нужен для сбора первичного списка провайдеров по городу или специализации. CX Codex +1 816установок scraping-youtube-videos-by-keyword Скилл выгружает метаданные и метрики видео из поисковой выдачи YouTube через актор Apify. Пригодится для анализа просмотров, конкурентов и трендов. CX Codex +1 814установок tracking-youtube-trending-topics-by-niche Скилл ищет тренды YouTube в выбранной нише и показывает форматы, темы, просмотры и вовлечённость. Нужен для подготовки идей видео. CX Codex +1 813установок finding-tiktok-creators-using-trending-sounds Находит TikTok-креаторов, которые снимали под конкретный трек или трендовый звук. Пригодится, когда нужно собрать список аккаунтов под размещение бренда. CX Codex +1 813установок building-full-social-audit-for-brand Собирает аудит присутствия бренда в Twitter, Instagram, TikTok и YouTube через парсеры Apify. Рассчитывает вовлечённость и итоговый скор бренда. CX Codex +1 813установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой