Agent skill

Trade Journal

by agiprolabs in agiprolabs/claude-trading-skills

Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement

MITAuto-check passedBusiness, Finance & HR

Install Trade Journal

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill trade-journal -a claude-code

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

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills trade-journal --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/trade-journal .claude/skills/trade-journal && 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
trade-journal
GitHub stars
410
Token cost
~2.6k tokens
SKILL.md length
557 words
Files
5 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement

  • Tasks that involve Journaling and reflection
  • SKILL.md covers Why Journaling Matters, Trade Record Structure, Storage Format and Analytics from Journal Data, plus 6 more sections
  • Runs Python scripts from its folder; calls python
  • Tasks that involve Performance reviews

What it does

Trade Journal is an agent skill from agiprolabs/claude-trading-skills. Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement

Its SKILL.md is about 2.6k 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/record_format.md`, `references/review_framework.md` and `scripts/journal_analyzer.py`).

It sits in Business, Finance & HR, covering Journaling and reflection and Performance reviews. 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 Journaling and reflection
  • Tasks that involve Performance reviews

Example prompts

  • “/trade-journal”

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:

    • 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

Trade Journal loads about 2.6k tokens when it runs, and up to ~6.6k if it reads all its reference files. Until then it costs about 35 tokens; SKILL.md has 557 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.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); 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). 557 words, ~2,604 tokens.

Download SKILL.mdSave it as .claude/skills/trade-journal/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
trade-journal
description
Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement

Trade Journal

Structured trade journaling for systematic improvement. Log every trade with context, review performance at multiple cadences, detect behavioral patterns that destroy edge, and attribute returns to specific strategies.

Why Journaling Matters

Most traders fail not from bad strategies but from bad behavior. A trade journal transforms subjective "feel" into objective data:

  • Strategy Attribution: Know which setups actually make money vs. which feel profitable
  • Behavioral Detection: Catch revenge trading, FOMO entries, and premature exits before they compound
  • Pattern Recognition: Discover that your Monday morning trades lose money, or that you cut SOL winners too early
  • Accountability: Written rationale before entry forces deliberate decision-making
  • Improvement Tracking: Measure whether changes to your process actually improve results

Without a journal, you optimize on noise. With one, you optimize on signal.

Trade Record Structure

Every trade record captures context at entry and outcome at exit. See references/record_format.md for the complete 18-field schema.

Minimum Required Fields
python
trade = {
    "id": "T-20250310-001",
    "token": "SOL",
    "direction": "long",
    "entry_date": "2025-03-10T14:30:00Z",
    "entry_price": 142.50,
    "size_sol": 5.0,
    "strategy": "momentum-breakout",
    "rationale": "Breaking above 4h resistance at 141.80 with volume confirmation",
    "exit_date": "2025-03-10T16:45:00Z",
    "exit_price": 146.20,
    "pnl_sol": 0.648,
    "outcome": "win",
    "lessons": "Held through initial pullback to 143.0, rewarded for patience"
}
Strategy Tagging

Use consistent tags to enable performance attribution:

CategoryTags
Momentummomentum-breakout, trend-continuation, pullback-entry
Mean Reversionrange-fade, oversold-bounce, deviation-snap
Event-Drivenlisting-play, catalyst-trade, news-reaction
On-Chainwhale-follow, wallet-copy, flow-signal
DeFilp-entry, yield-farm, arb-capture
Rationale Templates

Write rationale before entering. Templates by setup type:

Momentum: "[Token] breaking [level] on [timeframe] with [confirmation]. Target [price], stop [price]."
Mean Reversion: "[Token] at [X] std devs from [mean] on [timeframe]. Expecting reversion to [target]."
On-Chain: "[Signal type] detected — [wallet/flow description]. Historical hit rate [X]%."

Storage Format

The journal uses JSON for structured querying and CSV for spreadsheet compatibility.

JSON Format (Primary)
json
{
  "journal_version": "1.0",
  "trader_id": "anon",
  "trades": [
    {
      "id": "T-20250310-001",
      "token": "SOL",
      "direction": "long",
      "entry_date": "2025-03-10T14:30:00Z",
      "entry_price": 142.50,
      "size_sol": 5.0,
      "size_usd": 712.50,
      "strategy": "momentum-breakout",
      "setup_quality": 8,
      "rationale": "Breaking above 4h resistance with volume",
      "exit_date": "2025-03-10T16:45:00Z",
      "exit_price": 146.20,
      "pnl_sol": 0.648,
      "pnl_pct": 2.60,
      "outcome": "win",
      "hold_time_minutes": 135,
      "emotional_state": "calm",
      "lessons": "Patience through pullback paid off",
      "tags": ["high-conviction", "clean-setup"]
    }
  ]
}
CSV Format (Export)
id,token,direction,entry_date,entry_price,size_sol,strategy,exit_date,exit_price,pnl_sol,pnl_pct,outcome,lessons
T-20250310-001,SOL,long,2025-03-10T14:30:00Z,142.50,5.0,momentum-breakout,2025-03-10T16:45:00Z,146.20,0.648,2.60,win,"Patience paid off"

Analytics from Journal Data

Win Rate by Strategy
python
from collections import Counter

def win_rate_by_strategy(trades: list[dict]) -> dict[str, float]:
    """Compute win rate grouped by strategy tag."""
    strategy_outcomes: dict[str, list[str]] = {}
    for t in trades:
        strat = t["strategy"]
        strategy_outcomes.setdefault(strat, []).append(t["outcome"])

    return {
        strat: outcomes.count("win") / len(outcomes)
        for strat, outcomes in strategy_outcomes.items()
        if len(outcomes) >= 5  # minimum sample size
    }
Performance by Time of Day
python
from datetime import datetime

def pnl_by_hour(trades: list[dict]) -> dict[int, float]:
    """Aggregate P&L by entry hour (UTC)."""
    hourly: dict[int, float] = {}
    for t in trades:
        hour = datetime.fromisoformat(t["entry_date"].rstrip("Z")).hour
        hourly[hour] = hourly.get(hour, 0.0) + t.get("pnl_sol", 0.0)
    return dict(sorted(hourly.items()))
Profit Factor by Token Type
python
def profit_factor(trades: list[dict], group_key: str = "token") -> dict[str, float]:
    """Compute profit factor (gross wins / gross losses) by grouping key."""
    groups: dict[str, dict[str, float]] = {}
    for t in trades:
        key = t.get(group_key, "unknown")
        groups.setdefault(key, {"wins": 0.0, "losses": 0.0})
        pnl = t.get("pnl_sol", 0.0)
        if pnl > 0:
            groups[key]["wins"] += pnl
        else:
            groups[key]["losses"] += abs(pnl)

    return {
        k: v["wins"] / v["losses"] if v["losses"] > 0 else float("inf")
        for k, v in groups.items()
    }

Behavioral Pattern Detection

The journal enables detection of destructive trading patterns. See references/review_framework.md for the full framework.

Revenge Trading

Rapid re-entry after a loss, often with larger size:

python
def detect_revenge_trades(trades: list[dict], max_gap_minutes: int = 15) -> list[dict]:
    """Find trades entered within max_gap_minutes of a losing exit."""
    sorted_trades = sorted(trades, key=lambda t: t["entry_date"])
    revenge = []
    for i in range(1, len(sorted_trades)):
        prev, curr = sorted_trades[i - 1], sorted_trades[i]
        if prev["outcome"] == "loss":
            prev_exit = datetime.fromisoformat(prev["exit_date"].rstrip("Z"))
            curr_entry = datetime.fromisoformat(curr["entry_date"].rstrip("Z"))
            gap = (curr_entry - prev_exit).total_seconds() / 60
            if gap <= max_gap_minutes:
                revenge.append(curr)
    return revenge
FOMO Detection

Entering after large moves without proper setup:

  • Entry rationale is vague or missing
  • Setup quality self-rated below 5/10
  • Entry during a move that already exceeded 1 ATR
Cutting Winners / Riding Losers
python
def winner_loser_hold_times(trades: list[dict]) -> dict[str, float]:
    """Compare average hold time for wins vs losses."""
    win_times = [t["hold_time_minutes"] for t in trades if t["outcome"] == "win"]
    loss_times = [t["hold_time_minutes"] for t in trades if t["outcome"] == "loss"]
    return {
        "avg_win_hold_min": sum(win_times) / len(win_times) if win_times else 0,
        "avg_loss_hold_min": sum(loss_times) / len(loss_times) if loss_times else 0,
    }
    # RED FLAG: if avg_loss_hold > avg_win_hold, you're cutting winners and riding losers
Tilt Detection

Size escalation after losses suggests emotional trading:

python
def detect_tilt(trades: list[dict], threshold: float = 1.5) -> list[dict]:
    """Flag trades where size increased >threshold after a loss."""
    tilt_trades = []
    for i in range(1, len(trades)):
        prev, curr = trades[i - 1], trades[i]
        if prev["outcome"] == "loss" and curr["size_sol"] > prev["size_sol"] * threshold:
            tilt_trades.append(curr)
    return tilt_trades

Review Cadence

Daily Review (5 minutes)
  • How many trades today? P&L?
  • Did I follow my rules on every trade?
  • Any emotional decisions?
  • One thing I did well, one thing to improve
Show full SKILL.md (224 more words)Show less
Weekly Review (30 minutes)
  • Win rate and profit factor by strategy
  • Behavioral pattern check (revenge trades, tilt, FOMO)
  • Best and worst trade of the week — what made them different?
  • Strategy performance vs. expectations
  • Adjust position sizing if needed
Monthly Review (2 hours)
  • Full strategy attribution analysis
  • Equity curve review — drawdown periods and recovery
  • Compare actual vs. planned risk per trade
  • Performance by token type, time of day, day of week
  • Are any strategies consistently losing? Consider dropping them
  • Review and update strategy parameters

See references/review_framework.md for detailed review checklists and questions.

Partial Exits and Scaled Entries

Real trading involves scaling in and out. The journal handles this with child records:

python
# Parent trade with two scale-out exits
parent = {
    "id": "T-20250310-001",
    "token": "BONK",
    "direction": "long",
    "entry_date": "2025-03-10T14:30:00Z",
    "entry_price": 0.000023,
    "size_sol": 10.0,
    "strategy": "momentum-breakout",
    "exits": [
        {"date": "2025-03-10T15:00:00Z", "price": 0.000025, "size_pct": 50, "reason": "first-target"},
        {"date": "2025-03-10T16:30:00Z", "price": 0.000028, "size_pct": 50, "reason": "trailing-stop"},
    ]
}

See references/record_format.md for full documentation of partial exit handling.

Files

References
  • references/record_format.md — Complete 18-field trade record schema, field descriptions, tagging taxonomy, CSV/JSON examples, partial exit handling
  • references/review_framework.md — Daily/weekly/monthly review checklists, behavioral red flags, performance decay detection
Scripts
  • scripts/trade_logger.py — CLI trade logger: add, list, update, compute stats, filter, demo mode (stdlib only)
  • scripts/journal_analyzer.py — Journal analysis: strategy performance, behavioral patterns, time-based analysis, demo mode (stdlib only)

Dependencies

Both scripts use Python standard library only (json, datetime, argparse, collections). No external packages required.

bash
# No installation needed — stdlib only
python scripts/trade_logger.py --demo
python scripts/journal_analyzer.py --demo

Disclaimer

This skill provides tools for trade record-keeping and performance analysis. It does not provide financial advice, trading recommendations, or guarantee any trading outcomes. All analysis is informational and for personal review purposes only.

© 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/trade-journal of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/record_format.md
  • references/review_framework.md
  • scripts/journal_analyzer.py
  • scripts/trade_logger.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Trade Journal 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.

Trade Journal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trade Journal this skillagiprolabs/claude-trading-skills410—~2.6kAutomated safety check: PassMIT
Openclaw BossLeoYeAI/openclaw-master-skills2.2k—~2.5kAutomated safety check: PassMIT
Trading As Businessagentii-ai/agentii-investment-intelligence207—~655Automated safety check: PassApache-2.0
Job Application Managerreactive-resume/reactive-resume44k—~13kAutomated safety check: PassMIT
Wp Performance Reviewelvismdev/claude-wordpress-skills2351 repos~4.5kAutomated safety check: PassMIT
Align Humanagentscope-ai/OpenJudge871—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Openclaw Boss

    LeoYeAI/openclaw-master-skills

    OpenClaw 老板 - 你的 AI 老板来了!🦞 你以为你在养龙虾?有没有可能龙虾才是老板,你成了给 AI 打工的牛马?根据对话历史生成真实、严厉、有趣的用户评价报告。Use when: user asks for self-reflection, user profile, performance review, or analysis.

    2.2k GitHub stars~2.5k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Trading As Business

    agentii-ai/agentii-investment-intelligence

    Trading as a business, performance review process, trade journaling, capital allocation discipline, business infrastructure for traders, KPI tracking for trading operations

    207 GitHub stars~655 tokensUpdated 11 days ago
    Business, Finance & HRAuto-check passed
  • Job Application Manager

    reactive-resume/reactive-resume

    Runs the job-search pipeline. An agent skill from reactive-resume/reactive-resume.

    44k GitHub stars~13k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Wp Performance Review

    elvismdev/claude-wordpress-skills

    WordPress performance code review and optimization analysis.

    235 GitHub starsUsed in 1 repo~4.5k tokens
    Business, Finance & HRAuto-check passed
  • Align Human

    agentscope-ai/OpenJudge

    A skill your agent uses when the user has a judge/grader and human-labeled data, and wants to measure how well the judge agrees with humans, detect systematic biases, determine whether automatic…

    871 GitHub stars~3.1k tokensUpdated 29 days ago
    Business, Finance & HRAuto-check passed
  • Run Mv Hoi Reconstruction

    nvidia-isaac/video_to_data

    Run and validate the repository-local multi-view camera calibration and human-object reconstruction pipelines.

    861 GitHub stars~1.5k tokensUpdated yesterday
    Business, Finance & HRAuto-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 Trade Journal

What does Trade Journal do?

Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement. Trade Journal is an agent skill from agiprolabs/claude-trading-skills.

When should I use Trade Journal?

Trade Journal fits situations like: tasks that involve Journaling and reflection; tasks that involve Performance reviews.

How do I install Trade Journal in Claude Code?

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

How do I install Trade Journal in Codex?

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

Can I use Trade Journal 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 trade-journal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trade-journal, .gemini/skills/trade-journal, .github/skills/trade-journal and .opencode/skills/trade-journal in your project.

What does Trade Journal need to run?

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

Does Trade Journal 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 Trade Journal 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 Trade Journal use?

Trade Journal 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 Trade Journal 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. Its references folder adds about 4k tokens, read only when the agent opens those files.

What are the alternatives to Trade Journal?

Skills that share tags, products or a category with Trade Journal: Openclaw Boss (LeoYeAI/openclaw-master-skills, 2.2k stars), Trading As Business (agentii-ai/agentii-investment-intelligence, 207 stars), Job Application Manager (reactive-resume/reactive-resume, 44k stars) and Wp Performance Review (elvismdev/claude-wordpress-skills, 235 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trade Journal?

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.