refactor: 拆分 SKILL.md 为入口 + references/,新增 install.sh#6
Open
anChaOs wants to merge 1 commit into
Open
Conversation
- SKILL.md 精简为 159 行入口:When to Activate / Prerequisites / 公共 helper / 估值框架 + 七层索引 - 各层代码下沉到 references/01-quotes.md ... 07-filings.md + workflows.md + faq.md - 所有 28 个端点的实现代码原样保留,零行为变更 - 新增 install.sh:一键拉取 SKILL.md + 9 个 reference 到 ~/.claude/skills/a-stock-data/ - README 快速开始改为 install.sh,原 curl 单文件方式不再适用
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
V3.0 SKILL.md 单文件 1996 行 / 70KB,作为 Claude Skill 时存在两个问题:
curl -o ... SKILL.md单文件 install 在拆分后失效,需要重新设计。改动
纯结构重构 + 安装脚本,零代码行为变更。
1. SKILL.md 精简为入口(1996 → 159 行)
保留:
origin: custom/version: 3.0不变;description改为以"何时使用"开头 + 触发关键词 + 禁用场景的标准格式,更利于 LLM 路由判断)pip install不变)get_prefix+eastmoney_datacenter这两个跨层 helper)references/0X-*.md)2. 七层代码下沉到 references/
references/01-quotes.mdreferences/02-research.mdreferences/03-signals.mdreferences/04-capital.mdreferences/05-news.mdreferences/06-fundamentals.mdreferences/07-filings.mdreferences/workflows.mdreferences/faq.md所有 28 个端点的实现代码原样保留(包括
_northbound_cache_path()仍指向~/.tradingagents/cache/),只是分文件存放。3. 新增 install.sh + README 快速开始
老 curl 单文件方式:
```bash
curl -o ~/.claude/skills/a-stock-data/SKILL.md \
https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.md
```
新一键安装:
```bash
curl -fsSL https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/install.sh | bash
```
install.sh用纯 curl(不依赖 git)拉取 SKILL.md + 9 个 reference 到~/.claude/skills/a-stock-data/。文件清单硬编码在脚本内,未来增删 reference 改脚本即可,README 不用改。支持环境变量自定义:
INSTALL_DIR=/custom/path改安装目录BRANCH=dev切分支测试收益
Read references/0X-*.md,按需加载。兼容性
origin: custom/version: 3.0不变curl -o .../SKILL.md单文件安装方式不再适用,已替换为 install.sh自测
bash -n install.sh语法检查通过eastmoney_datacenterhelper / 估值公式 与上游一致bash install.sh验证Diff 体量
```
README.md | +12 / -10
SKILL.md | +159 / -1996 (内容下沉到 references/)
install.sh | 新增 47 行
references/ | 新增 9 个文件 / 共 1594 行(从 SKILL.md 搬运)
```
净增加 ~150 行(install.sh + 索引导航),其余完全是搬迁。