C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib

MITAuto-check: notesData & Analytics

Install Ta Lib

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill ta-lib -a claude-code

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

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills ta-lib --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/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ta-lib .claude/skills/ta-lib && 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
ta-lib
GitHub stars
410
Token cost
~2.4k tokens
SKILL.md length
646 words
Files
5 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib

  • Tasks that involve DataFrames
  • SKILL.md covers What TA-Lib Is, Installation, When to Use TA-Lib vs pandas-ta and Quick Start, plus 6 more sections
  • Runs Python scripts from its folder; calls uv, make and brew; reaches github.com

What it does

Ta Lib is an agent skill from agiprolabs/claude-trading-skills. C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/candlestick_patterns.md`, `references/function_reference.md` and `scripts/compute_indicators.py`).

It sits in Data & Analytics, covering DataFrames. It works with pandas, Python and NumPy. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve DataFrames

Example prompts

  • “/ta-lib”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. 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:

    • uv
    • make
    • brew
    • apt-get
    • wget
    • pip

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    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

Ta Lib loads about 2.4k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 646 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:30
    sudo apt-get install -y ta-lib
  • NoteRuns commands with sudoSKILL.md:38
    make && sudo make install

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 agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 646 words, ~2,422 tokens.

Download SKILL.mdSave it as .claude/skills/ta-lib/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
ta-lib
description
C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib

ta-lib — C-Optimized Technical Analysis

TA-Lib (Technical Analysis Library) is a C library with a Python wrapper providing 150+ technical analysis functions and 61 candlestick pattern recognition functions. It is the industry standard for performance-critical indicator computation, used in production trading systems where pandas-ta or pure-Python alternatives are too slow.

What TA-Lib Is

TA-Lib was originally written in C for financial market data analysis. The Python wrapper (TA-Lib on PyPI, imported as talib) provides:

  • 150+ indicator functions across overlap, momentum, volume, volatility, cycle, and math categories
  • 61 candlestick pattern recognition functions — the most comprehensive pattern library available
  • C-speed computation — 10-100x faster than pure-Python equivalents on large datasets
  • Two APIs: a function API (pass arrays directly) and an abstract API (pass dict of arrays)
  • NumPy native — all inputs and outputs are NumPy arrays

Installation

TA-Lib requires the underlying C library to be installed first:

bash
# macOS
brew install ta-lib
uv pip install TA-Lib numpy pandas

# Ubuntu/Debian
sudo apt-get install -y ta-lib
uv pip install TA-Lib numpy pandas

# From source (any platform)
wget https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz
tar -xzf ta-lib-0.6.4-src.tar.gz
cd ta-lib-0.6.4
./configure --prefix=/usr/local
make && sudo make install
uv pip install TA-Lib numpy pandas

If the C library is not installed, import talib will fail with an ImportError. The scripts in this skill include fallback logic for environments without TA-Lib installed.

When to Use TA-Lib vs pandas-ta

CriterionTA-Libpandas-ta
SpeedC-optimized, 10-100x fasterPure Python, slower on large data
Candlestick patterns61 built-in patternsLimited pattern support
InstallationRequires C librarypip install only
API styleNumPy arraysDataFrame .ta accessor
Indicator count150+130+
StreamingSingle-value update possibleRecompute entire series
DependenciesC lib + numpypandas only

Use TA-Lib when:

  • Processing millions of bars or running backtests at scale
  • You need candlestick pattern recognition (TA-Lib is unmatched here)
  • You are building a production pipeline where latency matters
  • You need cycle indicators (Hilbert Transform family)

Use pandas-ta when:

  • You want DataFrame-native convenience
  • Installation simplicity matters (no C dependency)
  • You need indicators not in TA-Lib (pandas-ta has some extras)

Quick Start

python
import numpy as np
import talib

# Create sample data
close = np.random.randn(100).cumsum() + 50
high = close + np.abs(np.random.randn(100))
low = close - np.abs(np.random.randn(100))
open_ = close + np.random.randn(100) * 0.5
volume = np.random.randint(1000, 10000, 100).astype(float)

# Function API — pass arrays directly
rsi = talib.RSI(close, timeperiod=14)
macd, signal, hist = talib.MACD(close, fastperiod=12, slowperiod=26, signalperiod=9)
upper, middle, lower = talib.BBANDS(close, timeperiod=20, nbdevup=2, nbdevdn=2)
atr = talib.ATR(high, low, close, timeperiod=14)

# Candlestick patterns — return +100 (bullish), -100 (bearish), or 0
doji = talib.CDLDOJI(open_, high, low, close)
hammer = talib.CDLHAMMER(open_, high, low, close)
engulfing = talib.CDLENGULFING(open_, high, low, close)

Function API vs Abstract API

Call functions directly with NumPy arrays:

python
import talib

rsi = talib.RSI(close, timeperiod=14)
sma = talib.SMA(close, timeperiod=20)
upper, mid, lower = talib.BBANDS(close)
Abstract API

Pass a dictionary of arrays and get results by name:

python
from talib import abstract

inputs = {"open": open_, "high": high, "low": low, "close": close, "volume": volume}

# Call by function name
rsi = abstract.RSI(inputs, timeperiod=14)
macd = abstract.MACD(inputs)  # returns (macd, signal, hist)

The abstract API is useful for dynamic indicator selection (e.g., looping over a list of indicator names).

Function Groups

TA-Lib organizes functions into these groups:

Overlap Studies

Moving averages and envelope indicators that overlay price charts.

python
sma = talib.SMA(close, timeperiod=20)
ema = talib.EMA(close, timeperiod=12)
upper, mid, lower = talib.BBANDS(close, timeperiod=20, nbdevup=2, nbdevdn=2)
sar = talib.SAR(high, low, acceleration=0.02, maximum=0.2)
mama, fama = talib.MAMA(close, fastlimit=0.5, slowlimit=0.05)
Momentum Indicators

Oscillators and trend-strength measures.

python
rsi = talib.RSI(close, timeperiod=14)
macd, signal, hist = talib.MACD(close, fastperiod=12, slowperiod=26, signalperiod=9)
slowk, slowd = talib.STOCH(high, low, close)
cci = talib.CCI(high, low, close, timeperiod=14)
willr = talib.WILLR(high, low, close, timeperiod=14)
adx = talib.ADX(high, low, close, timeperiod=14)
mfi = talib.MFI(high, low, close, volume, timeperiod=14)
Volume Indicators

Volume-based analysis functions.

python
obv = talib.OBV(close, volume)
ad = talib.AD(high, low, close, volume)
adosc = talib.ADOSC(high, low, close, volume, fastperiod=3, slowperiod=10)
Volatility Indicators

Measures of price variability.

python
atr = talib.ATR(high, low, close, timeperiod=14)
natr = talib.NATR(high, low, close, timeperiod=14)
trange = talib.TRANGE(high, low, close)
Pattern Recognition (Candlestick)

61 functions that detect candlestick patterns. All return integer arrays:

  • +100 = bullish pattern detected
  • -100 = bearish pattern detected
  • 0 = no pattern
python
# Single patterns
doji = talib.CDLDOJI(open_, high, low, close)
hammer = talib.CDLHAMMER(open_, high, low, close)
engulfing = talib.CDLENGULFING(open_, high, low, close)

# Scan all 61 patterns at once
candle_names = talib.get_function_groups()["Pattern Recognition"]
for name in candle_names:
    func = getattr(talib, name)
    result = func(open_, high, low, close)
    hits = np.nonzero(result)[0]
    if len(hits) > 0:
        print(f"{name}: {len(hits)} detections")

See references/candlestick_patterns.md for the full list of 61 patterns with reliability ratings and crypto relevance.

Show full SKILL.md (239 more words)Show less
Math Transform & Math Operators

Mathematical functions (sin, cos, ln, etc.) and operators (add, sub, mult, div) on arrays. Rarely used directly but available.

Crypto Considerations

24/7 Markets
  • Candlestick patterns designed for traditional markets with opening/closing gaps may behave differently on crypto's continuous markets
  • Gap-based patterns (morning star, evening star) are less reliable without session gaps
  • Body-ratio patterns (doji, hammer, engulfing) still work well on any timeframe
Timeframe Selection
  • 1m-5m: Patterns are noisy; combine with volume confirmation
  • 15m-1h: Good for intraday signals on high-cap tokens
  • 4h-1d: Most reliable for pattern recognition
  • Tip: Higher timeframes produce fewer but more reliable pattern signals
NaN Handling

TA-Lib returns NaN for the initial lookback period of each indicator. Always account for this:

python
rsi = talib.RSI(close, timeperiod=14)
# First 14 values will be NaN
valid_rsi = rsi[~np.isnan(rsi)]
Solana Token Data

When using TA-Lib with Solana token OHLCV data:

  • Ensure arrays are float64 dtype — TA-Lib requires this
  • Sort by timestamp ascending before passing to TA-Lib
  • Handle gaps in low-liquidity token data before computing indicators
python
# Convert to float64 for TA-Lib compatibility
close = df["close"].values.astype(np.float64)
high = df["high"].values.astype(np.float64)
low = df["low"].values.astype(np.float64)

Integration with Other Skills

With pandas-ta

pandas-ta can use TA-Lib as a backend when installed, getting C-speed through the pandas-ta API:

python
import pandas_ta as ta
# pandas-ta auto-detects TA-Lib and uses it for supported indicators
# Set explicitly:
ta.Imports["talib"] = True  # Force TA-Lib backend
df.ta.rsi(length=14)  # Uses TA-Lib under the hood if available
With vectorbt

vectorbt integrates with TA-Lib for fast backtesting:

python
import vectorbt as vbt

# Use TA-Lib indicators in vectorbt
rsi = vbt.talib("RSI").run(close, timeperiod=14)
entries = rsi.real_crossed_below(30)
exits = rsi.real_crossed_above(70)
With Birdeye/DexScreener Data

Fetch OHLCV data from API skills, then process with TA-Lib:

python
# After fetching OHLCV from birdeye-api or dexscreener-api
close = np.array(ohlcv_data["close"], dtype=np.float64)
rsi = talib.RSI(close, timeperiod=14)

Listing Available Functions

python
import talib

# All function groups
groups = talib.get_function_groups()
for group, funcs in groups.items():
    print(f"{group}: {len(funcs)} functions")

# All function names
all_funcs = talib.get_functions()
print(f"Total: {len(all_funcs)} functions")

# Info about a specific function
info = talib.abstract.Function("RSI").info
print(info["display_name"], info["group"])

Files

FileDescription
references/function_reference.mdMost useful functions by category with syntax and parameters
references/candlestick_patterns.mdAll 61 candlestick patterns grouped by type with reliability ratings
scripts/compute_indicators.pyComputes common indicators with TA-Lib/fallback comparison
scripts/pattern_scanner.pyScans OHLCV data for all 61 candlestick patterns

© agiprolabs, 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 4 other files (scripts, references) in skills/ta-lib of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/candlestick_patterns.md
  • references/function_reference.md
  • scripts/compute_indicators.py
  • scripts/pattern_scanner.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Ta Lib 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.

Ta Lib compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ta Lib this skillagiprolabs/claude-trading-skills410—~2.4kAutomated safety check: NotesMIT
Python Executorcortega26/chile-hub1132 repos~1.5kAutomated safety check: PassMIT
Vaex Out-of-Core DataFramesdavila7/claude-code-templates32k12 repos~1.6kAutomated safety check: PassMIT
DaskK-Dense-AI/scientific-agent-skills48k1 repos~4.4kAutomated safety check: NotesBSD-3-Clause
Quant Analystmajiayu000/claude-skill-registry6661 repos~964Automated safety check: PassMIT
Candlestick Pattern SignalsHKUDS/Vibe-Trading35k—~468Automated safety check: PassMIT

Similar skills

  • Python Executor

    cortega26/chile-hub

    Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh).

    113 GitHub starsUsed in 2 repos~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Vaex Out-of-Core DataFrames

    davila7/claude-code-templates

    Processes tabular datasets too large for RAM with Vaex: lazy DataFrames, fast aggregations, big-data plots and ML pipelines over CSV, HDF5, Arrow and Parquet.

    32k GitHub starsUsed in 12 repos~1.6k tokens
    Data & AnalyticsAuto-check passed
  • Dask

    K-Dense-AI/scientific-agent-skills

    Scales pandas, NumPy, and custom Python research workflows beyond memory or across clusters with Dask.

    48k GitHub starsUsed in 1 repo~4.4k tokens
    Data & AnalyticsAuto-check: notes
  • Quant Analyst

    majiayu000/claude-skill-registry

    Expert in quantitative finance, algorithmic trading, and financial data analysis using Python (Pandas/NumPy), statistical modeling, and machine learning.

    666 GitHub starsUsed in 1 repo~964 tokens
    Data & AnalyticsAuto-check passed
  • Candlestick Pattern Signals

    HKUDS/Vibe-Trading

    Detects 15 classic candlestick patterns with vectorized pandas code and combines bullish and bearish scores into a long, short or flat trading signal.

    35k GitHub stars~468 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Ta Lib

What does Ta Lib do?

C-optimized technical analysis with 150+ functions and 61 candlestick pattern recognition functions via TA-Lib. Ta Lib is an agent skill from agiprolabs/claude-trading-skills.

When should I use Ta Lib?

Ta Lib fits situations like: tasks that involve DataFrames.

How do I install Ta Lib in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill ta-lib -a claude-code`. Or copy the skill folder (skills/ta-lib in agiprolabs/claude-trading-skills) into .claude/skills/ta-lib in your project. Claude Code loads it when a task matches its description.

How do I install Ta Lib in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill ta-lib -a codex`. Or copy the skill folder (skills/ta-lib in agiprolabs/claude-trading-skills) into .agents/skills/ta-lib in your project. Codex loads it when a task matches its description.

Can I use Ta Lib 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 agiprolabs/claude-trading-skills --skill ta-lib -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ta-lib, .gemini/skills/ta-lib, .github/skills/ta-lib and .opencode/skills/ta-lib in your project.

What does Ta Lib need to run?

Going by SKILL.md and its folder, Ta Lib needs Python for the scripts in its folder and the command-line tools its instructions call (uv, make, brew, apt-get, wget and pip). Our summary lists: Python 3.

Does Ta Lib access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Ta Lib safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. 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 Ta Lib use?

Ta Lib 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 Ta Lib use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Ta Lib?

Skills that share tags, products or a category with Ta Lib: Python Executor (cortega26/chile-hub, 113 stars), Vaex Out-of-Core DataFrames (davila7/claude-code-templates, 32k stars), Dask (K-Dense-AI/scientific-agent-skills, 48k stars) and Quant Analyst (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ta Lib?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.