Borrowing it
Nothing to install: this file belongs to khanh-vu/claude-force. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/khanh-vu/claude-force/main/.claude/skills/crypto-trading-patterns/SKILL.mdgit clone --depth 1 https://github.com/khanh-vu/claude-forceWrote 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.
[](https://agentmods.dev/skills/khanh-vu/claude-force/crypto-trading-patterns)<a href="https://agentmods.dev/skills/khanh-vu/claude-force/crypto-trading-patterns"><img src="https://agentmods.dev/badge/skills/khanh-vu/claude-force/crypto-trading-patterns/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.
<a href="https://agentmods.dev/skills/khanh-vu/claude-force/crypto-trading-patterns"><img src="https://agentmods.dev/badge/skills/khanh-vu/claude-force/crypto-trading-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00735 |
| Opus 5 | $0.00000 | $0.00367 |
| Sonnet 5 | $0.00000 | $0.00147 |
| Haiku 4.5 | $0.00000 | $0.00073 |
Grade A, and why
crypto-trading-patterns 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Crypto Trading Patterns
Comprehensive patterns and best practices for building cryptocurrency trading bots.
Position Sizing Algorithm
from decimal import Decimal
def calculate_position_size(
account_balance: Decimal,
risk_per_trade: Decimal, # e.g., 0.02 for 2%
entry_price: Decimal,
stop_loss_price: Decimal
) -> Decimal:
"""
Calculate position size based on risk management
Returns amount to trade in base currency
"""
risk_amount = account_balance * risk_per_trade
risk_per_unit = abs(entry_price - stop_loss_price)
if risk_per_unit == 0:
raise ValueError("Stop loss must differ from entry price")
position_size = risk_amount / risk_per_unit
return position_size
Order State Machine
from enum import Enum
class OrderStatus(Enum):
PENDING = "pending"
SUBMITTED = "submitted"
PARTIAL = "partial"
FILLED = "filled"
CANCELLED = "cancelled"
REJECTED = "rejected"
EXPIRED = "expired"
class OrderStateMachine:
"""Manages order lifecycle and valid state transitions"""
VALID_TRANSITIONS = {
OrderStatus.PENDING: [OrderStatus.SUBMITTED, OrderStatus.REJECTED],
OrderStatus.SUBMITTED: [OrderStatus.PARTIAL, OrderStatus.FILLED, OrderStatus.CANCELLED],
OrderStatus.PARTIAL: [OrderStatus.FILLED, OrderStatus.CANCELLED],
OrderStatus.FILLED: [], # Terminal state
OrderStatus.CANCELLED: [], # Terminal state
OrderStatus.REJECTED: [], # Terminal state
}
def __init__(self, order_id: str):
self.order_id = order_id
self.status = OrderStatus.PENDING
def transition(self, new_status: OrderStatus):
if new_status not in self.VALID_TRANSITIONS[self.status]:
raise ValueError(
f"Invalid transition: {self.status} -> {new_status}"
)
self.status = new_status
self._log_transition(new_status)
Circuit Breaker Pattern
import time
class CircuitBreaker:
"""Prevents trading during system failures"""
def __init__(self, failure_threshold: int = 5, timeout: int = 60):
self.failure_threshold = failure_threshold
self.timeout = timeout
self.failures = 0
self.state = 'CLOSED' # CLOSED, OPEN, HALF_OPEN
self.last_failure_time = None
def call(self, func, *args, **kwargs):
if self.state == 'OPEN':
if time.time() - self.last_failure_time > self.timeout:
self.state = 'HALF_OPEN'
else:
raise CircuitBreakerOpenError("Trading halted")
try:
result = func(*args, **kwargs)
self._on_success()
return result
except Exception as e:
self._on_failure()
raise
def _on_failure(self):
self.failures += 1
self.last_failure_time = time.time()
if self.failures >= self.failure_threshold:
self.state = 'OPEN'
logger.critical("Circuit breaker opened - trading halted!")
def _on_success(self):
self.failures = 0
self.state = 'CLOSED'
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.
- 9d ago First seen · 113 lines · 0 tokens per session scan A 8e624d68ed9f
crypto-trading-patterns is a skill published in the GitHub repository khanh-vu/claude-force (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 735 tokens. 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-31.
Other skills, from other repositories
mpp-agent
Pay HTTP 402 APIs via Machine Payments Protocol (MPP).
crypto-market-rank
Crypto market rankings and leaderboards. Query trending tokens, top searched tokens, Binance Alpha tokens, tokenized stocks, social hype sentiment ranks, smart money inflow token rankings, top meme token rankings from Pulse launchpad, and top trader PnL leaderboards. Use this skill when users ask about token rankings…
trading-signal
Subscribe and retrieve on-chain Smart Money signals. Monitor trading activities of smart money addresses, including buy/sell signals, trigger price, current price, max gain, and exit rate. Use this skill when users are looking for investment opportunities — smart money signals can serve as valuable references for…
cobie-cycle-filter
Use when evaluating crypto decisions through a Cobie-style cycle filter: common-sense risk, narrative traps, leverage humility, and avoiding obvious stupid trades.
token-pick
One token recommendation and one prediction market pick - scored, quantified, with a skip branch when signals are weak.
bridge
Cross-chain token transfers using Wormhole and CCTP.