← 返回 Skills 市场
kingmadellc

Portfolio Drift Monitor

作者 kingmadellc · GitHub ↗ · v1.1.4 · MIT-0
cross-platform ⚠ suspicious
406
总下载
0
收藏
0
当前安装
11
版本数
在 OpenClaw 中安装
/install portfolio-drift-monitor
功能描述
Real-time Kalshi portfolio drift alerts — monitors positions and fires when any moves beyond your configured threshold since last check. Snapshot comparison,...
安全使用建议
Before installing or enabling this skill: 1) Understand it requires your Kalshi credentials (KALSHI_KEY_ID and KALSHI_KEY_PATH) — do not share them. 2) The package includes requirements.txt but no automated install spec; install kalshi-python and pyyaml in a controlled environment (virtualenv) before running. 3) The script can POST alerts to a Slack webhook if OPENCLAW_SLACK_WEBHOOK or a slack_webhook_url in ~/.openclaw/config.yaml is present — verify any webhook URL you add because it will receive portfolio alert contents. 4) The skill stores portfolio snapshots at ~/.openclaw/state/portfolio_snapshot.json — review and lock file permissions if this is sensitive. 5) Registry metadata omitted the required env vars; double-check SKILL.md and the script for required configuration before trusting registry claims. 6) If you do not want autonomous checks or outbound notifications, disable autonomous invocation or avoid configuring webhooks and scheduling. Finally, verify the Kalshi API host being used and consider running the script in an isolated environment until you are comfortable with its behavior.
功能分析
Type: OpenClaw Skill Name: portfolio-drift-monitor Version: 1.1.4 The Portfolio Drift Monitor is a legitimate tool designed to track Kalshi trading positions and provide alerts on significant market movements. The Python script `scripts/portfolio_drift.py` uses the official Kalshi SDK to fetch position data and sends formatted alerts to a user-defined Slack webhook. While `SKILL.md` contains an 'Agent Bug-Fix Protocol' that instructs the AI to modify its own source code on disk, this is presented as a functional requirement for autonomous agent maintenance within the OpenClaw ecosystem rather than a malicious persistence mechanism. No evidence of credential exfiltration, unauthorized remote access, or malicious prompt injection was found.
能力评估
Purpose & Capability
The script and SKILL.md align with the stated purpose (reading Kalshi positions, computing drift, storing a local snapshot). However the registry metadata lists no required environment variables or credentials while both SKILL.md and the script require KALSHI_KEY_ID and KALSHI_KEY_PATH — a metadata/documentation mismatch that can mislead users about required secrets.
Instruction Scope
Runtime instructions and code stay within the monitoring purpose (fetch portfolio, compare, save snapshot). The script also supports sending alerts to a Slack webhook (reads OPENCLAW_SLACK_WEBHOOK or ~/.openclaw/config.yaml slack_webhook_url) — this outbound notification channel is not clearly documented in SKILL.md's prerequisites and represents an additional external endpoint where portfolio data could be posted if you configure it.
Install Mechanism
This is marked instruction-only (no install spec) but ships with requirements.txt and Python code that depends on kalshi-python and pyyaml. There is no automated install step declared — the agent/environment will need the SDK and pyyaml installed manually. The lack of a declared install mechanism increases the chance of runtime failures or hidden manual steps.
Credentials
Requested secrets are proportional to the task: a Kalshi API key ID and path to the private key are required and expected. The script will also read ~/.openclaw/config.yaml (which may contain other settings) and supports OPENCLAW_SLACK_WEBHOOK for notifications; these additional config sources are not fully documented in the registry metadata and could expose portfolio output to an external webhook if set.
Persistence & Privilege
The skill writes a local state file at ~/.openclaw/state/portfolio_snapshot.json (documented in SKILL.md). It does not request always: true, does not modify other skills, and does not require elevated system privileges. Ensure the snapshot file permissions are acceptable for your threat model as it holds portfolio metadata.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install portfolio-drift-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /portfolio-drift-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.4
Remove noisy rate-limit notifications — only alert on actual drift
v1.1.2
Fix Kalshi v3 event-level field name mapping — event_ticker, total_cost_shares_fp, realized_pnl_dollars now parsed correctly. Fixes false empty portfolio reports.
v1.1.1
Graceful degradation: clear error messages with config examples instead of crash on missing SDK/credentials
v1.1.0
v1.1.0: raw API positions fix — eliminates false empty portfolio reports
v1.0.7
Fix: switch from broken SDK typed get_positions() to raw API call — fixes false empty portfolio reports
v1.0.6
fix: Kalshi API v3 position field normalization
v1.0.5
Fix crash on empty portfolio — Kalshi returns cursor-only response
v1.0.3
Fix v3 API field names: event_positions fallback chain
v1.0.2
Fix v3 API field names: event_positions fallback chain
v1.0.1
fix: get_positions SDK call, config.yaml credentials
v1.0.0
Portfolio Drift Monitor v1.0.0 - Initial release with real-time Kalshi portfolio drift alerts. - Compares current positions to last snapshot; detects and flags drifts beyond configurable percent threshold (default 5%). - Supports rate-limited checks and persistent local state file for tracking. - Formats alerts with directional emoji, percentage changes, and supports easy scheduling for hourly monitoring. - Provides clear configuration options, error handling, and step-by-step output explanations.
元数据
Slug portfolio-drift-monitor
版本 1.1.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 11
常见问题

Portfolio Drift Monitor 是什么?

Real-time Kalshi portfolio drift alerts — monitors positions and fires when any moves beyond your configured threshold since last check. Snapshot comparison,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 406 次。

如何安装 Portfolio Drift Monitor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install portfolio-drift-monitor」即可一键安装,无需额外配置。

Portfolio Drift Monitor 是免费的吗?

是的,Portfolio Drift Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Portfolio Drift Monitor 支持哪些平台?

Portfolio Drift Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Portfolio Drift Monitor?

由 kingmadellc(@kingmadellc)开发并维护,当前版本 v1.1.4。

💬 留言讨论