alphaear-sentiment — скилл для Claude Code: что делает
Скилл для финансового анализа тональности текстов с помощью локальной модели FinBERT или обращений к LLM. Определяет тональность и оценку новостей рынка.
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-codeЧто делает alphaear-sentiment
Скилл оценивает тональность финансовых текстов в двух режимах. Для быстрой локальной обработки скрипт scripts/sentiment_tools.py использует модель FinBERT. Метод analyze_sentiment выдаёт числовой скор от -1.0 до 1.0, текстовую метку и причину оценки, а функция batch_update_news_sentiment обновляет неразобранные записи в базе данных.
Когда контекст сложнее или нужны развёрнутые рассуждения, агент переключается на прямой анализ через LLM. Результат форматируется в JSON со значениями positive, negative или neutral. Для сохранения ручных ответов предусмотрен метод update_single_news_sentiment.
Без установленных библиотек torch и transformers локальный запуск FinBERT сразу упадёт с ошибкой. Также для записи результатов требуется инициализированный DatabaseManager и встроенный модуль sqlite3.
Какие задачи решает
- рассчитать оценку тональности финансовой новости от -1.0 до 1.0 через FinBERT
- пакетно обновить тональность неразобранных записей в базе данных
- разобрать эмоциональную окраску сложного рыночного текста с помощью LLM
- сохранить метку и причину оценки новости через update_single_news_sentiment
Примеры запросов агенту
- Оцени тональность текста финансовой новости через FinBERT и верни скор с обоснованием
- Проанализируй рыночную сводку с помощью LLM и запиши оценку через update_single_news_sentiment
- Запусти пакетный пересчёт тональности неразобранных новостей в базе
Как установить alphaear-sentiment
1Через Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-code2Вручную: положить файлы
~/.claude/skills/alphaear-sentiment/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/alphaear-sentiment/
1Через Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a codex2Вручную: положить файлы
.agents/skills/alphaear-sentiment/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a cursor2Вручную: положить файлы
.cursor/skills/alphaear-sentiment/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install RKiding/Awesome-finance-skills alphaear-sentiment2Вручную: положить файлы
.github/skills/alphaear-sentiment/SKILL.md1Через Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a gemini-cli2Командой платформы
gemini skills install https://github.com/RKiding/Awesome-finance-skills --path skills/alphaear-sentimentВручную: положить файлы
.devin/skills/alphaear-sentiment/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о alphaear-sentiment
Как установить alphaear-sentiment в Claude Code?
Выполните команду npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-code. Конфигурация сохранится по пути ~/.claude/skills/alphaear-sentiment/SKILL.md.
Что делает скилл alphaear-sentiment?
Он классифицирует финансовые тексты на позитивные, негативные и нейтральные. Анализ выполняется локально моделью FinBERT либо напрямую через промпт для LLM.
Какие зависимости нужны для работы FinBERT?
Потребуются установленные пакеты torch и transformers. Для сохранения данных в базу нужен рабочий DatabaseManager на базе sqlite3.
Исходный текст
SKILL.md · Apache-2.0
---
name: alphaear-sentiment
description: Analyze finance text sentiment using FinBERT or LLM. Use when the user needs to determine the sentiment (positive/negative/neutral) and score of financial text markets.
---
# AlphaEar Sentiment Skill
## Overview
This skill provides sentiment analysis capabilities tailored for financial texts, supporting both FinBERT (local model) and LLM-based analysis modes.
## Capabilities
## Capabilities
### 1. Analyze Sentiment (FinBERT / Local)
Use `scripts/sentiment_tools.py` for high-speed, local sentiment analysis using FinBERT.
**Key Methods:**
- `analyze_sentiment(text)`: Get sentiment score and label using localized FinBERT model.
- **Returns**: `{'score': float, 'label': str, 'reason': str}`.
- **Score Range**: -1.0 (Negative) to 1.0 (Positive).
- `batch_update_news_sentiment(source, limit)`: Batch process unanalyzed news in the database (FinBERT only).
### 2. Analyze Sentiment (LLM / Agentic)
For higher accuracy or reasoning capabilities, **YOU (the Agent)** should perform the analysis using the Prompt below, calling the LLM directly, and then update the database if necessary.
#### Sentiment Analysis Prompt
Use this prompt to analyze financial texts if the local tool is insufficient or if reasoning is required.
```markdown
请分析以下金融/新闻文本的情绪极性。
返回严格的 JSON 格式:
{"score": <float: -1.0到1.0>, "label": "<positive/negative/neutral>", "reason": "<简短理由>"}
文本: {text}
```
**Scoring Guide:**
- **Positive (0.1 to 1.0)**: Optimistic news, profit growth, policy support, etc.
- **Negative (-1.0 to -0.1)**: Losses, sanctions, price drops, pessimism.
- **Neutral (-0.1 to 0.1)**: Factual reporting, sideways movement, ambiguous impact.
#### Helper Methods
- `update_single_news_sentiment(id, score, reason)`: Use this to save your manual analysis to the database.
## Dependencies
- `torch` (for FinBERT)
- `transformers` (for FinBERT)
- `sqlite3` (built-in)
Ensure `DatabaseManager` is initialized correctly.
© RKiding · Apache-2.0 · RKiding/Awesome-finance-skills