agentleFS
hugoguerraphugoguerrap/crypto-claude-desk/skills/close-trade/SKILL.md

close-trade

Skill33 starsChanged 5 months agoMITView on GitHub

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

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Call close_trade(trade_id='...', exit_price=..., close_reason='...') from crypto-learning-db MCP.

    line 18
  2. Distinctive:

    Do NOT use the Edit tool."

    line 19
  3. Very specific:

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

    line 22
  4. Very specific:

    Run a post-mortem analysis on the recently closed trade $ARGUMENTS.

    line 25
  5. Very specific:

    Call query_trades(status='closed', limit=1) from crypto-learning-db to get the trade data.

    line 26
  6. Very specific:

    Read any related reports from data/reports/.

    line 27
  7. Very specific:

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

    line 32
  8. Distinctive:

    Call query_predictions(trade_id='...') from crypto-learning-db to find all predictions tied to this trade.

    line 35
  9. Distinctive:

    Call validate_prediction() for each one with a detailed NL evaluation of how close the prediction was and what we can learn.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.