← Back to Skills Marketplace
safaiyeh

Finance Skill

by safaiyeh · GitHub ↗ · v0.1.2
cross-platform ✓ Security Clean
2293
Downloads
1
Stars
10
Active Installs
3
Versions
Install in OpenClaw
/install finance-skill
Description
Parse and store transactions from bank statements, enable querying and adding personal finance data in JSON format within a local workspace.
README (SKILL.md)

Finance Skill

Personal finance memory layer. Parse statements, store transactions, query spending.

Data Location

  • Transactions: ~/.openclaw/workspace/finance/transactions.json
  • Raw statements: ~/.openclaw/workspace/finance/statements/

Storage convention: OpenClaw workspace (~/.openclaw/workspace/) is the standard location for persistent user data. This matches where session-memory and other hooks store agent data. Credentials/config would go in ~/.config/finance/ if needed.

Tools

1. Parse Statement

When user shares a statement (image or PDF):

⚠️ IMPORTANT: Telegram/channel previews truncate PDFs! Always extract with pypdf first to get ALL pages:

python3 -c "
import pypdf
reader = pypdf.PdfReader('/path/to/statement.pdf')
for i, page in enumerate(reader.pages):
    print(f'=== PAGE {i+1} ===')
    print(page.extract_text())
"

Then parse the full text output:

  1. Extract transactions from ALL pages
  2. Return JSON array: [{date, merchant, amount, category}, ...]
  3. Run scripts/add-transactions.sh to append to store
  4. Verify total matches statement (sum of expenses should equal "Total purchases")

Extraction format:

Each transaction: {"date": "YYYY-MM-DD", "merchant": "name", "amount": -XX.XX, "category": "food|transport|shopping|bills|entertainment|health|travel|other"}
Negative = expense, positive = income/refund.

Categories:

  • food: restaurants, groceries, coffee, fast food
  • transport: Waymo, Uber, gas, public transit
  • shopping: retail, online purchases
  • bills: utilities, subscriptions
  • entertainment: movies, concerts, theme parks
  • health: pharmacy, doctors
  • travel: hotels, flights

2. Query Transactions

User asks about spending → read transactions.json → filter/aggregate → answer

Example queries:

  • "How much did I spend last month?" → sum all negative amounts in date range
  • "What did I spend on food?" → filter by category
  • "Show my biggest expenses" → sort by amount

3. Add Manual Transaction

User says "I spent $X at Y" → append to transactions.json

File Format

{
  "transactions": [
    {
      "id": "uuid",
      "date": "2026-02-01",
      "merchant": "Whole Foods",
      "amount": -87.32,
      "category": "food",
      "source": "statement-2026-01.pdf",
      "added": "2026-02-09T19:48:00Z"
    }
  ],
  "accounts": [
    {
      "id": "uuid",
      "name": "Coinbase Card",
      "type": "credit",
      "lastUpdated": "2026-02-09T19:48:00Z"
    }
  ]
}

Usage Flow

  1. User: shares statement image
  2. Agent: extracts transactions via vision, confirms count
  3. Agent: runs add script to store
  4. User: "how much did I spend on food?"
  5. Agent: reads store, filters, answers

Dependencies

  • jq — for JSON transaction storage and querying (apt install jq / brew install jq)
  • pypdf — for full PDF text extraction (pip3 install pypdf)

Lessons Learned

  • Telegram truncates PDF previews — always use pypdf to get all pages
  • Verify totals — sum extracted expenses and compare to statement total before importing
  • Coinbase Card — no Plaid support, statement upload only

Future: Plaid Integration

  • Add finance_connect tool for Plaid OAuth flow
  • Auto-sync transactions from connected banks
  • Same query interface, different data source
Usage Guidance
This skill appears internally consistent and stores data locally, but review before installing: 1) Ensure you trust the skill source since it will store sensitive financial data under ~/.openclaw/workspace/finance. 2) The scripts expect valid JSON input and rely on jq/pypdf—install those from your package manager. 3) There are minor implementation bugs (e.g., use of 'fabs' in jq output may error depending on your jq version); test on non-sensitive data first. 4) If Plaid or any network sync is later added, expect OAuth credentials and network access—review that change carefully. 5) Back up and encrypt the workspace if you store real financial statements.
Capability Analysis
Type: OpenClaw Skill Name: finance-skill Version: 0.1.2 The OpenClaw Finance Skill is classified as benign. All operations are confined to the `~/.openclaw/workspace/finance/` directory, aligning with its stated purpose of local financial data management. The `scripts/add-transactions.sh` and `scripts/query.sh` scripts correctly utilize `jq`'s `--arg` and `--argjson` parameters, effectively preventing shell injection and `jq` code injection from user-provided or agent-generated input. The `SKILL.md` instructions for the AI agent, including the `python3 -c "import pypdf..."` command and the execution of `scripts/add-transactions.sh`, are directly related to the skill's functionality and do not contain any prompt injection attempts to manipulate the agent into malicious actions or data exfiltration. No evidence of unauthorized file access, network communication, persistence mechanisms, or obfuscation was found.
Capability Assessment
Purpose & Capability
Name/content claim (parse statements, store/query transactions) matches the included scripts, SKILL.md, and README. Required tools (jq, pypdf) are appropriate for JSON manipulation and PDF text extraction. No unrelated credentials, binaries, or services are requested.
Instruction Scope
Runtime instructions operate on local files under ~/.openclaw/workspace/finance and call only local scripts and pypdf; they instruct verification before import. There are no instructions to read system config outside the workspace or to transmit data to remote endpoints.
Install Mechanism
No install spec (instruction-only) and included scripts are simple shell + jq; dependencies are standard (jq via apt/brew, pypdf via pip). No downloads from untrusted URLs or archive extraction.
Credentials
The skill declares no environment variables or credentials and none are required by the scripts. Future Plaid integration is only mentioned as a roadmap item and is not implemented.
Persistence & Privilege
always:false and user-invocable; the skill only writes to its own workspace (~/.openclaw/workspace/finance) and does not modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install finance-skill
  3. After installation, invoke the skill by name or use /finance-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.2
- Added `jq` as a required dependency for JSON transaction storage and querying. - Updated dependencies section in documentation to include installation instructions for `jq`.
v0.1.1
- Added a README.md file to provide documentation and usage instructions. - No functional changes to the code or workflow; documentation only.
v0.1.0
Initial release: statement parsing, transaction storage, spending queries
Metadata
Slug finance-skill
Version 0.1.2
License
All-time Installs 10
Active Installs 10
Total Versions 3
Frequently Asked Questions

What is Finance Skill?

Parse and store transactions from bank statements, enable querying and adding personal finance data in JSON format within a local workspace. It is an AI Agent Skill for Claude Code / OpenClaw, with 2293 downloads so far.

How do I install Finance Skill?

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

Is Finance Skill free?

Yes, Finance Skill is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Finance Skill support?

Finance Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Finance Skill?

It is built and maintained by safaiyeh (@safaiyeh); the current version is v0.1.2.

💬 Comments