Install
openclaw skills install @yk-niu/financial-assistant读取并分析本机“小河狸财报助手”中已导入的财务数据。用户询问公司财务指标、资产负债表、利润表、现金流量表、历年或跨期趋势、财务数据对比、回款金额、本地财务问答时使用;仅通过 localhost 的只读接口访问数据。
使用前提:
确认小河狸财报助手正在同一台电脑上运行,版本不低于 1.7.4。
安全与错误处理:
只访问 127.0.0.1 或 localhost,不访问局域网 IP、公网地址或分享链接。
只调用 /api/local-agent/*,不执行导入、删除、修改公司、修改配置或创建分享链接。
openclaw skills install @yk-niu/financial-assistant通过小河狸财报助手提供的本机只读 API,查询用户已经导入的公司、期间、三大财务报表、财务指标和趋势数据。不得直接读取或修改 SQLite 数据库。
1.7.4。scripts/financial_assistant_client.py。127.0.0.1 和 localhost 的 8765-8784 端口发现服务。/api/local-agent/* 只读接口。health,确认连接的是 financial-analysis-system。companies:只有一家公司时直接使用;存在多家公司且无法从问题确定时,请用户选择,不得静默使用第一家公司。periods 确认可用的期间维度和具体期间。ask。statement。metrics。trend;必要时结合多个期间的 metrics 或 statement。2021年、2025年,不要内置固定年份列表。period_counts 和 latest_period,必要时请用户确认。加:、减:、序号、括号说明或中英文冒号,应以接口返回的标准名称和数值为准。null 视为缺失数据,将 0 视为真实零值,二者不得混淆。python scripts/financial_assistant_client.py health
python scripts/financial_assistant_client.py companies
python scripts/financial_assistant_client.py periods --company "公司名称" --period-type year
python scripts/financial_assistant_client.py metrics --period-id 1
python scripts/financial_assistant_client.py statement --period-id 1 --statement income_statement
python scripts/financial_assistant_client.py trend --company "公司名称" --period-type year --metric revenue
python scripts/financial_assistant_client.py ask "2021年至2023年营业收入分别是多少" --company "公司名称" --period-type year
报表类型参数:
balance_sheet:资产负债表income_statement:利润表cash_flow:现金流量表常用指标参数:
revenue:营业收入net_profit:净利润gross_margin:毛利率net_margin:净利率operating_cash_flow:经营活动现金流量净额debt_ratio:资产负债率cash:货币资金receivables:应收账款inventory:存货categories 和 values 生成图表;缺失点保持缺失,不要补成 0。127.0.0.1 或 localhost,不得访问局域网 IP、公网地址或分享链接。/api/local-agent/*,不得执行导入、删除、修改公司、修改配置或创建分享链接。