Trade psychology coach
Skill mahmoud20138/Tradecraft/plugins/tradecraft/skills/trade-psychology-coach
102 Claude Code skills across 7 categories -- trading strategies, Azure, VSCode extensions, AI prompts, and custom automation skills
npx -y skills add mahmoud20138/Tradecraft --skill trade-psychology-coachAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Trading psychology monitoring — tilt detection, emotional state tracking, trade-psychology-coach bias alerts, discipline scoring, and behavioral pattern recognition. Use for "trading psychology", "am I tilted", "revenge trading", "emotional trading", "discipline check", "trading mindset", "fear of missing out", "FOMO", "trading emotions", "overtrading detection", "psychology check", or any trading psychology question. Works with trade-journal-performance and drawdown-playbook.
SKILL.md
6.1 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Trade Psychology Coach
import pandas as pd, numpy as np
from datetime import datetime, timedelta
class TradePsychologyCoach:
@staticmethod
def tilt_detector(trades: pd.DataFrame) -> dict:
"""Detect revenge trading and tilt from trade patterns."""
if trades.empty or len(trades) < 5: return {"tilt_level": "INSUFFICIENT DATA"}
recent = trades.tail(10)
# Signs of tilt
signals = []
consecutive_losses = 0
for _, t in recent.iterrows():
if t.get("pnl_pips", 0) < 0: consecutive_losses += 1
else: consecutive_losses = 0
if consecutive_losses >= 3: signals.append(f"3+ consecutive losses ({consecutive_losses})")
# Increasing position sizes after losses
if len(recent) >= 4:
last_lots = recent["lot_size"].tail(3).values
if all(last_lots[i] > last_lots[i-1] for i in range(1, len(last_lots))):
signals.append("DANGER: Increasing size after losses (revenge pattern)")
# Rapid-fire trading
if "entry_time" in recent.columns and len(recent) >= 3:
times = pd.to_datetime(recent["entry_time"])
gaps = times.diff().dt.total_seconds() / 60
if gaps.tail(3).mean() < 15:
signals.append("Rapid-fire entries (<15 min apart) — possible overtrading")
# Wider stops (desperation)
if "stop_loss" in recent.columns and "entry_price" in recent.columns:
sl_distances = abs(recent["entry_price"] - recent["stop_loss"])
if sl_distances.tail(3).mean() > sl_distances.mean() * 1.5:
signals.append("Stop losses widening — possible hope trading")
tilt_level = "HIGH" if len(signals) >= 3 else "MODERATE" if len(signals) >= 2 else "ELEVATED" if signals else "CALM"
return {
"tilt_level": tilt_level,
"signals": signals,
"consecutive_losses": consecutive_losses,
"action": {
"HIGH": "STOP TRADING IMMEDIATELY. Walk away for minimum 4 hours. Review journal.",
"MODERATE": "Take a 30-minute break. Reduce position size by 50%.",
"ELEVATED": "Be extra cautious. Only take A+ setups.",
"CALM": "Emotional state appears normal. Continue with plan.",
}[tilt_level],
}
@staticmethod
def trade-psychology-coach_bias_check(trade_context: dict) -> list[dict]:
"""Flag common trade-psychology-coach biases that may be affecting decision-making."""
biases = []
if trade_context.get("adding_to_loser"):
biases.append({"bias": "Sunk Cost Fallacy", "fix": "Your average price is irrelevant. Would you enter this trade fresh at current price?"})
if trade_context.get("moved_stop_loss_further"):
biases.append({"bias": "Loss Aversion", "fix": "A stop loss is a contract with yourself. Moving it breaks trust with your system."})
if trade_context.get("closed_winner_early"):
biases.append({"bias": "Disposition Effect", "fix": "You cut winners short and let losers run. Reverse this: trail winners, cut losers fast."})
if trade_context.get("entered_because_others_said"):
biases.append({"bias": "Herding", "fix": "Other people's analysis is noise unless you independently verified it."})
if trade_context.get("big_win_then_bigger_risk"):
biases.append({"bias": "House Money Effect", "fix": "Profits are real money, not 'house money'. Maintain standard risk."})
if trade_context.get("missed_trade_then_chased"):
biases.append({"bias": "FOMO", "fix": "There will always be another setup. Chasing fills at bad prices is -EV."})
return biases
@staticmethod
def discipline_score(journal: pd.DataFrame) -> dict:
"""Score trading discipline from journal data."""
if journal.empty: return {"score": 0, "error": "No journal data"}
scores = []
if "followed_plan" in journal.columns:
scores.append(journal["followed_plan"].mean() * 100)
if "setup_type" in journal.columns:
has_setup = (journal["setup_type"] != "").mean() * 100
scores.append(has_setup)
if "lot_size" in journal.columns and "pnl_pips" in journal.columns:
losers = journal[journal["pnl_pips"] < 0]
if len(losers) > 0:
size_after_loss = journal["lot_size"].shift(-1).loc[losers.index]
increased = (size_after_loss > losers["lot_size"]).mean()
scores.append((1 - increased) * 100)
avg = np.mean(scores) if scores else 0
return {
"discipline_score": round(avg, 1),
"grade": "A" if avg >= 85 else "B" if avg >= 70 else "C" if avg >= 55 else "D" if avg >= 40 else "F",
"components": scores,
}
@staticmethod
def pre_trade_checklist() -> dict:
return {
"questions": [
"Am I following my trading plan?",
"Is this setup in my playbook (not a random idea)?",
"Am I trading because the setup is there, or because I WANT to trade?",
"Would I take this trade if I'd just had 3 losses in a row?",
"Is my position size within my rules?",
"Have I defined my exit BEFORE entering?",
"Am I emotionally neutral right now?"],
"rule": "If ANY answer is NO or uncertain — do NOT take the trade.",
}
Gives 0 of the 12 instructions most learn study skills give in ~1.3k tokens
Counted across 546 of the 573 authors here whose files we hold, read 2026-08-06
- produce self-contained HTML lessonsin 24 of 546, across 8 files
- record user preferences in a notes filein 23 of 546, across 5 files
- calculate the zone of proximal development before teachingin 23 of 546, across 6 files
- maintain a teaching workspace in the current directoryin 21 of 546, across 4 files
- make lessons beautiful, short, and quickly completablein 19 of 546, across 3 files
- create reusable components for lessonsin 19 of 546, across 5 files
- create compressed reference documents for quick lookupin 19 of 546, across 3 files
- find high-quality resources before writing lessonsin 18 of 546, across 4 files
- update the mission file and records upon mission changesin 16 of 546, across 2 files
- set min_dist to 0.0 for clustering preprocessingin 16 of 546, across 6 files
- populate the mission file before teachingin 15 of 546, across 1 file
- include interactive feedback loops in lessonsin 15 of 546, across 1 file
Said here and by no other author read
- Detect revenge trading and tilt
- Score trading discipline from journal data
- Flag common cognitive biases affecting decisions
- Stop trading immediately if tilt level is high
- Take a 30-minute break if tilt level is moderate
- Reduce position size by 50% if tilt level is moderate
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.