Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add RKiding/Awesome-finance-skills --skill alphaear-sentiment -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/alphaear-sentiment/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/alphaear-sentiment/

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

Similar skills

Everything for Finance and business →

From the same set9

alphaear-news Fetches real-time finance news from Weibo, Zhihu, and WallstreetCN, plus Polymarket prediction data. Useful for tracking market trends and active prediction summaries. CX Codex +1 1,500installs alphaear-stock Searches A-Share, HK, and US stock tickers, returning OHLCV price history and fundamental metrics. CX Codex +1 1,200installs alphaear-predictor This skill produces a Kronos-based forecast for a financial time series, then adjusts the numbers against fresh news. Useful when you need a short-horizon price view. CX Codex +1 584installs alphaear-signal-tracker A skill that tracks investment signals over time: it weighs fresh news and prices and decides whether a signal got stronger, weaker or was falsified. CX Codex +1 560installs alphaear-search A skill that runs finance searches on the web through Jina, DDG or Baidu, and pulls results from a local news store. Useful when the agent needs fresh data or your own documents. CX Codex +1 542installs alphaear-reporter A skill that walks the agent through clustering signals, writing sections, assembling a financial report and building charts. CX Codex +1 535installs alphaear-logic-visualizer Turns finance transmission chains and investment theses into Draw.io XML, then saves the result as a viewable HTML file. CX Codex +1 496installs alphaear-deepear-lite Fetches high-frequency financial signals and transmission-chain analyses from DeepEar Lite. Useful for reviewing market sentiment and stock movement drivers in chat. CX Codex +1 334installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor