Agent skill

US ETF Flow and Sector Breadth

by HKUDS in HKUDS/Vibe-Trading

Tracks institutional money through US ETF creations and redemptions, sector breadth and style flows to read risk appetite and sector rotation.

MITAuto-check passedBusiness, Finance & HR

Install US ETF Flow and Sector Breadth

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill us-etf-flow -a claude-code

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

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading us-etf-flow --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/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/us-etf-flow .claude/skills/us-etf-flow && 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
us-etf-flow
GitHub stars
35k
Token cost
~2.6k tokens
SKILL.md length
688 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Tracks institutional money through US ETF creations and redemptions, sector breadth and style flows to read risk appetite and sector rotation.

  • Works in 5 steps: ETF Flow Mechanics → Major ETF Flow Categories → Sector Rotation Signals → …
  • Reading institutional risk appetite from ETF inflows and outflows
  • SKILL.md covers Overview, Core Concepts, Data Access and Output Format, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill explains how US ETF flows reveal institutional positioning. It describes the creation and redemption process, in which authorized participants swap baskets of securities for new ETF shares when an ETF trades at a premium to net asset value and do the reverse at a discount, and it stresses that flows measure how much money moves rather than where price goes. Daily flow data is presented as faster than 13F filings, which lag by 45 days.

Reference tables cover broad market ETFs such as SPY, IVV, VOO, QQQ, IWM and DIA with the appetite each one reflects, plus a rule that reads simultaneous large-cap and small-cap inflows as risk-on. The SPDR Select Sector ETFs, from XLK to XLB, are mapped to economic sensitivity and cycle phase. The excerpt stops after the sector table, before the breadth, style-factor and thematic momentum material that the description mentions.

When your agent uses it

  • Reading institutional risk appetite from ETF inflows and outflows
  • Judging sector rotation from sector ETF flows and breadth
  • Matching sector ETFs to a stage of the economic cycle
  • Separating real capital flows from price momentum in an ETF

Example prompts

  • “Are SPY and IWM both seeing inflows this month, and does that make the market risk-on?”
  • “Which SPDR sector ETFs fit an early recovery, and how do their flows look?”
  • “Explain why an ETF trading at a premium to NAV leads to creations.”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. ETF Flow Mechanics
  2. Major ETF Flow Categories
  3. Sector Rotation Signals
  4. Thematic ETF Flows
  5. Flow-Based Trading Signals

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are 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

US ETF Flow and Sector Breadth loads about 2.6k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 688 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit e532650, republished under its MIT licence (© HKUDS). 688 words, ~2,560 tokens.

Download SKILL.mdSave it as .claude/skills/us-etf-flow/SKILL.md (or your agent's skills folder).
name
us-etf-flow
description
US ETF fund flow analysis, sector rotation breadth, and style factor flows — track institutional capital movement via ETF creation/redemption, sector breadth signals, and thematic momentum.
category
flow

US ETF Flow & Sector Breadth Analysis

Overview

Track capital flows through US ETFs to identify institutional positioning, sector rotation trends, and risk appetite shifts. ETF flows are a real-time proxy for institutional capital allocation — unlike 13F filings (45-day lag), ETF creation/redemption data is available daily.

Core Concepts

1. ETF Flow Mechanics

Creation / Redemption process:

  • Inflows (creation): Authorized Participants (APs) deliver baskets of underlying securities to the ETF issuer → receive new ETF shares → sell on exchange. This happens when ETF trades at a premium to NAV.
  • Outflows (redemption): APs buy ETF shares on exchange → redeem with issuer for underlying securities → sell securities. This happens when ETF trades at a discount to NAV.
  • Signal interpretation: sustained large inflows = institutional demand; sustained large outflows = institutional liquidation.

Key distinction:

  • ETF price movement ≠ ETF flow. Price can rise on low volume (momentum). Flows require actual capital commitment.
  • Flows are a quantity signal (how much money is moving), not a price signal.
2. Major ETF Flow Categories
Broad Market ETFs
ETFTracking IndexAUMFlow Signal
SPYS&P 500~$500BBroadest equity risk appetite
IVVS&P 500~$400BLong-term institutional allocation
VOOS&P 500~$400BRetail + advisor allocation
QQQNasdaq 100~$250BTech / growth appetite
IWMRussell 2000~$60BSmall-cap risk appetite
DIADow Jones 30~$30BValue / blue-chip sentiment

Interpretation rules:

python
# Broad market flow signals
if spy_flow > 0 and iwm_flow > 0:
    signal = "risk_on"  # Both large and small cap getting inflows
elif spy_flow > 0 and iwm_flow < 0:
    signal = "quality_flight"  # Money rotating to large-cap safety
elif spy_flow < 0 and iwm_flow < 0:
    signal = "risk_off"  # Broad equity outflows
elif spy_flow < 0 and iwm_flow > 0:
    signal = "risk_seeking"  # Rotation from large to small (rare, usually early cycle)
Sector ETFs (SPDR Select Sector)
ETFSectorEconomic SensitivityCycle Phase
XLKTechnologyGrowth / late cycleExpansion
XLFFinancialsRate sensitiveEarly recovery
XLEEnergyCommodity linkedLate cycle / inflation
XLVHealthcareDefensiveRecession
XLYConsumer DiscretionaryCyclicalRecovery
XLPConsumer StaplesDefensiveRecession
XLIIndustrialsCyclicalEarly expansion
XLUUtilitiesDefensive / rate sensitiveLate cycle / recession
XLBMaterialsCommodity linkedEarly cycle
XLREReal EstateRate sensitiveRate-cut cycle
XLCCommunication ServicesGrowth (META, GOOGL)Expansion
Style & Factor ETFs
ETFFactorSignal
IVW / SPYGS&P 500 GrowthGrowth appetite
IVE / SPYVS&P 500 ValueValue rotation
MTUMMSCI USA MomentumTrend following
QUALMSCI USA QualityQuality flight
USMV / SPLVMin VolatilityDefensive positioning
SIZEMSCI USA SizeSmall-cap factor
Fixed Income ETFs
ETFSegmentSignal
TLT20+ Year TreasuryDuration / rate expectations
IEF7-10 Year TreasuryIntermediate rate view
SHY1-3 Year TreasuryCash proxy / safe haven
LQDInvestment Grade CorpCredit appetite
HYG / JNKHigh Yield CorpRisk appetite / credit cycle
TIPTIPSInflation expectations
EMBEM Sovereign DebtEM risk appetite
3. Sector Rotation Signals

Sector breadth analysis:

python
# Sector breadth = number of sectors with positive flows / total sectors
sector_flows = {
    "XLK": +500,  # $500M inflow
    "XLF": +200,
    "XLE": -100,
    "XLV": +50,
    "XLY": -300,
    "XLP": +100,
    "XLI": +150,
    "XLU": -50,
    "XLB": +80,
    "XLRE": -200,
    "XLC": +300,
}

positive_sectors = sum(1 for v in sector_flows.values() if v > 0)
breadth = positive_sectors / len(sector_flows)

# Interpretation
# breadth > 0.7: broad-based inflows → healthy bull market
# breadth 0.4-0.7: selective rotation → stock/sector picker's market
# breadth < 0.4: broad outflows → risk-off environment

Cyclical vs Defensive ratio:

python
cyclical = ["XLK", "XLY", "XLI", "XLF", "XLB"]
defensive = ["XLV", "XLP", "XLU", "XLRE"]

cyclical_flow = sum(sector_flows[s] for s in cyclical)
defensive_flow = sum(sector_flows[s] for s in defensive)

ratio = cyclical_flow / (cyclical_flow + defensive_flow + 1e-10)

# ratio > 0.65: strong risk-on, cyclical leadership
# ratio 0.4-0.65: balanced
# ratio < 0.4: defensive rotation, risk-off
Show full SKILL.md (286 more words)Show less
4. Thematic ETF Flows

Growth / innovation themes:

ThemeKey ETFsWhat It Tracks
AI / SemiconductorsSMH, SOXX, BOTZAI capex cycle
Clean EnergyICLN, TAN, QCLNEnergy transition spend
BiotechXBI, IBBPharma pipeline / M&A cycle
CybersecurityCIBR, HACKSecurity spending cycle
China InternetKWEB, FXIChina tech sentiment
IndiaINDA, SMINIndia growth allocation
Emerging MarketsEEM, VWOEM risk appetite
Gold MinersGDX, GDXJGold price leverage play
BitcoinIBIT, FBTCCrypto institutional adoption

Thematic flow interpretation:

  • Sustained 4-week+ inflows into a theme = institutional conviction, not just hot money
  • Sudden large outflows from a theme that was trending = crowded trade unwind risk
  • Divergence between thematic ETF flow and underlying asset price = potential inflection
5. Flow-Based Trading Signals

Signal construction:

python
def etf_flow_signal(ticker, lookback_days=20):
    """
    Generate trading signal from ETF flow data.
    """
    # Cumulative flow over lookback period
    cum_flow = sum(daily_flows[ticker][-lookback_days:])

    # Flow as % of AUM (normalized)
    flow_pct = cum_flow / aum[ticker]

    # Flow momentum: recent 5-day vs prior 15-day
    recent = sum(daily_flows[ticker][-5:])
    prior = sum(daily_flows[ticker][-20:-5])
    momentum = recent - prior

    # Signal
    if flow_pct > 0.02 and momentum > 0:
        return "strong_inflow"   # Sustained and accelerating
    elif flow_pct > 0.01:
        return "mild_inflow"     # Positive but not accelerating
    elif flow_pct < -0.02 and momentum < 0:
        return "strong_outflow"  # Sustained and accelerating outflows
    elif flow_pct < -0.01:
        return "mild_outflow"
    else:
        return "neutral"

Contrarian vs momentum flow signals:

  • Momentum (follow the flow): works best for broad market ETFs (SPY, QQQ) during trending markets
  • Contrarian (fade extreme flows): works best for sector/thematic ETFs at extreme levels
  • Rule of thumb: 3-standard-deviation flow events in sector ETFs tend to mean-revert within 2-4 weeks

Data Access

Via yfinance
python
import yfinance as yf

# ETF price and volume data
etf = yf.download("SPY", start="2025-01-01", end="2026-03-30", progress=False)

# ETF info (AUM, expense ratio, holdings)
spy = yf.Ticker("SPY")
info = spy.info
print(f"AUM: {info.get('totalAssets')}")
print(f"Expense ratio: {info.get('annualReportExpenseRatio')}")

# Sector weights (for sector ETFs)
# Not directly available via yfinance; use web scraping or manual input
Flow Data Sources
SourceAccessCoverageLatency
ETF.comFree (web)US ETFsT+1
Bloomberg TerminalPaidGlobal ETFsReal-time
ICI (Investment Company Institute)Free (weekly)US mutual fund + ETF aggregateT+7
ETF Database (etfdb.com)Free (web)US ETFsT+1
VettaFiFree (web)US ETFsT+1

Output Format

## ETF Flow Analysis — [Date Range]

### Broad Market Flows
- **SPY**: [+/- $X.XB over N days] — [risk-on / risk-off signal]
- **QQQ**: [+/- $X.XB] — [tech appetite]
- **IWM**: [+/- $X.XB] — [small-cap sentiment]
- **Overall**: [risk-on / selective / risk-off]

### Sector Rotation
- **Inflow leaders**: [sector1 +$XM, sector2 +$XM]
- **Outflow leaders**: [sector1 -$XM, sector2 -$XM]
- **Breadth**: X/11 sectors with positive flows
- **Cyclical/Defensive ratio**: X.XX [risk-on / balanced / defensive]

### Style Factor Flows
- **Growth vs Value**: [growth leading / value leading / balanced]
- **Momentum**: [inflow / outflow]
- **Quality/MinVol**: [inflow = defensive, outflow = risk-on]

### Fixed Income Flows
- **Duration signal**: TLT [inflow/outflow] → [rate cut expectations / rate concern]
- **Credit signal**: HYG [inflow/outflow] → [credit cycle expansion / contraction]
- **Inflation signal**: TIP [inflow/outflow] → [rising / falling inflation expectations]

### Thematic Highlights
- [Theme1 ETF]: [flow trend and implication]
- [Theme2 ETF]: [flow trend and implication]

### Composite Signal
| Dimension | Signal | Basis |
|-----------|--------|-------|
| Risk appetite | [on/off] | SPY+QQQ flows, C/D ratio |
| Sector rotation | [early/mid/late cycle] | Sector flow pattern |
| Rate expectations | [cuts/hold/hikes] | TLT + TIP flows |

### Investment Implication
- **Positioning**: [overweight equities / neutral / underweight]
- **Sector tilts**: [overweight X, underweight Y]
- **Risk level**: [high / moderate / low]

Notes

  • ETF flows are a proxy for institutional behavior, not a standalone signal; combine with price action and fundamentals
  • Large single-day flows can be rebalancing-driven (quarter-end, index reconstitution) rather than directional
  • Options-related ETF activity (hedging via SPY puts) can distort flow signals
  • International ETF flows (EEM, FXI, INDA) are useful for global macro positioning
  • This framework is for research purposes only and does not constitute investment advice

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

Files

Just SKILL.md in agent/src/skills/us-etf-flow of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit e532650

Compare with similar skills

US ETF Flow and Sector Breadth 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.

US ETF Flow and Sector Breadth compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
US ETF Flow and Sector Breadth this skillHKUDS/Vibe-Trading35k—~2.6kAutomated safety check: PassMIT
AI-Trader Market IntelHKUDS/AI-Trader23k—~1.1kAutomated safety check: PassNone
Stock Deep Analysis Workflowwbh604/UZI-Skill7.1k—~9.1kAutomated safety check: NotesMIT
Zhengxi Fund Manager Views Librarylyra81604/zhengxi-views1.8k—~1.6kAutomated safety check: PassMIT
Supply Chain Bottleneck Hunterxbtlin/ai-berkshire17k—~2.6kAutomated safety check: PassMIT
Deep Company Article Seriesxbtlin/ai-berkshire17k—~2kAutomated safety check: PassMIT

Similar skills

  • AI-Trader Market Intel

    HKUDS/AI-Trader

    Reads AI-Trader's read-only market snapshots, grouped financial news and events board through its market-intel endpoints, for context before trading or posting.

    23k GitHub stars~1.1k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.

    7.1k GitHub stars~9.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check: notes
  • Zhengxi Fund Manager Views Library

    lyra81604/zhengxi-views

    Answers questions with sourced quotes from one Chinese fund manager's public writings, applies his stated investment method and compares his words with real fund holdings.

    1.8k GitHub stars~1.6k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Scans a long-running industry trend for supply chain chokepoints, aiming to find second- and third-layer suppliers that the market has not yet priced in.

    17k GitHub stars~2.6k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Deep Company Article Series

    xbtlin/ai-berkshire

    Plans and writes a three-to-eight-part long-form article series that breaks down one company, built on fact-checked financials, valuation and management analysis.

    17k GitHub stars~2k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Longbridge Earnings

    helsome/folio

    Earnings analysis — pre- and post-earnings. An agent skill from helsome/folio.

    270 GitHub starsUsed in 1 repo~2.5k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Questions about US ETF Flow and Sector Breadth

What does US ETF Flow and Sector Breadth do?

Tracks institutional money through US ETF creations and redemptions, sector breadth and style flows to read risk appetite and sector rotation. This skill explains how US ETF flows reveal institutional positioning. It describes the creation and redemption process, in which authorized participants swap baskets of securities for new ETF shares when an ETF trades at a premium to net asset value and do the reverse at a discount, and it stresses that flows measure how much money moves rather than where price goes.

When should I use US ETF Flow and Sector Breadth?

US ETF Flow and Sector Breadth fits situations like: reading institutional risk appetite from ETF inflows and outflows; judging sector rotation from sector ETF flows and breadth; matching sector ETFs to a stage of the economic cycle; separating real capital flows from price momentum in an ETF.

How do I install US ETF Flow and Sector Breadth in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill us-etf-flow -a claude-code`. Or copy the skill folder (agent/src/skills/us-etf-flow in HKUDS/Vibe-Trading) into .claude/skills/us-etf-flow in your project. Claude Code loads it when a task matches its description.

How do I install US ETF Flow and Sector Breadth in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill us-etf-flow -a codex`. Or copy the skill folder (agent/src/skills/us-etf-flow in HKUDS/Vibe-Trading) into .agents/skills/us-etf-flow in your project. Codex loads it when a task matches its description.

Can I use US ETF Flow and Sector Breadth 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 HKUDS/Vibe-Trading --skill us-etf-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/us-etf-flow, .gemini/skills/us-etf-flow, .github/skills/us-etf-flow and .opencode/skills/us-etf-flow in your project.

What does US ETF Flow and Sector Breadth need to run?

SKILL.md names no scripts, command-line tools or credentials: US ETF Flow and Sector Breadth is instructions for the agent only.

Does US ETF Flow and Sector Breadth 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 US ETF Flow and Sector Breadth 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. Review the folder before installing.

What licence does US ETF Flow and Sector Breadth use?

US ETF Flow and Sector Breadth 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 US ETF Flow and Sector Breadth use?

About 2.6k tokens (SKILL.md is roughly 10k 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 US ETF Flow and Sector Breadth?

Skills that share tags, products or a category with US ETF Flow and Sector Breadth: AI-Trader Market Intel (HKUDS/AI-Trader, 23k stars), Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars), Zhengxi Fund Manager Views Library (lyra81604/zhengxi-views, 1.8k stars) and Supply Chain Bottleneck Hunter (xbtlin/ai-berkshire, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains US ETF Flow and Sector Breadth?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,043 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

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