/tradecraft:smc-python-libraryfrom tradecraft
Python library implementing 8 ICT/SMC indicators (FVG, swing highs/lows, BOS/CHoCH, order blocks, liquidity, kill zones, retracements) on OHLC DataFrames. Install via pip.
Ships in tradecraft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
USE FOR:
Python library implementing all core ICT/SMC indicators on OHLC DataFrames.
pip install smartmoneyconcepts["open", "high", "low", "close", "volume"]pip install smartmoneyconcepts
from smartmoneyconcepts import smc
import pandas as pd
fvg = smc.fvg(ohlc, join_consecutive=False)
Returns per row:
FVG: 1 (bullish gap) · -1 (bearish gap) · NaN (no gap)Top: upper boundary of the gapBottom: lower boundary of the gapMitigatedIndex: candle index that closed/filled the gapConcept:
Bullish FVG: candle[i-1].high < candle[i+1].low → gap above
Bearish FVG: candle[i-1].low > candle[i+1].high → gap below
Parameters:
join_consecutive=True: merges adjacent FVGs → single zone (highest top, lowest bottom)swings = smc.swing_highs_lows(ohlc, swing_length=50)
Returns:
HighLow: 1 (swing high) · -1 (swing low) · NaNLevel: price of the swing pointConcept:
Swing High: highest high within swing_length candles before AND after
Swing Low: lowest low within swing_length candles before AND after
# Requires swing_highs_lows output first
swings = smc.swing_highs_lows(ohlc, swing_length=50)
structure = smc.bos_choch(ohlc, swings, close_break=True)
Returns:
BOS: 1 (bullish BOS) · -1 (bearish BOS)CHOCH: 1 (bullish CHoCH) · -1 (bearish CHoCH)Level: price level that was brokenBrokenIndex: candle that broke the levelclose_break parameter:
True → break confirmed only when candle CLOSES beyond level
False → break on wick touch (high/low crosses level)
BOS vs CHoCH:
BOS → continuation: structure break in direction of trend
CHoCH → reversal: structure break AGAINST current trend direction
swings = smc.swing_highs_lows(ohlc, swing_length=50)
ob = smc.ob(ohlc, swings, close_mitigation=False)
Returns:
OB: 1 (bullish OB) · -1 (bearish OB)Top: upper boundaryBottom: lower boundaryOBVolume: sum of current + 2 previous candle volumesPercentage: strength = min(highVol, lowVol) / max(highVol, lowVol)Strength interpretation:
Percentage → 1.0 (100%) = equal bull/bear volume = strongest OB
Percentage → 0.1 (10%) = highly imbalanced = weaker OB
swings = smc.swing_highs_lows(ohlc, swing_length=50)
liq = smc.liquidity(ohlc, swings, range_percent=0.01)
Returns:
Liquidity: 1 (buy-side) · -1 (sell-side)Level: price of liquidity clusterEnd: index of last swing in the clusterSwept: index of candle that swept the liquidityConcept:
Multiple swing highs within range_percent (1%) of each other
→ clustered stops/liquidity pool above = buy-side liquidity
→ price will likely sweep these before reversing
prev_hl = smc.previous_high_low(ohlc, time_frame="1D")
Returns:
PreviousHigh · PreviousLowBrokenHigh: 1 when price breaks prior period highBrokenLow: 1 when price breaks prior period lowSupported timeframes: "15m" · "1H" · "4H" · "1D" · "1W" · "1M"
session = smc.sessions(ohlc, session="London open kill zone",
start_time=None, end_time=None, time_zone="UTC")
Built-in sessions:
"Sydney" "Tokyo"
"London" "New York"
"Asian kill zone" "London open kill zone"
"New York kill zone" "london close kill zone"
"Custom" → requires start_time + end_time "HH:MM"
Returns:
Active: 1 if candle is within session · 0 if notHigh: session high so farLow: session low so farswings = smc.swing_highs_lows(ohlc, swing_length=50)
ret = smc.retracements(ohlc, swings)
Returns:
Direction: 1 (bullish move) · -1 (bearish move)CurrentRetracement%: current retracement from last swingDeepestRetracement%: max retracement seen in this movefrom smartmoneyconcepts import smc
import pandas as pd
# Load OHLCV data (lowercase columns required)
df = pd.read_csv("EURUSD_H1.csv")
df.columns = ["open", "high", "low", "close", "volume"]
# Step 1: Swing structure (prerequisite for most indicators)
swings = smc.swing_highs_lows(df, swing_length=20)
# Step 2: Market structure
structure = smc.bos_choch(df, swings, close_break=True)
# Step 3: Order blocks
ob = smc.ob(df, swings, close_mitigation=False)
# Step 4: Fair value gaps
fvg = smc.fvg(df, join_consecutive=True)
# Step 5: Liquidity pools
liq = smc.liquidity(df, swings, range_percent=0.005)
# Step 6: Session filter (only trade London open kill zone)
session = smc.sessions(df, session="London open kill zone")
# Step 7: Previous day high/low
prev_hl = smc.previous_high_low(df, time_frame="1D")
# Combine: find bullish OBs that are active during London kill zone
bullish_ob = ob[ob["OB"] == 1]
london_active = session[session["Active"] == 1]
confluence = bullish_ob.index.intersection(london_active.index)
print(f"Bullish OBs during London KZ: {len(confluence)}")
def find_confluences(df, swing_length=20):
swings = smc.swing_highs_lows(df, swing_length)
bos = smc.bos_choch(df, swings, close_break=True)
ob = smc.ob(df, swings)
fvg = smc.fvg(df)
liq = smc.liquidity(df, swings, range_percent=0.005)
signals = []
for i in df.index:
bullish = (
ob.loc[i, "OB"] == 1 if i in ob.index else False, # Bullish OB
fvg.loc[i, "FVG"] == 1 if i in fvg.index else False, # Bullish FVG
bos.loc[i, "BOS"] == 1 if i in bos.index else False, # BOS up
)
if all(bullish):
signals.append({"index": i, "type": "LONG", "level": ob.loc[i, "Bottom"]})
return pd.DataFrame(signals)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mahmoud20138/tradecraft --plugin tradecraft169 skills in this plugin
/agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agentic-storageAgentic storage architecture — persistent memory for AI agents using MCP, immutable versioning, sandboxing, and intent validation. Covers the stateless problem in LLM agents, RAG limitations (read-only), MCP protocol (JSON-RPC, resources, tools), storage safety layers, and agent file system design. Source: IBM Technology (Martin Keen), March 2026. Use this skill for "agentic storage", "agent memory", "persistent agent state", "MCP storage", "agent file system", "agent hard drive", "stateless agent problem", "agent work product", "immutable versioning", "agent sandboxing", "intent validation", "agent safety layers", "agent context window limits", "storage for AI agents", "agent persistence", "autonomous agent storage", "agent audit trail". Works with mcp-integration, trading-brain, agents, trade-psychology-coach.
Other plugins' skills for the same job