← Back to Skills Marketplace
wangzhaofeng-max

个人财务管理助手

by wangzhaofeng-max · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
69
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install personal-finance-pro
Description
个人财务管理助手 - 银行账单分析、消费分类、预算管理、财务报表、储蓄建议
README (SKILL.md)

个人财务管理助手

功能特性

  • CSV 账单导入(支持多种格式)
  • 基础数据验证
  • 收支汇总(按月/季度/年)
  • 智能消费分类
  • 预算管理
  • 财务健康评分
  • 储蓄建议
  • 定期报表推送
  • 隐私保护(账号脱敏)
  • 离线处理(无需网络)

快速开始

# 克隆技能
git clone \x3Crepo> ~/.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'] \x3C 0 else 0
        usage = (actual / budget * 100) if budget > 0 else 0
        
        status = '✅' if usage \x3C= 100 else '⚠️' if usage \x3C= 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'] \x3C 0]['amount'].sum())
    savings_rate = (monthly_income - monthly_expense) / monthly_income
    
    if savings_rate \x3C 0.1:
        score -= 20
        issues.append("⚠️ 储蓄率过低 (\x3C10%)")
    elif savings_rate \x3C 0.2:
        score -= 10
        issues.append("⚡ 储蓄率偏低 (10-20%)")
    elif savings_rate >= 0.3:
        score += 10
        issues.append("✅ 储蓄率优秀 (>30%)")
    
    # 2. 消费结构
    categories = transactions[transactions['amount'] \x3C 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'] \x3C 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 \x3C 3:
        score -= 15
        issues.append("⚠️ 应急储备不足 (\x3C3个月)")
    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
Usage Guidance
Install only if you intend to use it for local CSV analysis and are comfortable reviewing the instructions first. Treat any Feishu or scheduled-report setup as sensitive: enable it only deliberately, check exactly what report content is sent, and use masked account data whenever possible.
Capability Assessment
Purpose & Capability
Reading user-selected bank CSVs, categorizing transactions, and writing optional reports are coherent with the finance-assistant purpose, but the documented Feishu scheduled-report feature conflicts with the offline/no-network positioning.
Instruction Scope
Most commands are explicit CLI actions, but the scheduled Feishu report snippet does not clearly state what financial data would be sent, require consent, or define user controls such as preview, disablement, or destination scoping.
Install Mechanism
Install metadata only declares a shell check and the package has a shell script with no dependencies or install-time network behavior; filesystem read/write permissions are not explicitly declared, though the documented operations use user-supplied CSV and output paths.
Credentials
Local processing of personal finance CSVs is proportionate, but outbound scheduled report delivery is high-sensitivity for bank and spending data and is not clearly separated from the offline mode.
Persistence & Privilege
No executable cron setup or background worker was found in the script, but SKILL.md documents recurring cron-style Feishu jobs, creating ambiguity about persistent automated sharing.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install personal-finance-pro
  3. After installation, invoke the skill by name or use /personal-finance-pro
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
- 新增隐私保护功能,账单账号信息自动脱敏 - 新增离线处理支持,无需网络即可使用 - CSV 导入现支持多种格式 - 收支汇总支持按月、季度、年分组显示 - 文档内容拓展和优化,突出功能要点
v1.1.0
- 移除 Pro 版价格、权益对比和联系方式,统一介绍全部功能,无分级说明 - 精简功能说明,按功能类别列出全部特性 - 删除详细的免费与 Pro 版本对比表 - 去除 pricing/tier 信息,仅保留统一功能列表 - 其余功能与代码示例保持一致,未做业务功能变动
v1.0.0
personal-finance-pro 1.0.0 – 新版上线! - 提供个人财务管理功能:银行账单导入、基础数据验证、收支汇总和消费分类。 - Pro 版新增智能消费分类、预算管理、财务健康评分、储蓄建议和定期财务报表推送。 - 明确区分免费与 Pro 版功能,并支持定制预算和智能识别消费类别。 - 按月/季度/年自动生成收支和分类报表。 - 详细操作说明与 CSV 导入格式示例。
Metadata
Slug personal-finance-pro
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is 个人财务管理助手?

个人财务管理助手 - 银行账单分析、消费分类、预算管理、财务报表、储蓄建议. It is an AI Agent Skill for Claude Code / OpenClaw, with 69 downloads so far.

How do I install 个人财务管理助手?

Run "/install personal-finance-pro" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 个人财务管理助手 free?

Yes, 个人财务管理助手 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 个人财务管理助手 support?

个人财务管理助手 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 个人财务管理助手?

It is built and maintained by wangzhaofeng-max (@wangzhaofeng-max); the current version is v1.2.0.

💬 Comments