個人財務管理助手

👤 wangzhaofeng-max 📦 v1.2.0 ⭐ 4.1 ⬇️ 586 下載
🏠 生活服務 免費

📖 技能介紹


name: personal-finance-pro description: 個人財務管理助手 - 銀行賬單分析、消費分類、預算管理、財務報表、儲蓄建議 metadata: openclaw: emoji: "💳" install: - id: shell-check kind: shell label: "檢查 Shell 環境" keywords: - 個人理財 - 記賬 - 消費分析 - 預算管理 - 銀行賬單 - 財務報表


個人財務管理助手

功能特性

  • CSV 賬單匯入(支援多種格式)
  • 基礎資料驗證
  • 收支彙總(按月/季度/年)

    小蔥技能7w4.net持續更新中。

  • 智慧消費分類
  • 預算管理
  • 財務健康評分
  • 儲蓄建議
  • 定期報表推送
  • 隱私保護(賬號脫敏)
  • 離線處理(無需網路)

快速開始

# 克隆技能
git clone <repo> ~/.openclaw/workspace/skills/personal-finance

# 測試
./personal-finance.sh validate --csv sample-data/sample-transactions.csv

資料驗證

./personal-finance.sh validate --csv your_bank_export.csv

檢查 CSV 格式是否正確: - 必需欄位:date, description, amount, account_number - 金額必須為數字 - 日期格式驗證

2. 收支彙總

# 按月彙總
./personal-finance.sh summarize --period month --csv your_bank_export.csv

# 按季度彙總
./personal-finance.sh summarize --period quarter --csv your_bank_export.csv

# 按年彙總
./personal-finance.sh summarize --period year --csv your_bank_export.csv

輸出示例:

📊 月度收支彙總

月份        收入        支出        淨收入
2024-01    ¥15,000    ¥12,000    ¥3,000
2024-02    ¥15,500    ¥11,000    ¥4,500
2024-03    ¥16,000    ¥13,500    ¥2,500

3. 基礎分類

./personal-finance.sh categorize --csv your_bank_export.csv --output categorized.csv

使用 config/category-rules.json 中的規則進行關鍵詞匹配分類。

智慧消費分類

基於機器學習的自動分類:

def smart_categorize(transactions):
    """智慧消費分類"""
    categories = {
        '餐飲': ['美團', '餓了麼', '肯德基', '麥當勞', '星巴克', '海底撈'],
        '交通': ['滴滴', '地鐵', '公交', '加油', '停車', '高鐵', '機票'],
        '購物': ['淘寶', '京東', '拼多多', '天貓', '唯品會'],
        '娛樂': ['電影', '遊戲', 'KTV', '健身', '旅遊'],
        '居住': ['房租', '水電', '物業', '寬頻', '房貸'],
        '醫療': ['醫院', '藥店', '體檢', '保險'],
        '教育': ['學費', '培訓', '書籍', '課程'],
        '社交': ['紅包', '禮物', '聚餐', '轉賬']
    }

    results = []
    for _, row in transactions.iterrows():
        desc = row['description'].lower()
        category = '其他'

        for cat, keywords in categories.items():
            if any(kw in desc for kw in keywords):
                category = cat
                break

        results.append({
            'date': row['date'],
            'description': row['description'],
            'amount': row['amount'],
            'category': category
        })

    return pd.DataFrame(results)

2. 預算管理

def budget_analysis(transactions, budgets):
    """預算執行分析"""
    monthly = transactions.groupby([
        transactions['date'].dt.to_period('M'),
        'category'
    ])['amount'].sum().reset_index()

    results = []
    for _, row in monthly.iterrows():
        budget = budgets.get(row['category'], 0)
        actual = abs(row['amount']) if row['amount'] < 0 else 0
        usage = (actual / budget * 100) if budget > 0 else 0

        status = '✅' if usage <= 100 else '⚠️' if usage <= 120 else '🚨'

        results.append({
            '月份': row['date'],
            '類別': row['category'],
            '預算': budget,
            '實際': actual,
            '使用率': f"{usage:.1f}%",
            '狀態': status
        })

    return pd.DataFrame(results)

# 預算配置示例
budgets = {
    '餐飲': 3000,
    '交通': 1000,
    '購物': 2000,
    '娛樂': 1500,
    '居住': 5000,
    '醫療': 500,
    '教育': 1000,
    '社交': 1000
}

3. 財務健康評分

def financial_health_score(transactions, income, savings):
    """財務健康評分"""
    score = 100
    issues = []

    # 1. 儲蓄率
    monthly_income = income
    monthly_expense = abs(transactions[transactions['amount'] < 0]['amount'].sum())
    savings_rate = (monthly_income - monthly_expense) / monthly_income

    if savings_rate < 0.1:
        score -= 20
        issues.append("⚠️ 儲蓄率過低 (<10%)")
    elif savings_rate < 0.2:
        score -= 10
        issues.append("⚡ 儲蓄率偏低 (10-20%)")
    elif savings_rate >= 0.3:
        score += 10
        issues.append("✅ 儲蓄率優秀 (>30%)")

    # 2. 消費結構
    categories = transactions[transactions['amount'] < 0].groupby('category')['amount'].sum()
    total_expense = abs(categories.sum())

    # 必要支出佔比
    essential = abs(categories.get('居住', 0) + categories.get('餐飲', 0) + categories.get('交通', 0))
    essential_ratio = essential / total_expense if total_expense > 0 else 0

    if essential_ratio > 0.7:
        score -= 15
        issues.append("⚠️ 必要支出佔比過高 (>70%)")

    # 3. 消費波動
    monthly_expenses = transactions[transactions['amount'] < 0].groupby(
        transactions['date'].dt.to_period('M')
    )['amount'].sum()

    cv = monthly_expenses.std() / abs(monthly_expenses.mean()) if len(monthly_expenses) > 1 else 0

    if cv > 0.5:
        score -= 10
        issues.append("⚠️ 消費波動較大")

    # 4. 應急儲備
    emergency_months = savings / monthly_expense if monthly_expense > 0 else 0

    if emergency_months < 3:
        score -= 15
        issues.append("⚠️ 應急儲備不足 (<3個月)")
    elif emergency_months >= 6:
        score += 10
        issues.append("✅ 應急儲備充足 (>6個月)")

    # 評級
    if score >= 90:
        rating = "⭐⭐⭐⭐⭐ 優秀"
    elif score >= 75:
        rating = "⭐⭐⭐⭐ 良好"
    elif score >= 60:
        rating = "⭐⭐⭐ 一般"
    elif score >= 40:
        rating = "⭐⭐ 需改善"
    else:
        rating = "⭐ 警告"

    return {
        '評分': score,
        '評級': rating,
        '問題': issues,
        '建議': generate_savings_advice(issues)
    }

4. 儲蓄建議

def generate_savings_advice(issues):
    """生成儲蓄建議"""
    advice = []

    for issue in issues:
        if '儲蓄率' in issue:
            advice.append("💡 設定自動轉賬,工資到賬後立即轉出20%到儲蓄賬戶")
            advice.append("💡 使用52周存錢法,每週遞增存入金額")

        if '必要支出' in issue:
            advice.append("💡 考慮合租或搬到更便宜的住處")
            advice.append("💡 多做飯少點外賣,每月可節省500-1000元")

        if '消費波動' in issue:
            advice.append("💡 設定每月消費預算,使用信封法管理")
            advice.append("💡 大額消費前等待24小時冷靜期")

        if '應急儲備' in issue:
            advice.append("💡 優先建立3-6個月的應急基金")
            advice.append("💡 將應急資金存入貨幣基金,兼顧流動性和收益")

    return advice

5. 定期報表推送

{
  "cron": {
    "jobs": [
      {
        "id": "monthly-report",
        "schedule": "0 9 1 * *",
        "prompt": "生成上月個人財務報表",
        "channel": "feishu"
      },
      {
        "id": "budget-alert",
        "schedule": "0 10 * * 1",
        "prompt": "檢查本週預算執行情況",
        "channel": "feishu"
      }
    ]
  }
}

CSV 格式要求

date,description,amount,account_number
2024-01-15,美團外賣,-35.50,****1234
2024-01-15,工資收入,15000.00,****1234
2024-01-16,滴滴出行,-25.00,****1234

🤖 AI 評測

這是一款實用且注重隱私的個人財務分析工具,能完成賬單驗證、收支彙總、消費分類和報表生成等核心任務,賬號脫敏和離線處理是亮點。不足之處在於:文件中承諾的智慧分類、預算管理、財務健康評分等高階功能實際上並未真正實現,與實際可用的功能存在明顯差距。適合需要簡單本地財務分析的使用者,但期望更智慧功能的朋友可能會失望。

📊 多維度評分

適應性4
規範性4
有效性3.9
可靠性4.1
可信度4.7

📁 包含檔案 (7 個)

📄 README.md 3.3 KB
📄 SKILL.md 7.9 KB
📄 _meta.json 139 B
📄 config/category-rules.json 677 B
📄 personal-finance.sh 11.2 KB
📄 sample-data/sample-transactions.csv 445 B
📄 skill-card.md 2.5 KB