agentleFS
VeblinVeblin/invest-skills/.claude/skills/verify/SKILL.md

verify

Skill17 starsChanged 51 days agoMITView on GitHub

运行时验证 invest-a-stock/etf/journal CLI — 隔离 DB 驱动真实命令行(store._db_override + runpy launcher)

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use genie-hacks, workfly and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • automagik-devSkill

    genie-hacks

    Browse, search, and contribute community hacks — real-world patterns for provider switching, teams, skills, hooks, cost optimization, and more.

    Also in 3 projects that use this

  • automagik-devSkill

    workfly

    Discover a procedure and build its saved workflow — dynamic discovery, drafted script, adversarial verification, landed in the catalog.

    Also in 3 projects that use this

  • AviadPSkill

    risk-assess

    Assess the risk and blast radius of a proposed code change before implementing it. Evaluates CI impact, framework-wide vs localized scope, rollback path, and identifies blindspots. Use when user says "what's the risk", "is this safe", "assess the impact", "risk assess", "blast radius", or before applying framework-wide or CI-affecting changes. Do NOT use for code quality review (use code-quality) or plan validation (use design-validator).

    Also in 3 projects that use this

  • sanmidableSkill

    defaults

    Also in 3 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 7 projects that use this

  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 3 projects that use this

  • +2 more from automagik-dev

The file

Files
SKILL.md

Verify — invest CLI 运行时观察

Handle(关键配方)

lib.store 的 DB 路径是硬编码 ~/.local/share/investment/research.db,无环境变量。 CLI 验证必须隔离:写一个 launcher 脚本,先 import invest-a-stock 的 lib.store、 设 store_mod._db_override = <tmp db>,再用 runpy.run_path(etf.py, run_name="__main__") 执行真实 CLI。脚本模板(已验证可用的路径设置顺序):

import os, runpy, sys
from pathlib import Path
CODE = Path("/Users/veblin/Study/claude-bigA-financial/code")
sys.path.insert(0, str(CODE / "skills/invest-a-stock/scripts"))   # lib 包 = invest-a-stock
from lib import store as store_mod
store_mod._db_override = Path(os.environ["SF_VERIFY_DB"])
# P0-2 自检:override 未生效必须立即失败——静默写真实库曾造成
# collections 记录被外部进程删除/污染(2026-08-23 现场:session 内
# #48/#53/#54 消失,总行数 55→52)。
assert store_mod._get_path() == Path(os.environ["SF_VERIFY_DB"]), (
    "store override 未生效,禁止继续(会写真实 research.db)"
)
sys.argv = ["etf.py"] + sys.argv[1:]
runpy.run_path(str(CODE / "skills/invest-a-etf/scripts/etf.py"), run_name="__main__")

种数据:同 launcher 方式设 override,import sector_flow(insert scripts/lib 到 sys.path), 调真实 save_sector_flow_snapshot 逐日种快照。注意不要种未来日期——MAX(date) 是 C5 全等检测的比对基线,未来日期会让当天 collect 永远不跳过(首次驱动时的坑)。

值得驱动的流

  • sector-flow <symbol> 人读表格 + --json:跨度标注(trend_span_days ≠7 → 「跨度 N 日」)、 缺失行业 note、趋势标签(净额近零/近端归零/金额量级小)
  • collect-sector-flow 连跑两次:首次 360 行写入 → 二次全等跳过(note 区分 「非交易日(日历判定)」vs「疑似盘前未刷新」);⚠ 映射自检 drift 计数(约 51 个正常)
  • 错误路径:非法 symbol(exit 2)、未映射 ETF(exit 0 + ⏳ note)

坑

  • akshare 进度条在 stderr;CLI 观察加 2>/dev/null
  • uv run python 启动 launcher(依赖在 .venv)
  • 真实 DB(~/.local/share/investment/research.db)含用户历史数据,只读观察可以, 写操作(collect)一律走隔离 DB

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.