chore: remove legacy scripts and update SKILL.md to reference CLI only

This commit is contained in:
2026-04-16 03:03:25 +08:00
parent 7abdb30d6e
commit 863d10b872
11 changed files with 71 additions and 605 deletions

View File

@@ -35,7 +35,7 @@ Anchor all advice to the user's real balances, average costs, exchange, and curr
1. **Single-coin triage** — analyze a specific holding (mainstream or meme).
2. **Active discovery** — scan for the best short-term opportunity across both mainstream and meme sectors.
3. **Execution** — run the auto-trader, evaluate whether to hold, sell, or rebalance.
3. **Execution** — run trades via the CLI (`coinhunter exec`), evaluating whether to hold, sell, or rebalance.
4. **Review** — generate an hourly report on decision quality, PnL, and recommended parameter adjustments.
## Scientific analysis checklist (mandatory before every trade decision)
@@ -53,7 +53,7 @@ Read `references/short-term-trading-framework.md` before every active decision p
## Workflow
### Discovery & Scanning
1. **Mainstream scan** — Use `market_probe.py bybit-ticker` or ccxt for liquid coins.
1. **Mainstream scan** — Use `coinhunter probe bybit-ticker` or ccxt for liquid coins.
- Look for: breakouts, volume spikes, S/R flips, trend alignment.
2. **Meme scan** — Use `web_search` + `dex-search` / `gecko-search` for narrative heat.
- Look for: accelerating attention, DEX flow, CEX listing rumors, social spread.
@@ -64,11 +64,11 @@ Read `references/short-term-trading-framework.md` before every active decision p
2. Pull market data for holdings and candidates.
3. Run the 6-question scientific checklist.
4. Decide: **HOLD** / **SELL_ALL** / **REBALANCE** / **BUY**.
5. Execute via `smart_executor.py`.
6. Log the full decision context with `logger.py`.
5. Execute via the CLI (`coinhunter exec ...`).
6. Log the full decision context via the CLI execution.
### Review (every hour)
1. Run `review_engine.py` to analyze all decisions from the past hour.
1. Run `coinhunter recap` to analyze all decisions from the past hour.
2. Compare decision prices to current prices.
3. Flag patterns: missed runs, bad entries, over-trading, hesitation.
4. Output recommendations for parameter or blacklist adjustments.
@@ -76,12 +76,13 @@ Read `references/short-term-trading-framework.md` before every active decision p
## Auto-trading architecture
| Component | Path | Purpose |
|-----------|------|---------|
| `smart_executor.py` | `~/.coinhunter/smart_executor.py` | Order execution layer (market buy/sell/rebalance) |
| `logger.py` | `~/.coinhunter/logger.py` | Records decisions, trades, and market snapshots |
| `review_engine.py` | `~/.coinhunter/review_engine.py` | Hourly quality review and optimization suggestions |
| `market_probe.py` | `~/.hermes/skills/coinhunter/scripts/market_probe.py` | Market data fetcher |
| CLI Command | Purpose |
|-------------|---------|
| `coinhunter exec` | Order execution layer (buy / flat / rotate / hold) |
| `coinhunter pre` | Lightweight threshold evaluator and trigger gate |
| `coinhunter review` | Generate compact review context for the agent |
| `coinhunter recap` | Hourly quality review and optimization suggestions |
| `coinhunter probe` | Market data fetcher |
### Execution schedule
- **Trade bot** — runs every 15-30 minutes via `cronjob`.
@@ -119,12 +120,8 @@ This pattern preserves Telegram auto-delivery from Hermes cron while reducing mo
If you want to replicate this low-cost trigger architecture, here is a complete blueprint.
#### 1. File layout
Create these files under `~/.hermes/scripts/` and state under `~/.coinhunter/state/`:
User runtime state lives under `~/.coinhunter/state/`:
```
~/.hermes/scripts/
coinhunter_precheck.py # lightweight threshold evaluator
coinhunter_external_gate.py # optional system-crontab wrapper
~/.coinhunter/state/
precheck_state.json # last snapshot + trigger flags
external_gate.lock # flock file for external gate
@@ -223,8 +220,8 @@ Attach the precheck script as the `script` field of the cron job so its JSON out
{
"id": "coinhunter-trade",
"schedule": "*/15 * * * *",
"prompt": "You are Coin Hunter. If the injected context says should_analyze=false, respond with exactly [SILENT] and do nothing. Otherwise, read ~/.coinhunter/positions.json, run the scientific checklist, decide HOLD/SELL/REBALANCE/BUY, and execute via smart_executor.py. After finishing, run ~/.hermes/scripts/coinhunter_precheck.py --ack to clear the trigger.",
"script": "~/.hermes/scripts/coinhunter_precheck.py",
"prompt": "You are Coin Hunter. If the injected context says should_analyze=false, respond with exactly [SILENT] and do nothing. Otherwise, read ~/.coinhunter/positions.json, run the scientific checklist, decide HOLD/SELL/REBALANCE/BUY, and execute via the `coinhunter` CLI. After finishing, run `coinhunter pre --ack` to clear the trigger.",
"script": "coinhunter_precheck.py",
"deliver": "telegram",
"model": "kimi-for-coding"
}
@@ -235,7 +232,7 @@ Add an `--ack` handler to the precheck script (or a separate ack script) that se
#### 5. External gate (optional, for even lower cost)
If you want to run the precheck every 5 minutes without waking Hermes at all:
`coinhunter_external_gate.py` pseudocode:
External gate pseudocode (run from `~/.hermes/scripts/`):
```python
import fcntl, os, subprocess, json, sys