reflect-performance-review

A nightly review system for trading results. It reads a trade log, matches completed buy-and-sell trades, calculates performance measures, and writes a Markdown report with rule-based recommendations.

In plain words
What is it for?
It can calculate win rate, profit factor, fee drag, holding periods, direction analysis, consecutive losses, and dependence on the best trade. It saves a dated report and a short summary for agent memory.
Why use it?
It turns a long list of trades into recurring performance feedback. This helps reveal patterns such as fees consuming profits, weak directions, long holding times, or dependence on one unusually large trade.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nunchi-trade/agent-cli/reflect
Any agent
npx skills add Nunchi-trade/agent-cli --skill reflect
Clone the repo
git clone --depth 1 https://github.com/Nunchi-trade/agent-cli

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.01255
Opus 5 $0.00013 $0.00628
Sonnet 5 $0.00005 $0.00251
Haiku 4.5 $0.00003 $0.00126

Measured 2d ago against content hash 2d2fd8600cf7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reflect-performance-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/reflect/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

REFLECT — Reflect, Evaluate, Fine-tune, Learn, Evolve, Correct, Transform

Nightly automated performance review engine. APEX runs all day — REFLECT reviews every trade at night, computing metrics, detecting patterns, and producing data-driven improvement recommendations.

Architecture

trades.jsonl → ReflectEngine.compute() → ReflectMetrics → ReflectReporter.generate() → report.md
  1. Load: Read trade log from data/cli/trades.jsonl
  2. Pair: FIFO round-trip matching (buys to sells per instrument)
  3. Compute: Win rate, PF, FDR, holding periods, direction analysis, monster dependency
  4. Recommend: Rule-based recommendations from metrics
  5. Report: Full markdown report saved to data/reflect/YYYY-MM-DD.md
  6. Distill: 3-5 line summary for agent memory

Key Metrics

Metric Formula Healthy Range
Win Rate winning_trades / total_trades > 50%
Profit Factor (Gross) gross_wins / gross_losses > 1.5
Profit Factor (Net) (gross_wins - fees) / gross_losses > 1.2
FDR (Fee Drag Ratio) total_fees / gross_wins * 100 < 20%
Monster Dependency best_trade_pnl / net_pnl * 100 < 50%
Max Consecutive Losses longest loss streak < 5

Usage

hl reflect run                      # Review since last report
hl reflect run --since 2026-03-01   # Review from specific date
hl reflect report                   # View latest report
hl reflect report --date 2026-03-03 # View specific date
hl reflect history                  # Show metric trend over time
hl reflect history -n 30            # Last 30 reports

Agent Mandate

You are the REFLECT reviewer. Your job is to analyze every trade from the past session, compute performance metrics, identify weaknesses, and produce actionable recommendations. You run nightly — the APEX runs by day, you review at night.

RULES:

  • Run REFLECT every night after trading stops — no exceptions
  • ALWAYS read the full report before the next trading session
  • Act on CRITICAL recommendations immediately (FDR > 30%, win rate < 35%)
  • Track recommendations across reports — if the same issue appears 3+ times, escalate
  • Save the distilled summary to agent memory for next-session context
  • NEVER ignore FDR warnings — fees silently kill profitability

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 107 lines · 25 tokens per session scan A 2d2fd8600cf7

Subscribe to this mod's changes

reflect-performance-review is a skill published in the GitHub repository Nunchi-trade/agent-cli (515 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 1,255 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.