← Back to Skills Marketplace
kingmadellc

Portfolio Drift Monitor

by kingmadellc · GitHub ↗ · v1.1.4 · MIT-0
cross-platform ⚠ suspicious
406
Downloads
0
Stars
0
Active Installs
11
Versions
Install in OpenClaw
/install portfolio-drift-monitor
Description
Real-time Kalshi portfolio drift alerts — monitors positions and fires when any moves beyond your configured threshold since last check. Snapshot comparison,...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install portfolio-drift-monitor
  3. After installation, invoke the skill by name or use /portfolio-drift-monitor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug portfolio-drift-monitor
Version 1.1.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 11
Frequently Asked Questions

What is 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,... It is an AI Agent Skill for Claude Code / OpenClaw, with 406 downloads so far.

How do I install Portfolio Drift Monitor?

Run "/install portfolio-drift-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Portfolio Drift Monitor free?

Yes, Portfolio Drift Monitor is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Portfolio Drift Monitor support?

Portfolio Drift Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Portfolio Drift Monitor?

It is built and maintained by kingmadellc (@kingmadellc); the current version is v1.1.4.

💬 Comments