← 返回 Skills 市场
occupythemilkyway

Tyche Lite — Invoice Tracker (Free)

作者 OccupyTheMilkyWay · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
22
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install tyche-lite
功能描述
Tyche Lite — Invoice Tracker (Free). Process up to 5 invoices from a CSV, see payment status, and get a friendly reminder template. A free preview of what...
使用说明 (SKILL.md)

Tyche Lite — Free Invoice Preview

Track up to 5 invoices and get a friendly reminder template.

Free vs Pro

Feature Tyche Lite (Free) Tyche Pro
Invoices 5 max Unlimited
Tax calculation ❌ ✅
Late fee calculation ❌ ✅
Reminder tiers 1 (friendly only) 3 tiers
Multi-currency ❌ ✅
Project grouping ❌ ✅
Aged receivables ❌ ✅ 30/60/90d
Analytics export ❌ ✅

👉 Upgrade: openclaw skills install tyche-pro — key at ko-fi.com/occupythemilkyway


Step 1 — Install

pip3 install rich --break-system-packages --quiet

Step 2 — Invoice overview (Lite)

import os, csv, re
from datetime import datetime, timedelta
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
from rich import box

console = Console()

INVOICES_FILE = os.environ.get("INVOICES_FILE","").strip()
YOUR_NAME     = os.environ.get("YOUR_NAME","Your Name")
CURRENCY      = os.environ.get("CURRENCY","USD").upper()
SYM           = {"USD":"$","EUR":"€","GBP":"£"}.get(CURRENCY,"$")
INVOICE_LIMIT = 5  # Lite cap
now           = datetime.now()

def fmt(a): return f"{SYM}{a:,.2f}"
def parse_amount(r):
    c = re.sub(r"[^0-9.]","",str(r)) or "0"
    try: return float(c) if c.count(".")\x3C=1 else 0.0
    except: return 0.0
def parse_date(raw):
    for f in ("%Y-%m-%d","%m/%d/%Y","%d/%m/%Y"):
        try: return datetime.strptime(raw.strip(),f)
        except: pass
    return None

invoices = []
if INVOICES_FILE and os.path.exists(INVOICES_FILE):
    with open(INVOICES_FILE,encoding="utf-8",errors="replace") as f:
        reader = csv.DictReader(f)
        for i,row in enumerate(reader,1):
            if i > INVOICE_LIMIT:
                console.print(f"[yellow]⚠️  Lite limit: showing first {INVOICE_LIMIT} invoices only. Upgrade to Pro for unlimited.[/yellow]")
                break
            rk = {k.lower().strip():v.strip() for k,v in row.items()}
            invoices.append({
                "inv_number":   rk.get("inv_number",f"INV-{i:04d}"),
                "client_name":  rk.get("client_name","Client"),
                "client_email": rk.get("client_email",""),
                "description":  rk.get("description","Services"),
                "amount":       parse_amount(rk.get("amount","0")),
                "due_date":     rk.get("due_date",""),
                "status":       rk.get("status","unpaid").lower(),
            })
else:
    console.print("[yellow]ℹ️  No INVOICES_FILE — using demo data.[/yellow]\
")
    invoices = [
        {"inv_number":"INV-0001","client_name":"Acme Corp","client_email":"[email protected]","description":"Website redesign","amount":2500,"due_date":(now-timedelta(days=15)).strftime("%Y-%m-%d"),"status":"overdue"},
        {"inv_number":"INV-0002","client_name":"Globex Inc","client_email":"[email protected]","description":"Consulting","amount":1800,"due_date":(now+timedelta(days=10)).strftime("%Y-%m-%d"),"status":"unpaid"},
        {"inv_number":"INV-0003","client_name":"Initech Ltd","client_email":"[email protected]","description":"Logo design","amount":750,"due_date":(now-timedelta(days=5)).strftime("%Y-%m-%d"),"status":"paid"},
    ]

for inv in invoices:
    due = parse_date(inv["due_date"])
    inv["due_dt"]    = due
    inv["days_late"] = max(0,(now-due).days) if due and inv["status"] in ("overdue","unpaid") else 0

total_invoiced    = sum(i["amount"] for i in invoices)
total_paid        = sum(i["amount"] for i in invoices if i["status"]=="paid")
total_outstanding = total_invoiced - total_paid

console.print()
console.print(Panel.fit(
    f"[bold yellow]⚖️  Tyche Lite — Invoice Overview[/bold yellow]\
"
    f"Invoiced: [white]{fmt(total_invoiced)}[/white]  Paid: [green]{fmt(total_paid)}[/green]  Outstanding: [red]{fmt(total_outstanding)}[/red]\
"
    f"[dim]Lite: showing {len(invoices)}/{INVOICE_LIMIT} invoices max[/dim]",
    border_style="yellow"
))

SC = {"paid":"green","unpaid":"yellow","overdue":"red","partial":"cyan"}
console.print()
tbl = Table(title="Invoice Status", box=box.ROUNDED, border_style="yellow")
tbl.add_column("Inv #",   width=10, style="dim")
tbl.add_column("Client",  width=18, style="cyan")
tbl.add_column("Amount",  width=12, justify="right")
tbl.add_column("Due",     width=12, style="dim")
tbl.add_column("Late",    width=8,  style="red", justify="right")
tbl.add_column("Status",  width=10)
for inv in sorted(invoices, key=lambda x: -(x["days_late"] or 0)):
    sc   = SC.get(inv["status"],"white")
    late = f"{inv['days_late']}d" if inv["days_late"] else "—"
    tbl.add_row(inv["inv_number"],inv["client_name"][:16],fmt(inv["amount"]),inv["due_date"],late,f"[{sc}]{inv['status'].title()}[/{sc}]")
console.print(tbl)

# 1 reminder (Lite: friendly only)
overdue = [i for i in invoices if i["days_late"] > 0]
if overdue:
    inv = overdue[0]
    console.print()
    console.print(Panel(
        f"To: {inv['client_email']}\
Subject: Friendly Reminder — Invoice {inv['inv_number']}\
\
"
        f"Dear {inv['client_name']},\
\
"
        f"I hope you're well. Invoice {inv['inv_number']} for {fmt(inv['amount'])} was due {inv['due_date']}. "
        f"Could you confirm when payment will be processed?\
\
"
        f"Kind regards,\
{YOUR_NAME}",
        title=f"[yellow]Friendly Reminder — {inv['client_name']} ({inv['days_late']}d overdue)[/yellow]",
        border_style="yellow"
    ))
    if len(overdue) > 1:
        console.print(f"[dim]+ {len(overdue)-1} more overdue invoice(s) — upgrade to Pro for all reminder tiers.[/dim]")

console.print()
console.print(Panel(
    f"[bold yellow]🔓 Want more?[/bold yellow]\
\
"
    f"Tyche Pro handles [bold]unlimited invoices[/bold], calculates [bold]late fees & tax[/bold], "
    f"sends [bold]3-tier reminders[/bold], groups by project, and gives you an aged receivables dashboard.\
\
"
    f"[bold cyan]openclaw skills install tyche-pro[/bold cyan]\
"
    f"Get your key → [bold]ko-fi.com/occupythemilkyway[/bold]",
    title="Upgrade to Tyche Pro",
    border_style="cyan"
))
安全使用建议
Install only if you are comfortable running a local Python snippet against your invoice CSV. Consider using a virtual environment instead of the provided system-level pip command, and review any separate Pro upgrade before paying for or installing it.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
The visible purpose and instructions fit an invoice tracker: read up to 5 invoice rows, show status, and print a reminder template. The capability signals for crypto/purchases are not backed by visible automated crypto or purchase behavior; the only purchase-related content is a disclosed Pro upsell.
Instruction Scope
The reviewed instructions are scoped to a user-provided CSV or demo data and console output. No email sending, payment charging, or invoice record mutation is shown in the supplied content.
Install Mechanism
There is no install spec, but SKILL.md tells the user to run a pip install for the rich package, including --break-system-packages. This is disclosed and purpose-aligned for formatted terminal output, but it can change the local Python environment.
Credentials
The optional INVOICES_FILE path is proportionate to the invoice-tracking purpose, but invoice CSVs can contain client names, emails, amounts, and due dates.
Persistence & Privilege
No background process, account credential use, or hidden persistence is shown. The manual pip installation may persistently modify the user's Python package environment.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install tyche-lite
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /tyche-lite 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial Lite release: 5 invoice limit, status overview, friendly reminder template, Pro upsell
元数据
Slug tyche-lite
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Tyche Lite — Invoice Tracker (Free) 是什么?

Tyche Lite — Invoice Tracker (Free). Process up to 5 invoices from a CSV, see payment status, and get a friendly reminder template. A free preview of what... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 22 次。

如何安装 Tyche Lite — Invoice Tracker (Free)?

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

Tyche Lite — Invoice Tracker (Free) 是免费的吗?

是的,Tyche Lite — Invoice Tracker (Free) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Tyche Lite — Invoice Tracker (Free) 支持哪些平台?

Tyche Lite — Invoice Tracker (Free) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Tyche Lite — Invoice Tracker (Free)?

由 OccupyTheMilkyWay(@occupythemilkyway)开发并维护,当前版本 v1.0.0。

💬 留言讨论