alphaear-sentiment — Claude Code skill: what it does, how to install
Financial sentiment analysis skill using local FinBERT or LLM inference. Classifies market texts into positive, negative, or neutral with a numeric score.
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-codeWhat alphaear-sentiment does
The skill evaluates sentiment in financial texts using two distinct paths. For fast local processing, scripts/sentiment_tools.py runs a FinBERT model. Its analyze_sentiment method returns a score between -1.0 and 1.0 alongside an explanatory label, while batch_update_news_sentiment processes unanalyzed items stored in the database.
When deeper reasoning is needed, the agent switches to LLM inference with a structured prompt. The output returns a JSON payload containing the score, sentiment label, and brief reasoning. The helper method update_single_news_sentiment saves those agent evaluations directly to storage.
Running FinBERT locally will fail immediately unless torch and transformers are present in your Python environment. In addition, the storage operations require a functioning DatabaseManager backed by sqlite3.
What it helps with
- score financial news sentiment between -1.0 and 1.0 using local FinBERT
- batch-update unanalyzed market entries in the local database
- evaluate nuanced financial text using LLM reasoning
- record sentiment scores and explanations via update_single_news_sentiment
Example prompts for the agent
- Analyze the sentiment of this earnings report using FinBERT and give me the score
- Evaluate this financial news text with the LLM prompt and save the result
- Run a batch update on unanalyzed news items in the database
How to install alphaear-sentiment
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-code2Manually: put the files in place
~/.claude/skills/alphaear-sentiment/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/alphaear-sentiment/
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a codex2Manually: put the files in place
.agents/skills/alphaear-sentiment/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a cursor2Manually: put the files in place
.cursor/skills/alphaear-sentiment/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install RKiding/Awesome-finance-skills alphaear-sentiment2Manually: put the files in place
.github/skills/alphaear-sentiment/SKILL.md1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a gemini-cli2Platform CLI
gemini skills install https://github.com/RKiding/Awesome-finance-skills --path skills/alphaear-sentimentManually: put the files in place
.devin/skills/alphaear-sentiment/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about alphaear-sentiment
How to install alphaear-sentiment in Claude Code?
Run npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-code. The skill file will be placed in ~/.claude/skills/alphaear-sentiment/SKILL.md.
What does alphaear-sentiment do?
It determines the sentiment of market and financial texts, returning scores from -1.0 to 1.0. It supports fast local FinBERT runs and LLM-based reasoning.
What dependencies are required for local FinBERT analysis?
You need torch and transformers installed. Storing results also requires an initialized DatabaseManager using built-in sqlite3.
Source text
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