Analytics and Advisory Intelligence
The previous 17 skills process, file, store, and protect. This skill thinks. It reads across all the data the system has built up and asks: what does this mean? What should the accountant know that they have not thought to ask?
An accountant managing 40 clients cannot spot a VAT liability trend building across one client's 12 months of data while simultaneously processing another client's payroll and preparing a third client's annual tax return. This skill does the cross-sectional, longitudinal reading that busy humans cannot. It surfaces the finding. The accountant decides what to do with it.
This skill is purely advisory. It reads, analyses, and reports. It never takes action, never modifies client records, and never submits anything. Every insight it surfaces is a prompt for human judgement, not a trigger for automated action.
Setup
CODEBLOCK0
No external credentials required. Analyzes financial data from local files to generate trend reports and advisory insights.
Core Philosophy
- - Proactive, Not Reactive: The system already handles reactive work. This skill looks ahead — identifying problems before they become crises and opportunities before they are missed
- Cross-Client Vision: No single-client skill can see patterns that span the portfolio. This skill aggregates anonymised data across clients to detect sector trends, identify outliers, and benchmark clients against peers
- Plain English Findings: Every output is written for accounting assistants. No statistical jargon, no unexplained numbers. Finding + evidence + suggested action
- Confidence-Rated: Every finding carries a confidence level. A pattern with three data points is labelled differently from one with 18. The accountant knows how much weight to give each insight
- Read-Only Always: This skill reads from all data sources but writes only to /data/reports/analytics/. It has no write access to /data/clients/, /data/compliance/, or any operational directory
- Overnight Operation: Heavy analysis runs outside business hours. Lightweight queries run on demand but are bounded by pre-computed daily outputs
OpenClaw Commands
Portfolio-Level Analysis
CODEBLOCK1
Client-Level Analysis
CODEBLOCK2
Anomaly Detection
CODEBLOCK3
Scheduled Reports and Advisory
openclaw analytics morning-advisory --date today
openclaw analytics morning-advisory --date today --high-risk-only
openclaw analytics monthly-report --period 2026-01 --all-clients
openclaw analytics monthly-report --period 2026-01 --format pdf
openclaw analytics quarterly-review --quarter 2026-Q1 --all-clients
openclaw analytics ask --query "which clients have increasing VAT liability over the last 6 months"
openclaw analytics ask --query "which clients are at risk of not meeting their Q2 tax payment"
openclaw analytics ask --query "are there any expense categories that look unusual this month"
Analysis Modules
1. Compliance Risk Scoring
Every client receives a compliance risk score on a 1-10 scale, computed nightly. Feeds the dashboard portfolio view and morning advisory.
CODEBLOCK5
2. Financial Trend Analysis
Reads Skill 15 financial statement outputs across multiple periods to detect directional movement.
CODEBLOCK6
3. Anomaly Detection
Values statistically unusual relative to a client's own history and sector peers.
CODEBLOCK7
4. Cash Flow Forecasting
Projects cash position forward 1-3 months using historical patterns and known upcoming obligations.
CODEBLOCK8
5. Portfolio Intelligence (Cross-Client)
Aggregated across the portfolio. All cross-client aggregation is anonymised.
CODEBLOCK9
Morning Advisory Output Format
Pre-computed overnight. Ready by 08:00. Pulled by conversational assistant (Skill 14).
CODEBLOCK10
File System
CODEBLOCK11
Scheduling
CODEBLOCK12
Integration Points
CODEBLOCK13
Memory Integration (Phase 4 — Skill 19 hooks)
CODEBLOCK14
Error Handling
CODEBLOCK15
Success Metrics
A successful deployment of this skill should achieve:
- - Morning advisory ready every business day before 08:00 Athens time
- Risk scores computed for 100% of active clients nightly
- Anomaly detection surfaces at least one actionable finding per week across the portfolio
- Cash flow forecasts accurate within 15% for the 1-month horizon (measured retrospectively)
- Zero false positives that cause unnecessary client alarm — confidence ratings are accurate
- All findings in plain English that an accounting assistant can act on immediately
- Read-only confirmed — no writes to any operational directory, ever
Remember: This skill is the difference between an accounting system that processes the past and one that helps the firm prepare for the future. The value is not in the data it holds — the value is in what it notices that humans would have missed.
分析与咨询智能
之前的17项技能负责处理、归档、存储和保护。这项技能负责思考。它通读系统积累的所有数据并提出问题:这意味着什么?会计师应该知道哪些他们没想到要问的事情?
一位管理40个客户的会计师无法在同时处理另一个客户的工资单和准备第三个客户的年度纳税申报时,发现一个客户12个月数据中正在形成的增值税负债趋势。这项技能完成了忙碌的人类无法完成的横向、纵向阅读。它揭示发现。由会计师决定如何处理。
这项技能纯粹是咨询性质的。它阅读、分析和报告。它从不采取行动,从不修改客户记录,也从不提交任何内容。它揭示的每一个洞察都是对人类判断的提示,而不是自动行动的触发。
设置
bash
export OPENCLAWDATADIR=/data
which jq || sudo apt install jq
无需外部凭证。分析本地文件中的财务数据,生成趋势报告和咨询洞察。
核心理念
- - 主动而非被动:系统已处理被动工作。这项技能着眼未来——在问题变成危机之前识别它们,在机会被错过之前发现它们
- 跨客户视野:没有单一客户技能能够看到跨越投资组合的模式。这项技能汇总跨客户的匿名数据,以检测行业趋势、识别异常值,并将客户与同行进行基准比较
- 通俗易懂的发现:每个输出都为会计助理编写。没有统计术语,没有未解释的数字。发现 + 证据 + 建议行动
- 置信度评级:每个发现都带有置信度级别。有三个数据点的模式与有18个数据点的模式标注不同。会计师知道每个洞察应给予多少权重
- 始终只读:这项技能从所有数据源读取,但仅写入 /data/reports/analytics/。它对 /data/clients/、/data/compliance/ 或任何操作目录没有写入权限
- 夜间运行:繁重分析在营业时间外运行。轻量查询按需运行,但受预计算的每日输出限制
OpenClaw 命令
投资组合级别分析
bash
openclaw analytics portfolio-health --all-clients --period 2026-01
openclaw analytics portfolio-health --all-clients --period 2026-01 --rank-by risk
openclaw analytics compliance-risk --all-clients --period 2026-01
openclaw analytics compliance-risk --all-clients --flag-high-risk
openclaw analytics compliance-risk --sector retail --compare-to-sector
openclaw analytics workload --all-clients --period 2026-01 --by-accountant
openclaw analytics workload --forecast --next-quarter
openclaw analytics benchmark --afm EL123456789 --vs-sector retail --period 2026-01
openclaw analytics benchmark --afm EL123456789 --vs-sector retail --last 6-months
客户级别分析
bash
openclaw analytics client-risk --afm EL123456789
openclaw analytics client-risk --afm EL123456789 --verbose
openclaw analytics trends --afm EL123456789 --metric vat-liability --last 12-months
openclaw analytics trends --afm EL123456789 --metric gross-margin --last 6-months
openclaw analytics trends --afm EL123456789 --all-metrics --period 2025
openclaw analytics anomalies --afm EL123456789 --period 2026-01
openclaw analytics anomalies --afm EL123456789 --last 6-months --flag-significant
openclaw analytics cashflow-forecast --afm EL123456789 --horizon 3-months
openclaw analytics cashflow-forecast --afm EL123456789 --horizon 3-months --include-tax-payments
openclaw analytics tax-planning --afm EL123456789 --year 2026
openclaw analytics tax-planning --afm EL123456789 --year 2026 --include-scenarios
异常检测
bash
openclaw analytics supplier-overlap --all-clients --flag-unusual
openclaw analytics supplier-overlap --threshold 5-clients
openclaw analytics expense-anomalies --all-clients --period 2026-01
openclaw analytics expense-anomalies --afm EL123456789 --vs-prior-periods
openclaw analytics vat-rate-check --all-clients --period 2026-01
openclaw analytics vat-rate-check --afm EL123456789 --last 6-months
定期报告和咨询
bash
openclaw analytics morning-advisory --date today
openclaw analytics morning-advisory --date today --high-risk-only
openclaw analytics monthly-report --period 2026-01 --all-clients
openclaw analytics monthly-report --period 2026-01 --format pdf
openclaw analytics quarterly-review --quarter 2026-Q1 --all-clients
openclaw analytics ask --query which clients have increasing VAT liability over the last 6 months
openclaw analytics ask --query which clients are at risk of not meeting their Q2 tax payment
openclaw analytics ask --query are there any expense categories that look unusual this month
分析模块
1. 合规风险评分
每个客户在1-10分范围内获得合规风险评分,每晚计算。为仪表板投资组合视图和晨间咨询提供数据。
yaml
合规风险评分:
输入:
- 过去12个月的逾期申报 (权重: 30%)
- 当前未关闭的合规缺口 (权重: 25%)
- 缺失文件待处理超过14天 (权重: 20%)
- AADE处罚记录 (权重: 15%)
- 距离下一个截止日期的天数 vs 已收到文件 (权重: 10%)
评分区间:
1-3: 低风险 — 所有义务已履行,无缺口
4-6: 中等风险 — 小缺口或历史延迟
7-8: 高风险 — 存在活跃缺口或近期处罚
9-10: 危急 — 需要立即关注
输出位置: /data/reports/analytics/{YYYY-MM-DD}_risk-scores.json
刷新时间: 每晚雅典时间01:00
2. 财务趋势分析
读取技能15的财务报表输出,跨多个期间检测方向性变动。
yaml
财务趋势:
追踪指标:
毛利率:
计算: (收入 - 销售成本) / 收入
预警阈值: 较去年同期下降超过5个百分点
发现模板: {客户}毛利率已从{X}%下降至{Y}% — 在{N}个月内下降{delta}个百分点。主要驱动因素似乎是{最高费用类别变化}。
增值税负债趋势:
计算: 每期应付净增值税
预警阈值: 较前3个月平均值增加超过20%
发现模板: {客户}增值税负债在{N}个月内增加了{X}%。可能反映营业额增加、客户结构变化或值得审查的分类问题。
员工成本比率:
计算: 员工成本(EGLS账户64) / 收入
预警阈值: 比率增加超过3个百分点
现金状况:
计算: 现金和银行存款(账户38)趋势
预警阈值: 连续3个月下降
发现模板: {客户}现金状况已连续{N}个月下降(从欧元{X}降至欧元{Y})。考虑到{Z}欧元的税款将于{日期}到期,这值得进行现金流对话。
所需最少期间: 3
首选期间: 12
置信度说明: 数据点少于6个的发现标记为低置信度
3. 异常检测
相对于客户自身历史和行业同行在统计上异常的值。
yaml
异常检测:
方法:
自身历史比较:
描述: 值超过客户自身滚动平均值2个标准差
示例: 1月电费4,200欧元 vs 滚动12个月平均值1,800欧元
行业同行比较:
描述: 值超过该账户行业中位数的1.5倍或低于0.5倍
说明: 行业中位数根据整个投资组合的匿名汇总计算
增值税率异常:
描述: 根据产品/服务类别,交易以错误的增值税率分类
示例: 食品发票按24%而非正确的13%低税率
行动: 标记供会计师审查 — 从不自动更正
输出字段:
- metric: 测量了什么
- actual_value: 发现了什么
- expected_range: 该客户/行业的正常范围
- deviation: 偏离正常范围的程度
- confidence: 高 / 中 / 低
- suggested_action: 通俗易懂的建议
- data_source: 发现基于哪些文件
4. 现金流预测
使用历史模式和已知的未来义务,预测未来1-3个月的现金状况。
yaml
现金流预测:
输入:
已知流入:
- 基于滚动3个月平均值的经常性收入
- 来自登记簿的未清应收账款发票
已知流出:
- 来自cli-deadline-monitor