Skip to content

/close-trade

Close an open trade and run post-mortem analysis. Usage: /close-trade trade_001 or /close-trade trade_001 at 98500

From plugin
crypto-trading-desk
1078 skills7 agents1 hook

Claude Code

$ npx -y skills add hugoguerrap/crypto-claude-desk --skill close-trade --agent claude-code

SKILL.md

close-trade.SKILL.md
name: close-trade
description: Close an open trade and run post-mortem analysis. Usage: /close-trade trade_001 or /close-trade trade_001 at 98500
user-invocable: true

Close Trade & Post-Mortem

Close trade $ARGUMENTS and run a post-mortem analysis.

Workflow

Step 1: Close the Trade

Delegate using the Task tool with `subagent_type: general-purpose` and `model: opus`:

"You are the portfolio-manager agent. Read agents/portfolio-manager.md for your decision framework. Close trade $ARGUMENTS. If a price is specified after 'at', use that as exit price. Otherwise, get the current market price using get_exchange_prices() from crypto-exchange MCP. Call close_trade(trade_id='...', exit_price=..., close_reason='...') from crypto-learning-db MCP. PnL, portfolio balance, and stats are updated automatically. Do NOT use the Edit tool."

Step 2: Post-Mortem Analysis

After the trade is closed, delegate using the Task tool with `subagent_type: general-purpose` and `model: opus`:

"You are the learning-agent. Read agents/learning-agent.md for your analysis framework. Run a post-mortem analysis on the recently closed trade $ARGUMENTS. Call query_trades(status='closed', limit=1) from crypto-learning-db to get the trade data. Read any related reports from data/reports/. Analyze what worked, what didn't, and provide specific recommendations for improvement. Do NOT use the Edit tool."

Step 3: Validate Predictions & Update Patterns

After the post-mortem, delegate using the Task tool with `subagent_type: general-purpose` and `model: opus`:

"You are the learning-agent. Validate all predictions for trade $ARGUMENTS. Call query_predictions(trade_id='...') from crypto-learning-db to find all predictions tied to this trade. Compare each prediction against the actual outcome. Call validate_prediction() for each one with a detailed NL evaluation of how close the prediction was and what we can learn. Then call upsert_pattern() to update the pattern library with the setup from this trade. Do NOT use the Edit tool."

Step 4: Present Results

Show: 1. Trade closure summary (entry, exit, PnL) 2. Post-mortem analysis 3. Prediction accuracy (how many correct vs incorrect, with evaluations) 4. Pattern identified (win rate, recommendation) 5. Lessons learned

Read more
@hugoguerrap
Ships withcrypto-trading-desk

I used to spend weeks building multi-agent systems with LangGraph, CrewAI, and AutoGen. Hundreds of lines of Python orchestration code, custom state machines, fragile message passing between agents.

Stars on GitHub

Momentum

stars in total
107
Star history of hugoguerrap/crypto-claude-desk on GitHub, a chart by star-history.com

Other skills on crypto-trading-desk.

create
Auto-invoked

create

Extend the system by creating new MCP servers, agents, or skills. Usage: /create a DeFi protocol tracker or /create an agent for…

monitor
Auto-invoked

monitor

Autonomous monitoring loop. Checks open trades against SL/TP levels, closes trades that hit targets, evaluates expired…

setup
Auto-invoked

setup

First-time setup for Crypto Trading Desk. Detects your environment, installs dependencies, and verifies everything works. Run…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about close-trade.

Which coding agents can use close-trade?
close-trade installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.