Token导航 LogoToken导航

Agent Skill · 待分类

senpi-trading-runtime(senpi 交易运行时)

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

senpi-trading-runtime 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在待分类类的 11,209 个 Skill 里排第 4,251。

总安装 776周安装 33GitHub Stars 75下载 272核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/senpi-ai/senpi-skills --skill senpi-trading-runtime

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

senpi-trading-runtime 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在交易系统开发协作中使用。适用于需要跟踪功能迭代、分析性能问题或参与代码审查的场景。通过 npx skills add 命令安装,具体功能需参考原始实现。

使用前应确认是否涉及金融数据处理及是否符合合规要求。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/senpi-trading-runtime

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/senpi-ai/senpi-skills --skill senpi-trading-ru…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

senpi-trading-runtime 怎么安装?

在终端执行 npx skills add https://github.com/senpi-ai/senpi-skills --skill senpi-trading-runtime。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

senpi-trading-runtime 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

senpi-trading-runtime 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/senpi-ai/senpi-skills --skill senpi-trading-runtime 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

senpi-trading-runtime 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

senpi-trading-runtime 用的人多吗?

公开数据是累计安装 776 次,近一周安装 33 次,下载 272 次,GitHub 75 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

senpi-trading-runtime 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
senpi-trading-runtime

senpi 交易运行时 · 本页

77675执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Senpi Trading Runtime — OpenClaw Plugin

On-chain position tracker with automated DSL (Dynamic Stop-Loss) exit engine. Monitors a wallet's positions on Hyperliquid for lifecycle events (open, close, edit, flip) and applies two-phase trailing stop-loss protection to all positions. It links to an existing strategy wallet address and does not create wallets.

Core Concepts

Flow: Position Tracker scanner → detects position changes → DSL exit engine manages trailing stops

  1. Position Tracker (position_tracker scanner) polls the wallet on-chain, detecting opens, closes, increases, decreases, and flips.
  2. DSL exit engine monitors tracked positions on a timer, computing trailing stop-loss floors across two phases.
  3. Strategy (in runtime) = link to an existing wallet address. The wallet address is the strategy identifier everywhere, but wallet creation happens via Senpi MCP (not the runtime).

Key insight: The position tracker enables DSL protection for ALL positions of a strategy address — including those opened manually on the exchange or by other tools.

Wallet lifecycle (required order)

  1. Create strategy wallet address via Senpi MCP calls (or confirm it already exists).
  2. Put that wallet address into runtime YAML (strategies.<name>.wallet / ${WALLET_ADDRESS}).
  3. Install/create runtime. This links the runtime to the existing wallet for monitoring and exits.

Never treat openclaw senpi runtime create as wallet creation.

Strategy wallet validation (mandatory before runtime create/install)

Use this exact MCP-first guardrail to avoid using embedded wallets by mistake:

  1. Call strategy_list and collect strategies[].strategyWalletAddress.
  2. A runtime wallet is valid only if it appears in that list (case-insensitive match).
  3. If list is empty OR provided wallet is not in list: call strategy_create_custom_strategy to create a strategy wallet first.
  4. Use the newly created strategy wallet address directly as WALLET_ADDRESS in runtime YAML, then install runtime.

Hard rules:

  • Never use embedded wallet/injected wallet for runtime linking.
  • Never treat a wallet as a strategy wallet unless it exists in strategy_list.
  • Runtime install is blocked until strategy wallet validation passes.
  • Always confirm with the user before creating a new strategy wallet address, and explicitly confirm the budget (initialBudget) that will be used.

Example MCP flow (tool names from Senpi MCP):

strategy_list({})
if provided_wallet not in strategies[].strategyWalletAddress:
  # confirm with user first: create new strategy wallet + initialBudget
  strategy_create_custom_strategy({
    initialBudget: <budget_usdc>,
    positions: [],
    skillName: <strategy_or_runtime_name>,
    skillVersion: "1.0.0"
  })

Notes:

  • initialBudget is required when creating the strategy wallet.
  • Use positions: [] when you only need the strategy wallet created now and will trade later.

CLI Commands

All commands require the OpenClaw gateway running (openclaw gateway run).

Use openclaw senpi --cheatsheet to print the full plugin command cheatsheet to stdout.

Runtime management

Prerequisite: strategy wallet address already exists (created/fetched via Senpi MCP).

# Create a runtime from YAML file
openclaw senpi runtime create --path ./my-strategy.yaml
openclaw senpi runtime create -p ./my-strategy.yaml          # short form

# Create with inline YAML content
openclaw senpi runtime create --content "<yaml>"
openclaw senpi runtime create -c "<yaml>"                    # short form

# Create with custom ID
openclaw senpi runtime create --path ./my-strategy.yaml --runtime-id my-name

# List installed runtimes (id, wallet, source, status)
openclaw senpi runtime list

# Delete a runtime
openclaw senpi runtime delete <runtime_id>                   # positional id
openclaw senpi runtime delete --id <runtime_id>              # named flag

DSL position inspection

# All active DSL-tracked positions
openclaw senpi dsl positions
openclaw senpi dsl positions -r <id>                         # filter by runtime id
openclaw senpi dsl positions -a <addr>                       # filter by wallet address
openclaw senpi dsl positions --json

# Inspect one position (full DslState)
openclaw senpi dsl inspect <ASSET>
openclaw senpi dsl inspect SOL -r <id>
openclaw senpi dsl inspect SOL -a <addr>
openclaw senpi dsl inspect BTC --json

# Archived (closed) positions — reason, ROE, phase, tier
openclaw senpi dsl closes
openclaw senpi dsl closes -r <id>
openclaw senpi dsl closes -a <addr>
openclaw senpi dsl closes -l <n>
openclaw senpi dsl closes --json

Runtime diagnostics

openclaw senpi status                    # lightweight health summary (all runtimes)
openclaw senpi status -r <id>
openclaw senpi status --json

openclaw senpi state                     # full operational state (all runtimes)
openclaw senpi state -r <id>
openclaw senpi state --json

In-shell reference (senpi guide)

openclaw senpi guide                 # overview + quick command list
openclaw senpi guide scanners        # scanner types and config fields
openclaw senpi guide actions         # action types and decision modes
openclaw senpi guide dsl             # DSL exit engine: phases, tiers, time cuts
openclaw senpi guide examples        # print minimal strategy YAML to stdout
openclaw senpi guide schema          # full YAML schema field reference
openclaw senpi guide version         # plugin version and changelog URL

CLI preferences (senpi config)

Persists to ~/.openclaw/senpi-cli.json. Restart gateway to apply.

openclaw senpi config set-chat-id <chatId>
openclaw senpi config set-senpi-jwt-token <token>
openclaw senpi config set-state-dir <dir>
openclaw senpi config get <key>      # telegram-chat-id | senpi-jwt-token | state-dir
openclaw senpi config list           # secrets masked
openclaw senpi config unset <key>
openclaw senpi config reset

Gateway RPC (advanced)

Common calls:

openclaw gateway call senpi.installRuntime --params '{"runtimeYamlContent":"..."}'
openclaw gateway call senpi.listRuntimes --json --params '{}'
openclaw gateway call senpi.deleteRuntime --params '{"id":"my-runtime"}'
openclaw gateway call senpi.listDslPositions --json --params '{}'
openclaw gateway call senpi.getDslPositionState --json --params '{"asset":"SOL"}'
openclaw gateway call senpi.listDslArchives --json --params '{"limit":20}'
openclaw gateway call senpi.getHealthStatus --json --params '{}'
openclaw gateway call senpi.getSystemState --json --params '{}'

Methods summary

MethodParamsSuccess response
senpi.installRuntimeruntimeYamlContent or runtimeYamlPathRuntime installed
senpi.listRuntimes—List of runtimes
senpi.deleteRuntimeid or addressDeleted
senpi.listDslPositionsruntimeId?Active positions
senpi.getDslPositionStateasset, runtimeId?Single position state
senpi.listDslArchivesruntimeId?, address?, limit?closes[] (asset, direction, entryPrice, lastPrice, currentROE, closeReason, closedAt, phase, …)
senpi.getHealthStatusruntimeId? (string)status or statuses[] (health, components.scanners, components.dsl)
senpi.getSystemStateruntimeId? (string)state or states[] (health, stateDir, scanner/DSL components)

Close reasons for listDslArchives: dsl_breach, hard_timeout, weak_peak_cut, dead_weight_cut, exchange_sl_hit, manual.

Runtime YAML

The runtime YAML drives all behavior. Top-level keys: name, strategies, scanners, actions, exit, notifications.

name: my-tracker
version: 1.0.0
description: >
  On-chain position tracker with DSL trailing stop-loss.

strategies:
  main:
    wallet: "${WALLET_ADDRESS}"
    budget: 500
    slots: 2
    margin_per_slot: 200
    trading_risk: conservative    # conservative | moderate | aggressive
    enabled: true

scanners:
  - name: position_tracker
    type: position_tracker
    interval: 10s

actions:
  - name: position_tracker_action
    action_type: POSITION_TRACKER
    decision_mode: rule
    scanners: [position_tracker]

exit:
  engine: dsl
  interval_seconds: 30            # how often the price monitor runs (5-3600)
  dsl_preset:                     # single preset (no named map needed)
    hard_timeout:
      enabled: true
      interval_in_minutes: 360
    weak_peak_cut:
      enabled: true
      interval_in_minutes: 120
      min_value: 5
    dead_weight_cut:
      enabled: true
      interval_in_minutes: 60
    phase1:
      enabled: true
      max_loss_pct: 4.0
      retrace_threshold: 7
      consecutive_breaches_required: 1
    phase2:
      enabled: true
      tiers:
        - { trigger_pct: 7,  lock_hw_pct: 40 }
        - { trigger_pct: 12, lock_hw_pct: 55 }
        - { trigger_pct: 15, lock_hw_pct: 75 }
        - { trigger_pct: 20, lock_hw_pct: 85 }

notifications:
  telegram_chat_id: "${TELEGRAM_CHAT_ID}"

Environment variable substitution: ${VAR} and ${VAR:-default} resolved at load time.

For full field details: YAML Schema Reference

DSL Exit Engine — Key Concepts

Two-phase trailing stop-loss protecting open positions:

Phase 1 (from entry until the first tier is reached):

  • Absolute floor from max_loss_pct (cap on loss from entry, scaled by leverage)
  • Trailing floor from retrace_threshold (ROE % pullback from high-water mark)
  • Effective floor = stricter of both (LONG: higher price; SHORT: lower)
  • Optional time-based cuts at preset level: hard_timeout, weak_peak_cut, dead_weight_cut
  • Exchange SL stays at the absolute floor only; tighter exits enforced by runtime

Phase 2 (after the first tier is reached — Phase 2 always starts at tier 0):

  • Tier floor = lock_hw_pct % of current high-water ROE (trails as HW advances, never loosens)
  • Exchange SL tracks the full effective floor and updates as it moves

Tiers are profit milestones (by ROE % from entry). Each tier has two fields: trigger_pct (ROE % that activates it) and lock_hw_pct (% of high-water ROE to lock as floor). Tiers must have strictly increasing trigger_pct.

Consecutive breaches are tick-based (not time-based). Each monitor tick (every interval_seconds), if price violates the floor, the breach counter increments. Recovery resets it.

Retrace convention: retrace_threshold is ROE %. Engine converts to price: retrace_ROE% / 100 / leverage. At 10x leverage, 7% ROE retrace = 0.7% price below high-water.

For full DSL configuration with all fields, time-based cuts, close reasons, and events: DSL Configuration Reference

Environment Variables

VariableRequiredPurpose
WALLET_ADDRESSYesExisting strategy wallet address from Senpi MCP (used in YAML via ${WALLET_ADDRESS}).
SENPI_API_KEYFor live MCPSenpi MCP authentication.
TELEGRAM_CHAT_IDNoTelegram chat ID for notifications.
DSL_STATE_DIRNoOverride DSL state file directory.

References

平台分布

Codex

36.76%
按下载量换算100

Claude

28.74%
按下载量换算78

Cursor

20.7%
按下载量换算56

Gemini CLI

10.81%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/senpi-ai/senpi-skills --skill senpi-trading-runtime 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills