Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计提醒

roach-strategy蟑螂策略

Agent Skill

roach-strategy 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

978

周安装

42

GitHub Stars

75

下载量

343
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:roach-strategy(蟑螂策略)
来源仓库:https://github.com/senpi-ai/senpi-skills
仓库路径:skills/roach-strategy
安装命令:
npx skills add https://github.com/senpi-ai/senpi-skills --skill roach-strategy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/senpi-ai/senpi-skills --skill roach-strategy

简介

用于 GitHub 协作信息的整理与分析,支持代码变更与任务追踪。

  • 可提取仓库动态、Issue 进展和 PR 合并状态,提升协作效率。
  • 通过 npx 命令从 senpi-skills 仓库安装,路径明确便于部署。
  • 使用前建议验证其是否具备读取私有仓库或执行自动化操作的权限。
  • roach-strategy 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

🪳 ROACH v2.0 — Striker Only. v2-Runtime-Native. Maker Exits.

Cockroaches survive anything. ROACH survives by not trading when there's no explosion.


What changed in v2.0

Architecture (not thesis):

Layerv1.xv2.0
Trading loopAgent runs scanner, agent calls create_positionProducer pushes signals via external-scanner ingest; runtime owns execution
Entry gateAgent decidesLLM pass-through gate (producer already filtered)
ExitDSL via runtime.yaml (good)Same DSL preset, but with FEE_OPTIMIZED_LIMIT order type — maker-first with 60s window, taker fallback
Risk gatesAgent enforces in scanner codeDeclarative via runtime.risk.guard_rails
Per-asset cooldownProducer state fileRuntime + producer (defense in depth)

Why v2: v1 used MARKET orders for every exit, paying ~3 bp/exit in HL taker fees. Recent 25-trade sample: $46 in HL fees, 100% taker. v2's FEE_OPTIMIZED_LIMIT with ensure_execution_as_taker: true and 60s timeout prefers maker fill but accepts taker fallback when the position must close. Expected recovery: 50-70% of HL exit fees.

Thesis preserved from v1.2: Stalker disabled. Striker only. FIRST_JUMP from #25+, rank jump >= 15 OR contribVelocity >= 15, score >= 10 with 4+ reasons, 1.5x volume, 1h price aligned, 4h trend aligned, XYZ banned.


Files

FilePurpose
runtime.yamlv2 runtime spec (scanners, actions, exit DSL, guard_rails)
scripts/roach-producer.pyCron-driven producer — emits Striker signals to runtime
scripts/roach_config.pyShared MCP helper + atomic state I/O
config/roach-config.jsonOperator-tunable defaults (informational; producer constants WIN)

Producer behavior

Runs every 90s via cron. On each tick:

  1. Reentrancy guard: acquires state/<wallet-hash>/producer.lock. If a prior run hasn't released it (cron faster than MCP latency), this run skips cleanly.
  2. Fetch markets: leaderboard_get_markets (top 50, XYZ filtered out at parse time).
  3. Detect striker signals: rank jumps, contribVelocity, contribution explosions vs scan history.
  4. Apply hard gates: 4h trend aligned, cc_15m >= 0.5, 1h price aligned >= 0.1%, volume >= 1.5x, score >= 10, 4+ reasons, asset not in 120min cooldown.
  5. Emit signals via openclaw senpi external-scanner ingest.
  6. Persist scan history + cooldown state under state/<wallet-hash>/.

NO execution code. NO position-tracking. NO DSL state. The runtime owns all of that.


Entry flow

Producer cron (90s)
  ↓ Striker signal detected
  ↓ external-scanner ingest --scanner roach_signals
Runtime
  ↓ Schema-validates fields against runtime.yaml
  ↓ LLM gate (decision_model = ${ROACH_DECISION_MODEL})
  ↓ Pass-through unless malformed (producer already filtered everything else)
  ↓ OPEN_POSITION via FEE_OPTIMIZED_LIMIT (maker-first, 60s, taker fallback)
DSL (runtime-managed)
  ↓ Phase 1 max_loss 18% / 3-breach
  ↓ Phase 2 tiers (7/40, 12/55, 15/75, 20/85)
  ↓ hard_timeout 120min, weak_peak 45min, dead_weight 25min
  ↓ Exit via FEE_OPTIMIZED_LIMIT (maker-first, 60s, taker fallback)

Required env vars

The runtime YAML uses these substitutions:

VarPurpose
${WALLET_ADDRESS}Strategy wallet address
${TELEGRAM_CHAT_ID}Telegram chat ID for notifications
${ROACH_DECISION_MODEL}Bare model name for LLM gate (e.g. gemini-3.1-pro-preview, claude-sonnet-4-20250514). NO provider prefix — OpenClaw double-prefixes and rejects.

The producer reads:

VarPurposeDefault
ROACH_WALLETWallet (must match runtime YAML's wallet). Agent-specific by design — do NOT use generic STRATEGY_ADDRESS. Per Turbine v2.0.9 contamination fix: a shared env var is a fleet-wide vector if multiple agents share an install.— (required; producer fails loud)
OPENCLAW_BINCLI binary nameopenclaw
EXTERNAL_SCANNER_NAMEScanner IDroach_signals
ROACH_LEVERAGELeverage to assert in signal payload7
ROACH_MARGIN_USDMargin per slot to assert in signal payload250

Producer install (on OpenClaw host)

Source path in the senpi-skills repo: roach/. Install destination on the OpenClaw host: /data/workspace/skills/roach-strategy/. The two names differ — repo uses roach, install dir uses the SKILL.md name field (roach-strategy).

# 1. Pull the skill files (source: senpi-skills/main/roach/)
mkdir -p /data/workspace/skills/roach-strategy/scripts
mkdir -p /data/workspace/skills/roach-strategy/config

curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/roach/runtime.yaml \
  -o /data/workspace/skills/roach-strategy/runtime.yaml
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/roach/scripts/roach-producer.py \
  -o /data/workspace/skills/roach-strategy/scripts/roach-producer.py
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/roach/scripts/roach_config.py \
  -o /data/workspace/skills/roach-strategy/scripts/roach_config.py
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/roach/config/roach-config.json \
  -o /data/workspace/skills/roach-strategy/config/roach-config.json

# Remove the v1 scanner if it's still there from a prior install
rm -f /data/workspace/skills/roach-strategy/scripts/roach-scanner.py

# 2. Install the runtime
# ROACH_DECISION_MODEL is REQUIRED — pick any model supported by the runtime's
# model registry. Examples: gemini-3.1-pro-preview, claude-sonnet-4-20250514.
# Pass BARE model name only — NO provider prefix (OpenClaw double-prefixes).
WALLET_ADDRESS=0x... \
TELEGRAM_CHAT_ID=... \
ROACH_DECISION_MODEL=gemini-3.1-pro-preview \
  openclaw senpi runtime create --path /data/workspace/skills/roach-strategy/runtime.yaml

# 3. Schedule the producer (~90s cadence)
# ROACH_WALLET (NOT generic STRATEGY_ADDRESS) is required by the producer.
# Producer fails loud at startup if not set — misconfig is visible immediately.
#
# RECOMMENDED PATTERN: cron-as-Claude-turn with NO_REPLY filter.
# Each cron tick spins up an isolated session, runs the producer, and
# replies to TG ONLY if there's a non-zero event (signal pushed, error,
# unexpected state). On the silence-is-correct ticks (most of them for
# Roach), the agent stays quiet — zero TG noise, zero log file growth.
# Cron run records are still accessible via `openclaw cron runs --id <id>`.
openclaw cron add \
  --name "roach-v2-producer" \
  --cron "*/2 * * * *" \
  --session isolated \
  --wake now \
  --message $'export ROACH_WALLET=0x... && python3 /data/workspace/skills/roach-strategy/scripts/roach-producer.py\n\nCRITICAL INSTRUCTION: If the output shows \'candidates\': 0 and \'status\': \'ok\', you MUST reply EXACTLY with NO_REPLY to remain silent. Only report to the user if there is an error, a crash, or if signals are actually pushed.' \
  --no-deliver

# Note: openclaw cron resolution is 1 minute. The producer is designed for
# 90s cadence; */2 (every 2 min) is the closest cron-supported approximation.
# Some installs run faster via the underlying scheduler (~90s observed).
# The fcntl reentrancy guard handles any overlap safely.

# Alternative pattern: shell-redirect (cheaper, no Claude tokens per tick,
# but generates a log file that needs rotation). Use this if you prefer
# to grep raw producer JSON output:
#
#   --message "Run \`SENPI_API_KEY=<KEY> ROACH_WALLET=0x... python3 /data/workspace/skills/roach-strategy/scripts/roach-producer.py >> /var/log/openclaw/roach-v2.log 2>&1\` and report success/failure in this log."

# 4. Verify
openclaw senpi runtime list                        # expect: roach-tracker v1.3.0
openclaw senpi status --runtime roach-tracker

# Cron-as-Claude-turn pattern — verify via OpenClaw's structured run log:
openclaw cron list --json                          # find the cron id
openclaw cron runs --id <cron-id> --limit 5        # last 5 tick records (ts, status, durationMs, nextRunAtMs)

# Inspect producer state (this is the same regardless of cron pattern):
ls -la /data/workspace/skills/roach-strategy/state/<wallet-hash>/
# Expect: producer.lock + scan-history.json with mtime in last few minutes.
# A fresh scan-history.json (mtime < 5 min) confirms the cron is firing.

Risk envelope (declarative, runtime-enforced)

SettingValue
Slots (max concurrent positions)2
Margin per slot$250
Default leverage7x
Daily loss halt10%
Drawdown halt25%
Max entries per day6
Max consecutive losses3
Post-loss cooldown30 min
Per-asset cooldown120 min
XYZ equitiesBanned at producer scan level

Expected behavior

MetricExpected
Trades/day (chop)0-1
Trades/day (trending)1-3
Days with zero tradesCommon and correct
Win rate50-70% target (Striker quality)
Avg fee per closeMaterially lower than v1 (maker fills)
Total fees / volume~50-70% reduction vs v1 baseline

SILENCE IS CORRECT. If Roach goes 24-48 hours without a trade, that means there were no FIRST_JUMP explosions worth taking. That's the experiment working, not a bug.


What was removed in v2

Removed (responsibilities moved to runtime):

  • roach-scanner.py (replaced by roach-producer.py)
  • Trade counter / daily-loss tracking (runtime guard_rails)
  • Bootstrap gate / config/bootstrap-complete.json (runtime install handles state)
  • Asset cooldown bookkeeping in scanner (still in producer as defense-in-depth, but runtime is the authority)
  • Dynamic slots based on PnL (runtime owns slots)
  • All create_position calls (runtime owns execution)

Permanently disabled (decided in v1.0):

  • Stalker mode and all accumulation detection
  • XYZ equities (banned at scan level)

License

MIT — Built by Senpi (https://senpi.ai). Source: https://github.com/Senpi-ai/senpi-skills


Skill Attribution

When creating a strategy, include skill_name and skill_version in the call. See references/skill-attribution.md for details.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.6%
按下载量换算132

Claude

31.24%
按下载量换算107

Cursor

17.26%
按下载量换算59

Gemini CLI

9.62%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills