with one click
read-pdf
读取上市公司PDF财报与公告,构建RAG知识库,支持多轮问答和页码溯源。在用户请求读取、解析财报PDF、查询财报数据、下载年报时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
读取上市公司PDF财报与公告,构建RAG知识库,支持多轮问答和页码溯源。在用户请求读取、解析财报PDF、查询财报数据、下载年报时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Backtrader 量化回测。禁止 pip install、禁止检查环境。唯一正确做法:直接执行 exec,命令 python skills/backtrader/scripts/run_backtest.py <股票代码> <开始日期> <结束日期> [策略名],workdir 为工作区根目录,返回脚本输出的 JSON。示例:python skills/backtrader/scripts/run_backtest.py 600519.SH 2025-01-01 2025-12-31 double_ma
获取 A 股 K 线。禁止 pip install、禁止检查环境。唯一正确做法:直接执行 exec,命令 python skills/miniqmt-kline/scripts/get_kline.py <股票代码> 1d <条数>,workdir 为工作区根目录,返回脚本输出的 JSON。示例:python skills/miniqmt-kline/scripts/get_kline.py 600519.SH 1d 50
根据 ADX 判断股票更适合趋势交易还是震荡交易。禁止 pip install、禁止检查环境。唯一正确做法:直接执行 exec,命令 python skills/strategy-recommend/scripts/recommend.py <股票代码> [--period 14] [--count 100],workdir 为工作区根目录,返回脚本输出的 JSON。示例:python skills/strategy-recommend/scripts/recommend.py 600519.SH
TA-Lib 技术指标库,计算 SMA/EMA、MACD、RSI、ATR、布林带等 158 种技术指标,用于量化策略的信号生成和选股。
基于统一索引对比分析不同时期的财报变化,或横向对比不同公司的研报观点。在用户请求跨期对比、同行研报对比时使用。
分析上市公司财务指标趋势(毛利率/ROE/负债率等),支持同行业横向对比。在用户请求分析财务数据、对比公司指标、查看财务趋势时使用。
| name | read-pdf |
| description | 读取上市公司PDF财报与公告,构建RAG知识库,支持多轮问答和页码溯源。在用户请求读取、解析财报PDF、查询财报数据、下载年报时使用。 |
| keywords | 财报, 年报, PDF, 读取, 解析, 财务报表, 资产负债表, 利润表, 现金流, 公告, 阅读, 分析 |
skills/read-pdf/scripts/parse_pdf_basic.pypython skills/read-pdf/scripts/parse_pdf_basic.py --pdf <PDF路径> --output_dir <输出目录>skills/read-pdf/scripts/parse_pdf_ocr.pypython skills/read-pdf/scripts/parse_pdf_ocr.py --pdf <PDF路径> --output_dir <输出目录>--model deepseek-ocr-2 切换| 脚本 | 功能 | 参数 |
|---|---|---|
scripts/parse_pdf_basic.py | PyPDF2 基础解析 PDF | --pdf, --output_dir |
scripts/parse_pdf_ocr.py | 多模态大模型解析复杂表格 | --pdf, --output_dir, --pages(可选), --model(可选) |
scripts/build_index.py | 构建 FAISS 向量索引 | --text_dir(目录) 或 --text_file(单文件), --index_dir |
scripts/query_report.py | RAG 问答查询 | --index_dir, --query, --top_k(默认6) |
scripts/fetch_financial_data.py | 获取财务数据/下载年报PDF | --stock, --type(financial/pdf/all), --output_dir |
data/vector_store/ 是否存在query_report.py 并带 --stock 参数过滤
python skills/read-pdf/scripts/query_report.py --index_dir data/vector_store --query "问题" --stock 688981data/vector_db/ 下是否有旧版单文档索引query_report.py 查询(不带 --stock)data/reports/ 下是否已有对应 PDF
b. 如无 PDF,用 fetch_financial_data.py --stock <代码> --type pdf 下载
c. 用 parse_pdf_basic.py 或 parse_pdf_ocr.py 解析 PDF
d. 用 build_index.py 构建 FAISS 向量索引
e. 用 query_report.py 回答用户问题data/reports/python preprocess.py 即可自动处理新文件并更新统一索引data/documents.db禁止: 安装依赖、检查环境、验证包版本。
注意: execute 执行脚本时,所有路径参数必须用相对路径(不带前导 /)。
例如: --index_dir data/vector_store,不要写成 --index_dir /data/vector_store。
ls 返回的路径带有前导 /,传给脚本时需要去掉。
用户: "中芯国际 2025Q2 营收和毛利率是多少?" 步骤:
python skills/read-pdf/scripts/query_report.py --index_dir data/vector_store --query "2025Q2营收和毛利率" --stock 688981用户: "帮我读一下贵州茅台的年报" 步骤:
python skills/read-pdf/scripts/query_report.py --index_dir data/vector_store --query "贵州茅台年报概况" --stock 600519