Agent skill

Stock Screener

by nicepkg in nicepkg/ai-workflow

Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates.

MITAuto-check passedBusiness, Finance & HR

Install Stock Screener

skills CLI
$ npx skills add nicepkg/ai-workflow --skill stock-screener -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nicepkg/ai-workflow stock-screener --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nicepkg/ai-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workflows/stock-trader-workflow/.claude/skills/stock-screener .claude/skills/stock-screener && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stock-screener
GitHub stars
285
Token cost
~1.9k tokens
SKILL.md length
125 words
Files
3 (incl. scripts)
Skills in repo
75
Repo updated
First seen
Licence
MIT

At a glance

Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates.

  • Tasks that involve Stock and market analysis
  • SKILL.md covers Features, Quick Start, CLI Usage and Input Format, plus 8 more sections
  • Runs Python scripts from its folder; calls python
  • Tasks that involve CSV and tabular files

What it does

Stock Screener is an agent skill from nicepkg/ai-workflow. Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates. Analyze and compare stocks from CSV data.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/stock_screener.py`).

It sits in Business, Finance & HR, covering Stock and market analysis and CSV and tabular files. The repository describes itself as: 🚀 170+ pre-built skills for Claude Code, Cursor, Codex & 14+ AI tools. Stop re-teaching your AI the same things. One command → instant domain expertise. Marketing, SEO, Trading… The licence is MIT.

When your agent uses it

  • Tasks that involve Stock and market analysis
  • Tasks that involve CSV and tabular files

Example prompts

  • “/stock-screener”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit d167b41. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stock Screener loads about 1.9k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 125 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nicepkg/ai-workflow at commit d167b41, republished under its MIT licence (© nicepkg). 125 words, ~1,922 tokens.

Download SKILL.mdSave it as .claude/skills/stock-screener/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
stock-screener
description
Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates. Analyze and compare stocks from CSV data.

Stock Screener

Filter stocks by financial metrics and perform comparative analysis.

Features

  • Multi-Metric Filtering: P/E, P/B, market cap, dividend yield, etc.
  • Custom Screens: Save and reuse filter combinations
  • Comparative Analysis: Side-by-side stock comparison
  • Sector Analysis: Group and analyze by sector
  • Ranking: Score and rank stocks by criteria
  • Export: CSV, JSON, formatted reports

Quick Start

python
from stock_screener import StockScreener

screener = StockScreener()

# Load stock data
screener.load_csv("stocks.csv")

# Apply filters
results = screener.filter(
    pe_ratio=(0, 20),
    market_cap_min=1e9,
    dividend_yield_min=2.0
)

print(results)

CLI Usage

bash
# Basic screening
python stock_screener.py --input stocks.csv --pe-max 20 --div-min 2.0

# Multiple filters
python stock_screener.py --input stocks.csv --pe 5 25 --pb-max 3 --cap-min 1B

# Sector filter
python stock_screener.py --input stocks.csv --sector Technology --pe-max 30

# Rank by metric
python stock_screener.py --input stocks.csv --rank-by dividend_yield --top 20

# Compare specific stocks
python stock_screener.py --input stocks.csv --compare AAPL MSFT GOOGL

# Export results
python stock_screener.py --input stocks.csv --pe-max 15 --output screened.csv

Input Format

Stock CSV
csv
symbol,name,sector,price,pe_ratio,pb_ratio,market_cap,dividend_yield,eps,revenue_growth,profit_margin
AAPL,Apple Inc,Technology,175.50,28.5,45.2,2.8e12,0.5,6.16,8.5,25.3
MSFT,Microsoft,Technology,380.00,35.2,12.8,2.8e12,0.8,10.79,12.3,36.7
JNJ,Johnson & Johnson,Healthcare,155.00,15.2,5.8,3.8e11,2.9,10.20,5.2,22.1

API Reference

StockScreener Class
python
class StockScreener:
    def __init__(self)

    # Data Loading
    def load_csv(self, filepath: str) -> 'StockScreener'
    def load_dataframe(self, df: pd.DataFrame) -> 'StockScreener'

    # Filtering
    def filter(self, **criteria) -> pd.DataFrame
    def filter_by_sector(self, sectors: List[str]) -> 'StockScreener'
    def filter_by_metric(self, metric: str, min_val: float = None,
                         max_val: float = None) -> 'StockScreener'

    # Screening Presets
    def value_screen(self) -> pd.DataFrame
    def growth_screen(self) -> pd.DataFrame
    def dividend_screen(self) -> pd.DataFrame
    def quality_screen(self) -> pd.DataFrame
    def custom_screen(self, criteria: Dict) -> pd.DataFrame

    # Analysis
    def compare(self, symbols: List[str]) -> pd.DataFrame
    def rank_by(self, metric: str, ascending: bool = True) -> pd.DataFrame
    def sector_summary(self) -> pd.DataFrame
    def metric_distribution(self, metric: str) -> Dict

    # Scoring
    def score_stocks(self, weights: Dict[str, float] = None) -> pd.DataFrame
    def percentile_rank(self, metrics: List[str]) -> pd.DataFrame

    # Export
    def to_csv(self, filepath: str) -> str
    def to_json(self, filepath: str) -> str
    def summary_report(self) -> str

Filtering Criteria

Valuation Metrics
python
screener.filter(
    pe_ratio=(5, 20),      # P/E between 5 and 20
    pb_ratio_max=3.0,      # P/B ratio under 3
    ps_ratio_max=5.0,      # Price/Sales under 5
    peg_ratio_max=1.5      # PEG ratio under 1.5
)
Size Metrics
python
screener.filter(
    market_cap_min=1e9,    # Min $1B market cap
    market_cap_max=10e9,   # Max $10B (mid-cap)
    revenue_min=500e6      # Min $500M revenue
)
Income Metrics
python
screener.filter(
    dividend_yield_min=2.0,  # Min 2% dividend
    dividend_yield_max=8.0,  # Max 8% (avoid yield traps)
    payout_ratio_max=75      # Sustainable payout
)
Growth Metrics
python
screener.filter(
    revenue_growth_min=10,   # Min 10% revenue growth
    earnings_growth_min=15,  # Min 15% earnings growth
    eps_growth_min=10        # Min 10% EPS growth
)
Quality Metrics
python
screener.filter(
    profit_margin_min=15,    # Min 15% profit margin
    roe_min=15,              # Min 15% return on equity
    debt_to_equity_max=1.0,  # Max 1.0 D/E ratio
    current_ratio_min=1.5    # Min 1.5 current ratio
)

Preset Screens

Value Screen
python
results = screener.value_screen()
# Finds undervalued stocks:
# - P/E < 15
# - P/B < 2
# - Dividend yield > 2%
# - Profit margin > 10%
Growth Screen
python
results = screener.growth_screen()
# Finds growth stocks:
# - Revenue growth > 15%
# - Earnings growth > 20%
# - PEG ratio < 2
Dividend Screen
python
results = screener.dividend_screen()
# Finds dividend stocks:
# - Dividend yield 2-8%
# - Payout ratio < 75%
# - 5+ years dividend history
Quality Screen
python
results = screener.quality_screen()
# Finds high-quality stocks:
# - ROE > 15%
# - Profit margin > 15%
# - D/E < 0.5
# - Current ratio > 2

Stock Comparison

python
comparison = screener.compare(["AAPL", "MSFT", "GOOGL"])
# Returns:
#                  AAPL    MSFT    GOOGL
# price           175.50  380.00  140.00
# pe_ratio        28.50   35.20   25.30
# market_cap      2.8T    2.8T    1.7T
# dividend_yield  0.50    0.80    0.00
# profit_margin   25.30   36.70   22.50
# ...

Ranking and Scoring

Rank by Single Metric
python
# Top 20 by dividend yield
top_dividend = screener.rank_by("dividend_yield", ascending=False).head(20)
Composite Scoring
python
# Score stocks with custom weights
scores = screener.score_stocks({
    "pe_ratio": -0.2,        # Lower is better
    "dividend_yield": 0.3,   # Higher is better
    "profit_margin": 0.3,    # Higher is better
    "revenue_growth": 0.2    # Higher is better
})
# Returns stocks ranked by composite score
Percentile Ranking
python
# See where each stock ranks on multiple metrics
ranked = screener.percentile_rank(["pe_ratio", "dividend_yield", "profit_margin"])
# Returns percentile (0-100) for each metric

Sector Analysis

python
sector_stats = screener.sector_summary()
# Returns:
#   sector        | count | avg_pe | avg_div | avg_margin
#   Technology    | 45    | 28.5   | 1.2     | 22.3
#   Healthcare    | 32    | 18.2   | 2.1     | 18.7
#   Financials    | 28    | 12.5   | 3.2     | 25.1

Example Workflows

Find Undervalued Dividend Stocks
python
screener = StockScreener()
screener.load_csv("sp500.csv")

# Apply filters
results = screener.filter(
    pe_ratio=(5, 15),
    dividend_yield_min=3.0,
    payout_ratio_max=70,
    profit_margin_min=10
)

# Rank by dividend yield
top = results.sort_values("dividend_yield", ascending=False).head(10)
print(top[["symbol", "name", "pe_ratio", "dividend_yield", "payout_ratio"]])
Growth at Reasonable Price (GARP)
python
results = screener.filter(
    revenue_growth_min=15,
    earnings_growth_min=15,
    peg_ratio_max=1.5,
    pe_ratio_max=25
)
Sector Comparison
python
# Filter to technology sector
tech = screener.filter_by_sector(["Technology"]).filter(
    market_cap_min=10e9,
    profit_margin_min=15
)

# Compare top tech stocks
comparison = screener.compare(tech["symbol"].head(5).tolist())

Output Format

CSV Export
python
screener.filter(pe_ratio_max=20).to_csv("value_stocks.csv")
JSON Export
python
screener.filter(dividend_yield_min=3).to_json("dividend_stocks.json")
Summary Report
python
report = screener.summary_report()
# Returns formatted text summary of screening results

Dependencies

  • pandas>=2.0.0
  • numpy>=1.24.0

© nicepkg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in workflows/stock-trader-workflow/.claude/skills/stock-screener of nicepkg/ai-workflow.

  • SKILL.md
  • scripts/requirements.txt
  • scripts/stock_screener.py

Open the folder on GitHubat commit d167b41

Compare with similar skills

Stock Screener next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stock Screener compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stock Screener this skillnicepkg/ai-workflow285—~1.9kAutomated safety check: PassMIT
Breadth Chart Analysttradermonty/claude-trading-skills3k1 repos~8.1kAutomated safety check: PassMIT
Regimejackson-video-resources/markov-hedge-fund-method484—~1.6kAutomated safety check: PassCustom licence
Factor Dataminihellboy/factorminer123—~856Automated safety check: PassMIT
Mx Stocks Screenerhiboys/ExploreFinance365—~697Automated safety check: PassNone
Akshare Online AlphaLeoYeAI/openclaw-master-skills2.2k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Breadth Chart Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts.

    3k GitHub starsUsed in 1 repo~8.1k tokens
    Business, Finance & HRAuto-check passed
  • Regime

    jackson-video-resources/markov-hedge-fund-method

    Detect the market regime (Bull / Bear / Sideways) for ANY asset and turn it into a tradeable signal or a risk filter.

    484 GitHub stars~1.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Factor Data

    minihellboy/factorminer

    Validate, resample, and ingest market data for factor mining.

    123 GitHub stars~856 tokensUpdated 12 days ago
    Productivity & AutomationAuto-check passed
  • Mx Stocks Screener

    hiboys/ExploreFinance

    基于东方财富数据库,支持通过自然语言输入筛选A港美股、基金、债券等多种资产,支持多元指标筛选,含技术面、消息面、基本面及市场情绪等,可用于全球资产速筛、跨市场监控、投资组合构建、策略回测等场景。返回结果包含数据说明及 csv 文件。Natural language screener for investment assets across global markets, including…

    365 GitHub stars~697 tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Akshare Online Alpha

    LeoYeAI/openclaw-master-skills

    Run Wyckoff master-style analysis from stock codes, holdings (symbol/cost/qty), cash, CSV data, and optional chart images.

    2.2k GitHub stars~1.6k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Anti Gambling Trader

    mars-tw/anti-gambling-trader-tw

    分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…

    907 GitHub stars~1.9k tokensUpdated yesterday
    Documents & OfficeAuto-check passed

More from nicepkg/ai-workflow

All 75 skills in this repo
  • Capture Triage

    nicepkg/ai-workflow

    Processes Drafts Pro captures from the Inbox folder. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~3k tokensUpdated 8 mo ago
    Auto-check passed
  • Legacy To AI Ready

    nicepkg/ai-workflow

    Transform legacy codebases into AI-ready projects with Claude Code configurations.

    285 GitHub stars~2.2k tokensUpdated 8 mo ago
    Auto-check: notes
  • Newsletter Coach

    nicepkg/ai-workflow

    Writing coach that extracts educational content from your daily experiences and turns it into publish-ready newsletter drafts.

    285 GitHub stars~3.7k tokensUpdated 8 mo ago
    Auto-check passed
  • Webfluence

    nicepkg/ai-workflow

    Content web architecture framework. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~1.4k tokensUpdated 8 mo ago
    Auto-check passed
  • Workflow Creator

    nicepkg/ai-workflow

    Create complete Claude Code workflow directories with curated skills.

    285 GitHub stars~2.6k tokensUpdated 8 mo ago
    Auto-check passed
  • Media Processing

    nicepkg/ai-workflow

    Video/audio/image processing with FFmpeg and ImageMagick. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~2.4k tokensUpdated 8 mo ago
    Auto-check: notes

Questions about Stock Screener

What does Stock Screener do?

Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates. Stock Screener is an agent skill from nicepkg/ai-workflow. Filter and screen stocks by financial metrics like P/E ratio, market cap, dividend yield, and growth rates.

When should I use Stock Screener?

Stock Screener fits situations like: tasks that involve Stock and market analysis; tasks that involve CSV and tabular files.

How do I install Stock Screener in Claude Code?

Run `npx skills add nicepkg/ai-workflow --skill stock-screener -a claude-code`. Or copy the skill folder (workflows/stock-trader-workflow/.claude/skills/stock-screener in nicepkg/ai-workflow) into .claude/skills/stock-screener in your project. Claude Code loads it when a task matches its description.

How do I install Stock Screener in Codex?

Run `npx skills add nicepkg/ai-workflow --skill stock-screener -a codex`. Or copy the skill folder (workflows/stock-trader-workflow/.claude/skills/stock-screener in nicepkg/ai-workflow) into .agents/skills/stock-screener in your project. Codex loads it when a task matches its description.

Can I use Stock Screener in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nicepkg/ai-workflow --skill stock-screener -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stock-screener, .gemini/skills/stock-screener, .github/skills/stock-screener and .opencode/skills/stock-screener in your project.

What does Stock Screener need to run?

Going by SKILL.md and its folder, Stock Screener needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Stock Screener access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Stock Screener safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Stock Screener use?

Stock Screener is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stock Screener use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stock Screener?

Skills that share tags, products or a category with Stock Screener: Breadth Chart Analyst (tradermonty/claude-trading-skills, 3k stars), Regime (jackson-video-resources/markov-hedge-fund-method, 484 stars), Factor Data (minihellboy/factorminer, 123 stars) and Mx Stocks Screener (hiboys/ExploreFinance, 365 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stock Screener?

nicepkg (a GitHub organization) maintains it in nicepkg/ai-workflow, which has 285 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on January 20, 2026.

Source: nicepkg/ai-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.