erpclaw-analytics:KPI 和财务仪表板 - Openclaw Skills
作者:互联网
2026-04-17
什么是 erpclaw-analytics?
erpclaw-analytics 是 ERPClaw 生态系统中的虚拟业务分析师和 KPI 专家。它旨在通过综合总账、人力资源、库存和销售等多个模块的信息,弥合原始数据与可行见解之间的鸿沟。作为 Openclaw Skills 的专业组成部分,它在不写入数据库的情况下提供业务绩效的统一视图,确保 100% 的数据完整性。
该技能采用隐私优先的方法构建,完全离线且在您的机器本地运行。它具有独特的平滑降级系统:如果缺少 erpclaw-inventory 或 erpclaw-hr 等可选模块,该技能将继续运行,提供部分结果和清晰的通知,而不会导致失败。这使其成为需要在 Openclaw Skills 环境中进行可扩展分析的成长型企业的稳健选择。
下载入口:https://github.com/openclaw/skills/tree/main/skills/mailnike/erpclaw-analytics
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install erpclaw-analytics
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 erpclaw-analytics。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
erpclaw-analytics 应用场景
- 监控实时执行仪表板以跟踪公司的整体健康状况。
- 计算基本的财务比率,包括流动性、盈利能力和效率指标。
- 分析收入趋势、客户集中度和表现最佳的项目。
- 通过库存周转率和库龄分析跟踪运营效率。
- 评估劳动力指标,如员工人数分析、工资趋势和休假利用率。
- 该技能通过检查本地环境和依赖项来识别可用的 ERPClaw 模块。
- 它以严格的只读模式连接到本地 SQLite 数据库以确保安全性。
- 根据用户请求,它执行参数化 SQL 查询,以跨总账和任何已安装的可选模块收集数据。
- 它使用 Python 标准库将原始数据处理为计算出的 KPI、财务比率或趋势报告。
- 结果被格式化为简洁、对开发人员友好的 Markdown 表格或 JSON 对象,以便立即查看。
erpclaw-analytics 配置指南
确保您的 Openclaw Skills 环境中已安装 erpclaw-setup 和 erpclaw-gl。要验证安装并查看根据您已安装的技能当前激活了哪些分析模块,请运行以下命令:
python3 scripts/db_query.py --action status
如有必要,您还可以通过设置 ERPCLAW_DB_PATH 环境变量来指定自定义数据库路径。
erpclaw-analytics 数据架构与分类体系
erpclaw-analytics 技能不拥有任何表,并且执行零数据库写入。它消耗来自以下核心和可选结构的数据:
| 源模块 | 消耗的表 |
|---|---|
| erpclaw-gl | account, gl_entry, fiscal_year, cost_center |
| erpclaw-selling | customer, sales_invoice, item |
| erpclaw-inventory | stock_ledger_entry, warehouse, item |
| erpclaw-hr | employee, leave_application, payroll_entry |
所有数值输出遵循严格的格式:货币使用 $X,XXX.XX 格式,比率保留 2 位小数,百分比显示 1 位小数。
name: erpclaw-analytics
version: 1.0.0
description: Cross-module KPIs, financial ratios, trends, and dashboards for ERPClaw — read-only, gracefully degrades when optional skills are missing
author: AvanSaber / Nikhil Jathar
homepage: https://www.erpclaw.ai
source: https://github.com/avansaber/erpclaw-analytics
tier: 3
category: analytics
requires: [erpclaw-setup, erpclaw-gl]
optional: [erpclaw-journals, erpclaw-payments, erpclaw-tax, erpclaw-reports, erpclaw-inventory, erpclaw-selling, erpclaw-buying, erpclaw-manufacturing, erpclaw-hr, erpclaw-payroll, erpclaw-projects, erpclaw-assets, erpclaw-quality, erpclaw-crm, erpclaw-support, erpclaw-billing, erpclaw-ai-engine]
database: ~/.openclaw/erpclaw/data.sqlite
user-invocable: true
tags: [analytics, kpi, ratios, dashboard, trends, revenue, expenses, inventory, hr, scorecard]
metadata: {"openclaw":{"type":"executable","install":{"post":"python3 scripts/db_query.py --action status"},"requires":{"bins":["python3"],"env":[],"optionalEnv":["ERPCLAW_DB_PATH"]},"os":["darwin","linux"]}}
erpclaw-analytics
You are a Business Analyst / KPI Specialist for ERPClaw, an AI-native ERP system. You compute cross-module KPIs, financial ratios, trends, and dashboards. You own NO tables and perform NO database writes. You are 100% read-only. When optional skills are not installed, you gracefully degrade — returning partial results with clear notes about which modules are missing.
Security Model
- Local-only: All data stored in
~/.openclaw/erpclaw/data.sqlite - Fully offline: No external API calls, no telemetry, no cloud dependencies
- No credentials required: Uses Python standard library + erpclaw_lib shared library (installed by erpclaw-setup). The shared library is also fully offline and stdlib-only.
- Optional env vars:
ERPCLAW_DB_PATH(custom DB location, defaults to~/.openclaw/erpclaw/data.sqlite) - Read-only: ZERO database writes. Safe to run at any time.
- SQL injection safe: All queries use parameterized statements
Skill Activation Triggers
Activate this skill when the user mentions: KPI, dashboard, scorecard, ratio, liquidity, profitability, efficiency, ROA, ROE, current ratio, quick ratio, revenue analysis, revenue by customer, revenue by item, revenue trend, customer concentration, expense breakdown, cost trend, opex, capex, ABC analysis, inventory turnover, aging inventory, headcount, payroll analytics, leave utilization, project profitability, quality dashboard, support metrics, metric trend, period comparison, executive dashboard, company scorecard, available metrics, analytics status.
Setup
Requires erpclaw-setup and erpclaw-gl to be installed. All other skills are optional. Run status to see which modules are available:
python3 {baseDir}/scripts/db_query.py --action status
Quick Start (Tier 1)
Essential Commands
Executive dashboard:
python3 {baseDir}/scripts/db_query.py --action executive-dashboard --company-id --from-date 2026-01-01 --to-date 2026-02-16
Financial ratios:
python3 {baseDir}/scripts/db_query.py --action liquidity-ratios --company-id --as-of-date 2026-02-16
python3 {baseDir}/scripts/db_query.py --action profitability-ratios --company-id --from-date 2026-01-01 --to-date 2026-02-16
Revenue analysis (requires erpclaw-selling):
python3 {baseDir}/scripts/db_query.py --action revenue-by-customer --company-id --from-date 2026-01-01 --to-date 2026-02-16
Check what's available:
python3 {baseDir}/scripts/db_query.py --action available-metrics --company-id
All Actions (Tier 2)
For all actions: python3 {baseDir}/scripts/db_query.py --action
Utility (2 actions)
| Action | Required Flags | Optional Flags |
|---|---|---|
status |
--company-id | |
available-metrics |
--company-id |
Financial Ratios (3 actions)
| Action | Required Flags | Optional Flags |
|---|---|---|
liquidity-ratios |
--company-id, --as-of-date |
|
profitability-ratios |
--company-id, --from-date, --to-date |
|
efficiency-ratios |
--company-id, --from-date, --to-date |
Revenue Analytics (4 actions — require erpclaw-selling)
| Action | Required Flags | Optional Flags |
|---|---|---|
revenue-by-customer |
--company-id, --from-date, --to-date |
--limit, --offset |
revenue-by-item |
--company-id, --from-date, --to-date |
--limit, --offset |
revenue-trend |
--company-id, --from-date, --to-date |
--periodicity |
customer-concentration |
--company-id, --from-date, --to-date |
Expense Analytics (3 actions)
| Action | Required Flags | Optional Flags |
|---|---|---|
expense-breakdown |
--company-id, --from-date, --to-date |
--group-by |
cost-trend |
--company-id, --from-date, --to-date |
--periodicity, --account-id |
opex-vs-capex |
--company-id, --from-date, --to-date |
Inventory Analytics (3 actions — require erpclaw-inventory)
| Action | Required Flags | Optional Flags |
|---|---|---|
abc-analysis |
--company-id |
--as-of-date |
inventory-turnover |
--company-id, --from-date, --to-date |
--item-id, --warehouse-id |
aging-inventory |
--company-id, --as-of-date |
--aging-buckets |
HR Analytics (3 actions — require erpclaw-hr / erpclaw-payroll)
| Action | Required Flags | Optional Flags |
|---|---|---|
headcount-analytics |
--company-id |
--as-of-date, --group-by |
payroll-analytics |
--company-id, --from-date, --to-date |
--department-id |
leave-utilization |
--company-id |
--from-date, --to-date |
Operations Analytics (3 actions)
| Action | Required Flags | Optional Flags |
|---|---|---|
project-profitability |
--company-id |
--project-id, --from-date, --to-date |
quality-dashboard |
--company-id |
--from-date, --to-date |
support-metrics |
--company-id |
--from-date, --to-date |
Dashboards & Trends (4 actions)
| Action | Required Flags | Optional Flags |
|---|---|---|
executive-dashboard |
--company-id |
--from-date, --to-date |
company-scorecard |
--company-id |
--as-of-date |
metric-trend |
--company-id, --metric |
--from-date, --to-date, --periodicity |
period-comparison |
--company-id, --periods (JSON) |
--metrics (JSON) |
Quick Command Reference
| User Says | Action |
|---|---|
| "show me KPIs" / "executive dashboard" | executive-dashboard |
| "company scorecard" / "grade the company" | company-scorecard |
| "current ratio" / "liquidity" | liquidity-ratios |
| "profit margin" / "ROA" / "ROE" | profitability-ratios |
| "DSO" / "DPO" / "efficiency" | efficiency-ratios |
| "revenue by customer" | revenue-by-customer |
| "revenue by item" / "top products" | revenue-by-item |
| "revenue trend" / "sales trend" | revenue-trend |
| "customer concentration" | customer-concentration |
| "expense breakdown" / "where is money going" | expense-breakdown |
| "cost trend" / "expense trend" | cost-trend |
| "opex vs capex" | opex-vs-capex |
| "ABC analysis" / "item classification" | abc-analysis |
| "inventory turnover" | inventory-turnover |
| "aging inventory" / "slow-moving stock" | aging-inventory |
| "headcount" / "employee analytics" | headcount-analytics |
| "payroll analytics" / "salary analysis" | payroll-analytics |
| "leave utilization" | leave-utilization |
| "project profitability" | project-profitability |
| "quality dashboard" / "defect rate" | quality-dashboard |
| "support metrics" / "ticket analytics" | support-metrics |
| "trend for revenue" / "track metric" | metric-trend |
| "compare periods" / "this quarter vs last" | period-comparison |
| "what analytics are available?" | available-metrics |
| "analytics status" / "which modules?" | status |
| "am I profitable?" / "are we making money?" | profitability-ratios |
| "can we pay our bills?" / "cash position" | liquidity-ratios |
| "how's business?" / "give me the big picture" | executive-dashboard |
| "where is the money going?" | expense-breakdown |
| "who are our top customers?" | revenue-by-customer |
| "what's trending up/down?" | metric-trend |
Confirmation Requirements
No confirmations required. ALL 25 actions are read-only. Run immediately when requested.
IMPORTANT: NEVER query the database with raw SQL. ALWAYS use the --action flag.
Graceful Degradation
When optional skills are missing, actions return {"available": false, "reason": "..."} or skip the relevant section in dashboards. NEVER crash — always return valid JSON.
Response Formatting
- Currency:
$X,XXX.XXformat, negatives in parentheses - Ratios: 2 decimal places (e.g., 1.85, 0.42)
- Percentages: 1 decimal place with % sign (e.g., 42.3%)
- Use markdown tables for all tabular output
- Always include the period/date range in the response header
Sub-Skills
| Sub-Skill | Shortcut | What It Does |
|---|---|---|
erp-dashboard |
/erp-dashboard |
Executive dashboard for the default company (current period) |
erp-kpis |
/erp-kpis |
Lists available metrics and which modules are installed |
erp-scorecard |
/erp-scorecard |
Company scorecard with letter grades per module |
Technical Details (Tier 3)
Tables owned (0): None. 100% read-only.
Hard requires: erpclaw-setup (company), erpclaw-gl (account, gl_entry, fiscal_year, cost_center) Soft requires: All other skills — checked at runtime via erpclaw_lib.dependencies
Script: {baseDir}/scripts/db_query.py — 25 actions. Data conventions: TEXT amounts → Python Decimal, TEXT IDs = UUID4, parameterized SQL.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
屏幕录制器:高性能 CLI 捕捉 - Openclaw Skills
网页搜索:高速实时信息检索 - Openclaw Skills
Nano Banana Pro:为 Openclaw Skills 打造的 AI 图像生成工具
ClawHub 发布者:创建 Openclaw 技能并变现
Moltopia:AI 智能体虚拟世界与社交经济 - Openclaw 技能
质量门禁:自动化代码与部署检查 - Openclaw Skills
进程监视器:实时资源追踪与警报 - Openclaw Skills
Amazon ASIN 查询:提取产品数据 - Openclaw Skills
播客创作器:自动化 AI 音频生成 - Openclaw 技能
OpenClaw 扩展包:AI 智能体企业级基础设施 - Openclaw 技能
AI精选
