close-trade

close-trade is a skill for Claude Code from hugoguerrap/crypto-claude-desk. It costs 37 tokens per session (528 once invoked), scanned A, original, MIT.

A workflow for closing a simulated trade and reviewing what happened afterward. A post-mortem is a structured review of what worked, what failed, and what should change.

In plain words
What is it for?
Use it to close a named trade at a chosen or current price, calculate the result, and produce recommendations for future trades.
Why use it?
It records the closing transaction and connects it to an analysis of the trade’s result and the reports behind it.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the crypto-trading-desk plugin — 8 skills, 7 agents, 1 hook shipped together

Good fit Use it to close a named trade at a chosen or current price, calculate the result, and produce recommendations for future trades.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hugoguerrap/crypto-claude-desk/close-trade
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.

Any agent
npx skills add hugoguerrap/crypto-claude-desk --skill close-trade
Clone the repo
git clone --depth 1 https://github.com/hugoguerrap/crypto-claude-desk

Made for: Claude Code.

Or install crypto-trading-desk, the plugin that ships this one along with the rest of its 8 skills, 7 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for close-trade

README.md
[![agentmods](https://agentmods.dev/badge/skills/hugoguerrap/crypto-claude-desk/close-trade/github.svg)](https://agentmods.dev/skills/hugoguerrap/crypto-claude-desk/close-trade)
Your own site
<a href="https://agentmods.dev/skills/hugoguerrap/crypto-claude-desk/close-trade"><img src="https://agentmods.dev/badge/skills/hugoguerrap/crypto-claude-desk/close-trade/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for close-trade

Your own site · 80×15
<a href="https://agentmods.dev/skills/hugoguerrap/crypto-claude-desk/close-trade"><img src="https://agentmods.dev/badge/skills/hugoguerrap/crypto-claude-desk/close-trade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 528 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00037 $0.00528
Opus 5 $0.00018 $0.00264
Sonnet 5 $0.00007 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 11d ago against content hash 481ca8fec7c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

close-trade 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 11d 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.

skills/close-trade/SKILL.md · 48 lines

How it starts

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

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 the full file on GitHub · 48 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. 11d ago First seen · 48 lines · 0 tokens per session scan A 481ca8fec7c1

Subscribe to this mod's changes

close-trade is a skill published in the GitHub repository hugoguerrap/crypto-claude-desk (33 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 528 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

pricing-refresh

Refresh or verify the hermit cost rate table against Anthropic's live pricing. Use when the operator says "refresh pricing", "verify pricing", "is the rate table current", "new model pricing", or asks whether scripts/lib/pricing.ts matches current Codex rates. Maintainer-only; never autonomous, never a routine, never…

gtapps/claude-code-hermit · 76 tokens

fintech-expert

Expert in financial technology, payment processing, open banking APIs, PSD2, blockchain in finance, robo-advisors, and RegTech. Use when the user mentions payments, open banking, PSD2, blockchain, cryptocurrency, or robo advisor, or when the task involves Payment Processing, Blockchain in Finance, Payment Security, or…

personamanagmentlayer/pcl · 73 tokens

moss-trade-bot-factory-1.0.25-beta

A tool for turning a trading idea written in everyday language into a cryptocurrency trading bot. It can run local tests on past market data, with optional checks and simulated trades through external platforms.

moss-site/moss-trade-bot-skills · 59 tokens

moss-trade-bot-factory

A tool for creating cryptocurrency trading bots from a description of the coin, testing period, and strategy style. It uses included Hyperliquid market-data files for local backtesting and strategy evolution.

moss-site/moss-trade-bot-skills · 131 tokens

moss-trade-bot-factory

A tool for creating cryptocurrency trading bots from a described currency, date range, and strategy style. It uses built-in Hyperliquid CSV market-data files for local backtesting and strategy evolution, and can optionally upload a bot for verification or simulated live trading.

moss-site/moss-trade-bot-skills · 131 tokens

moss-trade-bot-factory-1.0.3

A tool for turning a trading idea written in everyday language into a cryptocurrency trading bot. It can run local tests on past market data, with optional checks and simulated trades through external platforms.

moss-site/moss-trade-bot-skills · 58 tokens