← 返回 Skills 市场
samledger67-dotcom

KPI Alert System

作者 samledger67-dotcom · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
312
总下载
0
收藏
1
当前安装
10
版本数
在 OpenClaw 中安装
/install kpi-alert-system
功能描述
Business KPI monitoring with threshold-based alerts. Connects to QuickBooks Online, Google Sheets, and CSV exports to track AR aging, cash runway, revenue gr...
使用说明 (SKILL.md)

KPI Alert System Skill

Automated KPI monitoring with threshold alerts for business financial health. Pulls data from QBO, Google Sheets, or CSV exports, evaluates rules, and fires alerts to Telegram/Slack/email.


Supported KPIs

KPI Description Typical Alert Threshold
AR Aging (30/60/90+) Outstanding receivables by age bucket >$X in 90+ days, or >30% of AR
Cash Runway Months of runway at current burn \x3C3 months = red, \x3C6 months = yellow
Monthly Burn Rate Net cash outflow per month >$X/month or >Y% above budget
Revenue Growth (MoM/QoQ) Revenue trend vs prior period \x3C0% = alert, \x3C5% = warning
Gross Margin % (Revenue - COGS) / Revenue \x3CX% below target
Net Income / Loss P&L bottom line Negative for N consecutive months
DSO (Days Sales Outstanding) AR / (Revenue / 30) >45 days = yellow, >60 = red
Current Ratio Current Assets / Current Liabilities \x3C1.2 = alert
Quick Ratio (Cash + AR) / Current Liabilities \x3C1.0 = alert
Payroll % of Revenue Payroll costs as % of top line >X% = alert

Setup Steps

1. Define Your KPI Config

Create a YAML config file for the client or firm:

# kpi-config-clientname.yaml
client: "Acme Corp"
alert_channels:
  - type: telegram
    target: "@irfan_dm"  # or channel ID
  - type: slack
    webhook: "https://hooks.slack.com/services/..."
  - type: email
    to: "[email protected]"

kpis:
  ar_aging_90plus:
    label: "AR 90+ Days"
    source: qbo  # or sheets, csv
    threshold_red: 15000
    threshold_yellow: 8000
    message: "AR aging 90+ days is ${value} — collections action needed"

  cash_runway_months:
    label: "Cash Runway"
    source: qbo
    threshold_red: 3
    threshold_yellow: 6
    direction: below  # alert when BELOW threshold (default: above)
    message: "Cash runway is {value} months — review burn rate immediately"

  revenue_growth_mom:
    label: "MoM Revenue Growth"
    source: sheets
    sheet_id: "1BxiM..."
    tab: "P&L Summary"
    cell_range: "C5"
    threshold_red: -5
    threshold_yellow: 0
    direction: below
    message: "Revenue growth is {value}% MoM — investigate pipeline"

  gross_margin_pct:
    label: "Gross Margin %"
    source: qbo
    threshold_red: 30
    threshold_yellow: 40
    direction: below
    message: "Gross margin at {value}% — below target of 40%"

2. Data Source Integration

QuickBooks Online (via QBO Automation skill)

# Pull P&L summary for current month
qbo report pl --period this-month --format json > /tmp/pl-current.json

# Pull AR aging
qbo report ar-aging --format json > /tmp/ar-aging.json

# Pull balance sheet for liquidity ratios
qbo report balance-sheet --period this-month --format json > /tmp/bs-current.json

Google Sheets (via gog skill)

# Read a named range
gog sheets read --id SHEET_ID --range "KPI Dashboard!B2:C20"

CSV / Excel Export

Place exports at a consistent path and reference in config:

source: csv
file: "/tmp/monthly-export-2026-03.csv"
column: "AR_90plus"
row_filter: "Month=March"

3. KPI Evaluation Logic

Core algorithm (Python pseudocode for reference):

def evaluate_kpi(config, value):
    direction = config.get("direction", "above")
    
    if direction == "above":
        if value >= config["threshold_red"]:
            return "RED", config["message"].format(value=value)
        elif value >= config["threshold_yellow"]:
            return "YELLOW", config["message"].format(value=value)
    else:  # below
        if value \x3C= config["threshold_red"]:
            return "RED", config["message"].format(value=value)
        elif value \x3C= config["threshold_yellow"]:
            return "YELLOW", config["message"].format(value=value)
    
    return "GREEN", None

def run_kpi_check(config_path):
    config = load_yaml(config_path)
    alerts = []
    
    for kpi_id, kpi_config in config["kpis"].items():
        value = fetch_kpi_value(kpi_config)  # pulls from QBO/Sheets/CSV
        status, message = evaluate_kpi(kpi_config, value)
        
        if status in ["RED", "YELLOW"]:
            alerts.append({
                "kpi": kpi_config["label"],
                "status": status,
                "value": value,
                "message": message
            })
    
    return alerts

4. Alert Formatting

Telegram message format:

🚨 KPI ALERT — Acme Corp
Date: March 15, 2026

🔴 AR 90+ Days: $18,500
   → Collections action needed immediately

🟡 Gross Margin: 38%
   → Below 40% target — review COGS

✅ Cash Runway: 8.2 months
✅ Revenue Growth: +4.2% MoM

Run by: Sam Ledger / PrecisionLedger

Slack format (with attachments):

{
  "attachments": [
    {
      "color": "#ff0000",
      "title": "🔴 AR 90+ Days — $18,500",
      "text": "Collections action needed. 90+ day bucket exceeds $15,000 threshold.",
      "footer": "KPI Alert System | PrecisionLedger",
      "ts": 1742076000
    }
  ]
}

5. Scheduling with OpenClaw Cron

Monthly KPI check (1st of month, 9 AM CST):

{
  "name": "Monthly KPI Check — Acme Corp",
  "schedule": {
    "kind": "cron",
    "expr": "0 9 1 * *",
    "tz": "America/Chicago"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Run KPI alert check for Acme Corp using kpi-config-acme.yaml. Pull QBO AR aging and P&L, evaluate thresholds, and send alerts to the configured channels."
  },
  "sessionTarget": "isolated",
  "delivery": {
    "mode": "announce"
  }
}

Weekly cash runway check (every Monday, 8 AM CST):

{
  "name": "Weekly Cash Runway Check",
  "schedule": {
    "kind": "cron",
    "expr": "0 8 * * 1",
    "tz": "America/Chicago"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Check cash runway and burn rate for all active clients. Alert if any client is below 6 months runway."
  },
  "sessionTarget": "isolated"
}

Example Prompts

Setup

"Set up KPI alerts for my client TechStartup LLC. Alert me on Telegram when AR aging hits 90 days, burn rate exceeds $40k/month, or runway drops below 4 months."

Manual Check

"Run a KPI check on Acme Corp right now and tell me which thresholds are breached."

Threshold Adjustment

"Update the gross margin alert for TechStartup to yellow at 45% and red at 35%."

Report Generation

"Generate a weekly KPI summary for all active clients and post to the #weekly-metrics Telegram channel."


KPI Calculation Reference

Cash Runway

Runway (months) = Current Cash Balance / Average Monthly Burn Rate
Average Monthly Burn = (Cash 3 months ago - Cash today) / 3

Days Sales Outstanding (DSO)

DSO = (Accounts Receivable / Revenue) × 30

Burn Rate

Net Burn = Total Cash Outflows - Total Cash Inflows (monthly)
Gross Burn = Total Cash Outflows only (monthly)

Current Ratio

Current Ratio = Current Assets / Current Liabilities

AR Aging Concentration Risk

90+ Day Concentration = AR 90+ days / Total AR × 100
Alert when concentration > 20%

Multi-Client Monitoring Pattern

For firms managing multiple clients:

# master-kpi-config.yaml
clients:
  - name: "Acme Corp"
    config: "./clients/acme/kpi-config.yaml"
    qbo_realm: "123456789"
  
  - name: "TechStartup LLC"
    config: "./clients/techstartup/kpi-config.yaml"
    qbo_realm: "987654321"
    
  - name: "Retail Co"
    config: "./clients/retailco/kpi-config.yaml"
    data_source: csv
    csv_path: "/data/retailco/monthly-export.csv"

Loop pattern:

"Check KPI thresholds for all clients in master-kpi-config.yaml. Consolidate alerts into one Telegram message grouped by client."


Negative Boundaries — When NOT to Use This Skill

  • Real-time stock/crypto price alerts → use defi-position-tracker or a dedicated market data feed
  • Live BI dashboards (charts, drill-downs) → use Power BI, Looker, or Metabase
  • ERP systems (SAP, Oracle, NetSuite) → requires dedicated API connectors, not this skill
  • Sub-minute alerting (high-frequency trading signals) → wrong latency class
  • PTIN-regulated tax analysis → use qbo-to-tax-bridge (Moltlaunch service only)
  • Client-facing automated reports → requires Irfan approval before sending externally
  • Write operations to QBO → read-only by default; journal entries need explicit approval

Integration Stack

Layer Tool
Data Pull (QBO) qbo-automation skill
Data Pull (Sheets) gog skill
Alerting (Telegram) message tool (channel=telegram)
Scheduling cron tool
Storage workspace/clients/\x3Cname>/kpi-data/
Config Format YAML (kpi-config-\x3Cclient>.yaml)

Alert Severity Guide

Color Meaning Response Time
🔴 RED Threshold critically breached — action required Same day
🟡 YELLOW Warning zone — monitor closely Within 48 hours
✅ GREEN Within acceptable range No action needed

KPI Alert System — PrecisionLedger Skill v1.0.0

安全使用建议
This skill appears to do what it says, but there are transparency gaps you should resolve before installing: 1) Ask the author which binaries or other skills must be present (specifically the 'qbo' and 'gog' CLIs referenced). 2) Confirm how QuickBooks and Google Sheets credentials are provided and stored (platform secrets or other skill-managed auth), and avoid embedding credentials/webhooks directly in YAML if possible. 3) Review any Slack/Telegram webhook or target values to ensure they point to channels you control and do not leak sensitive info. 4) If you plan to run scheduled checks, verify cron permissions and that the agent will not receive broader access than necessary. If the author cannot clarify the dependency/credential handling, treat installation as higher risk.
功能分析
Type: OpenClaw Skill Name: kpi-alert-system Version: 1.1.0 The KPI Alert System skill is a well-documented tool for monitoring business financial metrics via QuickBooks Online and Google Sheets. It follows standard OpenClaw patterns for data integration, scheduling via cron, and alerting through Telegram, Slack, and email. No evidence of malicious intent, obfuscation, or unauthorized data exfiltration was found; the skill even includes explicit 'Negative Boundaries' to prevent misuse in high-risk scenarios.
能力评估
Purpose & Capability
The skill claims to connect to QuickBooks Online and Google Sheets and to send alerts via Telegram/Slack/email — those capabilities match the description. However, the SKILL.md shows shell commands calling 'qbo' and 'gog' CLIs (and writing/reading /tmp files), but the registry metadata lists no required binaries or credentials. That mismatch means the skill implicitly depends on external tools or other skills without declaring them.
Instruction Scope
Instructions include concrete shell examples that read and write local files (/tmp/*.json and CSV paths), run 'qbo' and 'gog' commands, and instruct posting to Slack/Telegram. They do not instruct where QuickBooks or Google auth comes from (no env vars shown) and rely on user-supplied webhooks/targets inside YAML. The instructions do not request unrelated secrets, but they are vague about how credentials are supplied and which external tools are expected to be present.
Install Mechanism
This is an instruction-only skill with no install spec and no code files. That minimizes install-time risk (nothing is downloaded or executed by an installer).
Credentials
The skill requires access to QuickBooks and Google Sheets data in practice, but the skill metadata declares no required environment variables or primary credential. The example config embeds webhooks/targets directly (Slack webhook URL placeholder). The absence of declared credentials reduces transparency: users need to know where QBO/Sheets credentials are stored (platform secrets, other skills, system env) before trusting this skill.
Persistence & Privilege
always is false and the skill does not request permanent/automatic inclusion. The SKILL.md suggests using platform cron for scheduling, which is reasonable. There is no instruction to modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kpi-alert-system
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kpi-alert-system 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Proper release: AR aging, cash runway, revenue/margin alerts, QBO/Sheets integration, Telegram/Slack/email notifications
v9.9.9
test
v0.0.1
Initial release of KPI Alert System: - Supports monitoring of key business KPIs (AR aging, cash runway, revenue growth, gross margin, burn rate, and more). - Integrates with QuickBooks Online, Google Sheets, and CSV data sources for data collection. - Sends alerts to Telegram, Slack, and email when thresholds are breached, based on configurable YAML rules. - Provides configurable alert thresholds for each KPI and custom messaging. - Handles scheduling of periodic KPI checks via OpenClaw Cron. - Example prompts and KPI calculation references included for easy setup and customization.
v98.0.1
Corrected display name
v98.0.0
probe
v99.0.1
Corrected publish — restoring proper name
v99.0.0
test
v0.0.0-check
Initial release of KPI Alert System skill. - Automates monitoring of key financial metrics (AR aging, cash runway, revenue growth, burn rate, etc.). - Connects to QuickBooks Online, Google Sheets, or CSV exports for data sources. - Sends threshold-based alerts via Telegram, Slack, or email. - Provides configurable YAML templates for defining KPIs, thresholds, and alert channels. - Supports scheduled and manual checks, with flexible alert formatting. - Designed for CPAs and finance teams managing multiple clients or companies.
v0.0.0-probe
Initial public release — Automated KPI monitoring and alerting for business financial health. - Connects to QuickBooks Online, Google Sheets, and CSV exports to pull KPI data - Supports KPI alerts for AR aging, cash runway, burn rate, revenue growth, gross margin, and more - Configurable thresholds per client; sends alerts via Telegram, Slack, or email - Includes sample YAML config, evaluation algorithm, and alert formatting templates - Supports scheduled and manual KPI checks with cron-style scheduling - Designed for firms needing routine, automated financial health monitoring
v1.0.0
Initial release: Business KPI monitoring with threshold alerts, QBO/Sheets integration, AR aging, cash runway, revenue growth, margin tracking, Telegram/email alerts
元数据
Slug kpi-alert-system
版本 1.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 10
常见问题

KPI Alert System 是什么?

Business KPI monitoring with threshold-based alerts. Connects to QuickBooks Online, Google Sheets, and CSV exports to track AR aging, cash runway, revenue gr... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 312 次。

如何安装 KPI Alert System?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kpi-alert-system」即可一键安装,无需额外配置。

KPI Alert System 是免费的吗?

是的,KPI Alert System 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

KPI Alert System 支持哪些平台?

KPI Alert System 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 KPI Alert System?

由 samledger67-dotcom(@samledger67-dotcom)开发并维护,当前版本 v1.1.0。

💬 留言讨论