← Back to Skills Marketplace
dcsight

stock-scheme-tracker

by dcsight · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
47
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install stock-scheme-tracker
Description
Save and track stock investment strategies with entry/exit conditions in a local Markdown file and check current market data to recommend next steps.
README (SKILL.md)

Stock Strategy Tracker 📈

Save per-stock investment strategies extracted from analysis reports into a persistent tracking file, then periodically check if market conditions have triggered any entry, stop-loss, or take-profit conditions. Provide actionable next-step recommendations.


Quick Start

Install

Copy the skill directory to your agent's skills folder:

# OpenClaw
cp -r stock-scheme-tracker ~/.openclaw/skills/

# WorkBuddy
cp -r stock-scheme-tracker ~/.workbuddy/skills/

# Claude Code (project-level)
cp -r stock-scheme-tracker .claude/skills/

Configure

Set the environment variable to point to your tracking file:

# Add to your shell profile (~/.zshrc, ~/.bashrc, etc.)
export STOCK_SCHEME_PATH="$HOME/Documents/stock/scheme.md"

Or configure via your agent's config:

// OpenClaw: ~/.openclaw/openclaw.json
{
  "skills": {
    "entries": {
      "stock-scheme-tracker": {
        "env": {
          "STOCK_SCHEME_PATH": "~/Documents/stock/scheme.md"
        }
      }
    }
  }
}

If STOCK_SCHEME_PATH is not set, the skill defaults to ~/Documents/stock/scheme.md.

Verify

echo $STOCK_SCHEME_PATH
# Should output your configured path

Workflow Decision Tree

  1. Determine mode: Did the user just complete an analysis (→ save mode), or do they want to review existing strategies (→ check mode)?
  2. Save mode: Extract strategy elements from the analysis, format them, and append to the scheme file.
  3. Check mode: Read all strategies from the scheme file, fetch latest market data for each stock, evaluate every condition, and output a summary with next-step recommendations.

Save Mode

When to Use

  • Immediately after completing any stock investment analysis (e.g., DCF valuation, Buffett framework, technical analysis, or any investment report).
  • The user says "保存策略", "把策略记下来", "跟踪这个票", "save strategy", "track this stock", or any variant.

Extraction Rules

From the analysis text, extract these fields. If a field is not mentioned, mark it as "未明确" rather than fabricating.

Field Description Example
stock_code Stock code 688111
stock_name Stock name 金山办公
analysis_date Analysis date 2026-04-22
recommendation Core recommendation 建议观察,等待更好入场时机
entry_conditions Entry conditions (price/valuation/events) PE≤45-50;股价180-200元
stop_loss Stop-loss condition 跌破前期低点或技术位
target_price Target price / take-profit range 机构目标价400元
exit_signals Exit signals (assumption invalidation) 月活环比下滑;市场份额跌破80%
position_size Suggested position size 轻仓试探
time_horizon Holding period 3年
key_assumptions Key assumptions AI商业化持续推进
open_questions Open questions WPS AI付费转化率是多少
current_price Price at analysis ~250元
current_pe PE at analysis 62.46
market_cap Market cap at analysis 1147亿

Output Format

Append a new section to the scheme file (path from STOCK_SCHEME_PATH env var) using the exact format defined in references/scheme_format.md. Use Markdown table for entry conditions so they can be machine-parsed later.

Important

  • If the stock already exists in the scheme file, update the existing section rather than duplicating it. Preserve historical entries by appending a date-stamped update note.
  • After saving, briefly confirm to the user what was saved.

Check Mode

When to Use

  • User says "检查策略", "核对建仓条件", "看看哪些票可以买", "策略跟踪", "check strategy", or any variant.
  • Can be invoked standalone without any prior analysis.

Steps

  1. Read the scheme file (path from STOCK_SCHEME_PATH env var).
  2. For each tracked stock, fetch the latest market data (price, PE, key metrics). Use available financial data tools or web search.
  3. Evaluate each entry_conditions row: compare current value vs target value.
  4. Mark each condition as ✅ 已触发, ❌ 未触发, or ⚠️ 接近触发.
  5. Check if any exit_signals have occurred.
  6. Output a clean summary table and specific next-step recommendations per stock.

Output Format

## 策略核对报告 — 2026-04-23

### 金山办公 (688111)
| 条件类型 | 目标 | 当前 | 状态 |
|----------|------|------|------|
| PE建仓 | ≤45-50 | 62.46 | ❌ 未触发 |
| 股价建仓 | 180-200 | 250 | ❌ 未触发 |

**建议**: 继续观察,等待PE回落至50以下或股价跌破200再考虑建仓。

Core Tasks

Here are natural-language prompts that trigger this skill:

  • "我刚分析完金山办公,帮我保存策略"
  • "检查一下我跟踪的股票,哪些条件触发了"
  • "核对建仓条件"
  • "跟踪策略"
  • "把刚才的分析结论记录到策略跟踪文件"
  • "I just finished analyzing Apple, save the strategy"
  • "Check all my stock strategies"

Environment Variable Contract

Variable Purpose Required Set Via
STOCK_SCHEME_PATH Path to the strategy tracking Markdown file No (defaults to ~/Documents/stock/scheme.md) Shell profile or agent config

Security & Guardrails

  1. Local file only: Both scripts only read/write a local Markdown file specified by STOCK_SCHEME_PATH. No network calls are made by save_scheme.py or check_scheme.py.
  2. Market data source: During check mode, market data is fetched via the agent's available financial data tools or web search. This involves querying public market quotes (stock codes and metric names only) — no private strategy content or position details are transmitted.
  3. No trading execution: This skill provides analysis and recommendations only. It does NOT execute any trades or connect to brokerage accounts.
  4. No credential collection: This skill only requires STOCK_SCHEME_PATH (a file path). It never asks for API keys, tokens, passwords, or any other credentials.
  5. Data integrity: The save script uses atomic write patterns and preserves historical entries. Existing stock sections are updated in-place rather than overwritten.
  6. Path validation: The scripts validate that STOCK_SCHEME_PATH points to a .md file and will create parent directories if needed.

Troubleshooting

Problem Cause Fix
"No such file or directory" STOCK_SCHEME_PATH not set or points to invalid path Set env var or rely on default ~/Documents/stock/scheme.md
Strategy not found during check Scheme file is empty or format is corrupted Verify the file uses the format in references/scheme_format.md
Duplicate entries for same stock Save mode ran twice without updating The script auto-detects duplicates; if using manual edit, follow the update convention
Chinese characters garbled in output Terminal encoding mismatch Ensure your terminal uses UTF-8 (export LANG=en_US.UTF-8 or zh_CN.UTF-8)

Release Notes

  • 1.1.0 — Fixed metadata consistency (top-level requires/env), added credential collection disclaimer, clarified market data query scope in security section.
  • 1.0.0 — Initial release. Save and check modes with Markdown-based tracking file.

Links

Publisher

Usage Guidance
This skill appears to do what it says, but please consider the following before installing: - Review and set STOCK_SCHEME_PATH yourself: the scripts will create and overwrite the file at that path. Do not point it at system files or other important documents. Use a dedicated folder under your home directory. - Scripts only perform local file I/O; they do not call remote endpoints. However, the SKILL.md asks the agent to fetch market data via web search or finance tools — ensure those agent-level calls do not accidentally send your full saved strategies to external services. Prefer feeding only stock codes/metric names to external queries. - If you grant the agent network access, audit how it constructs queries so private strategy text isn’t transmitted to third parties. If you want to avoid any leakage, run only the local parse/report modes (parse -> local processing / report from local JSON) and supply market data manually. - Because the scripts accept a --path or env var, a malicious or misconfigured environment could cause overwrites. Keep the skill's folder and the scheme file in a safe location and use proper file permissions. - If you have low trust in the source, inspect the two scripts locally (they are plain Python and readable) and run them in a sandbox or with a test file first. Overall, functionally coherent and low-risk if the above operational cautions are followed.
Capability Analysis
Type: OpenClaw Skill Name: stock-scheme-tracker Version: 1.1.0 The stock-scheme-tracker skill is a legitimate tool for managing investment strategies in a local Markdown file. The Python scripts (save_scheme.py and check_scheme.py) perform standard file I/O and regex-based parsing to update and report on stock data without any network activity, obfuscation, or unauthorized access. The instructions in SKILL.md are clearly aligned with the stated purpose and do not contain any prompt injection attempts or malicious directives.
Capability Assessment
Purpose & Capability
Name/description (save & check stock strategies) match the code and SKILL.md. The only declared environment variable is STOCK_SCHEME_PATH, which is exactly what the scripts use. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Both scripts operate only on the local scheme file: save_scheme.py reads JSON from stdin and appends/updates the markdown file; check_scheme.py parses the markdown and can output JSON or produce a report. However, SKILL.md instructs the agent (not the scripts) to fetch latest market data using the agent's financial data tools or web search. That part is outside the scripts and could transmit information to external services if the agent's fetching step is implemented imprecisely (e.g., including full strategy text in queries). The scripts themselves do not make network calls.
Install Mechanism
Instruction-only install (copy folder to skills) and no install spec. No remote downloads or package installs. Lowest-risk install behavior.
Credentials
Only STOCK_SCHEME_PATH is declared/used. No API keys, secrets, or unrelated environment variables are required. The scripts only consult that env var (or --path) and default to a sensible user-local path.
Persistence & Privilege
always:false (normal). The skill can be invoked autonomously by the agent (platform default). This is not inherently problematic here, but autonomous invocation combined with the SKILL.md instruction to perform web searches for market data increases the blast radius if the agent is misconfigured or allowed broad outbound access.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install stock-scheme-tracker
  3. After installation, invoke the skill by name or use /stock-scheme-tracker
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
- Fixed metadata consistency by moving requirements (env variables, binaries) to top-level. - Added a disclaimer stating the skill never collects credentials or secrets. - Clarified in the security section that market data queries only involve public stock codes and metric names, not any private strategy data. - No code changes; documentation and metadata updates only.
v1.0.0
- Initial release of stock-scheme-tracker. - Save per-stock investment strategies extracted from analysis into a Markdown tracking file. - Check/track strategies by fetching latest stock data, evaluating predefined conditions, and outputting actionable recommendations. - Supports two modes: save (append/update stock strategy) and check (review all tracked stocks). - Configuration via the `STOCK_SCHEME_PATH` environment variable; defaults provided. - All data stored locally; preserves historical strategy updates in-place.
Metadata
Slug stock-scheme-tracker
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is stock-scheme-tracker?

Save and track stock investment strategies with entry/exit conditions in a local Markdown file and check current market data to recommend next steps. It is an AI Agent Skill for Claude Code / OpenClaw, with 47 downloads so far.

How do I install stock-scheme-tracker?

Run "/install stock-scheme-tracker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is stock-scheme-tracker free?

Yes, stock-scheme-tracker is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does stock-scheme-tracker support?

stock-scheme-tracker is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created stock-scheme-tracker?

It is built and maintained by dcsight (@dcsight); the current version is v1.1.0.

💬 Comments