Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install vivekkarmarkar-claude-code-os-skills-splitwise-add-expensegit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-splitwise-add-expense/SKILL.md---
name: splitwise-add-expense
description: Add a real Splitwise expense split equally with a named friend. Use when the user says "add a splitwise expense", "split with [friend] for [event]", "add expense for $X with [friend]", invokes `/splitwise-add-expense`, or asks to add an expense to their Splitwise account from voice or chat. Embeds an automatic `[entered by Claude Code Opus 4.7 Max]` signature in the description so the user can audit agent-originated expenses in their Splitwise activity feed.
---
# splitwise-add-expense
Add a real Splitwise expense split equally between the current user (payer) and one named friend. The expense is created via the registered `splitwise` MCP server, which appends `[entered by Claude Code Opus 4.7 Max]` to the description automatically.
## Arguments
`<friend-name> <event-name> <amount>` — three positional arguments. Quote the event-name if it contains spaces.
- **friend-name** — case-insensitive substring matched against the user's Splitwise friends (e.g., `Shobhan`, `alex`, `MariaG`)
- **event-name** — what the expense is for; becomes the description in Splitwise (e.g., `"Paradise dinner"`, `"Uber to airport"`)
- **amount** — total cost in USD, as a number (the current user pays the full amount; both owe half). Do NOT include the dollar sign.
Examples:
- `/splitwise-add-expense Shobhan "Paradise dinner" 62`
- `/splitwise-add-expense alex "Uber to airport" 25.40`
- Natural language: "add a Splitwise expense — $8.50 coffee at Java House with Shobhan"
If ANY of the three are missing, ask the user for the missing piece(s) and do NOT proceed until all three are present. Never invent friend names, amounts, or event names from context.
## Workflow
### Step 1: Verify the MCP server is registered
The `splitwise` MCP server must be globally registered. If the tool `mcp__splitwise__splitwise_add_split_expense` is NOT in the current session's available tool list, surface this to the user with the one-line fix:
```
claude mcp add splitwise --scope user --env SPLITWISE_API_KEY=<your-key> -- /home/vivekkarmarkar/.claude/mcp_servers/splitwise/.venv/bin/python /home/vivekkarmarkar/.claude/mcp_servers/splitwise/server.py
```
Then ask the user to restart Claude Code so the new server is picked up. Stop until they confirm.
### Step 2: Invoke the tool
Call `mcp__splitwise__splitwise_add_split_expense` with these exact arguments:
- `friend_name`: the friend-name argument (string)
- `amount`: the amount argument as a float (e.g., `62.00`)
- `description`: the event-name argument (string, without the signature — the connector appends it)
### Step 3: Report
If the tool returns `{"ok": true, ...}`:
Report to the user in plain text:
- Expense id
- Final description (will include the signature)
- Cost (formatted as USD)
- Friend's resolved full name (so the user can sanity-check the substring match)
- Both shares (`your_share` / `friend_share`)
Tell the user the expense will appear in their Splitwise mobile app within seconds and ask them to verify.
If the tool returns `{"ok": false, "error": ...}`:
Surface the error verbatim. Do NOT claim success. Do NOT retry without explicit user authorization.
## Rules
- **Each Splitwise expense touches a third party with real money.** This skill creates a real financial obligation between the current user and the named friend. Treat it accordingly.
- **Do not retry the tool call on transient failure.** Surface the error and let the user re-invoke if they want.
- **If friend resolution returns no match,** surface that explicitly with the list of available friends and ask for a more specific name. Do NOT silently fall back to a different friend.
- **Default split is 50/50** (current user pays the full cost; both owe half). For non-equal splits, the user should invoke the MCP tool directly with custom share parameters — this skill does not expose those knobs.
- **The signature embedding is automatic and not user-configurable from this skill.** Every expense created here carries `[entered by Claude Code Opus 4.7 Max]` so the user can audit.
- **Auto-mode classifier may pause the first invocation** even with the permission rule in place if the rule's pattern doesn't match. If so, surface the prepared call to the user and ask for explicit go.
## Prerequisites
- The `splitwise` MCP server lives at `~/.claude/mcp_servers/splitwise/`. Its venv has `requests` + `mcp` installed.
- The user has a Splitwise account at https://secure.splitwise.com and has generated a personal API key via the Developer Portal (Apps → Register → "Create API key").
- The user has registered the MCP server globally via `claude mcp add splitwise --scope user ...` once.
- For autonomous repeat invocations without classifier prompts, the user has added `"Bash(SPLITWISE_API_KEY=*)"` to `~/.claude/settings.json` `permissions.allow`. (Optional — without it, each call requires explicit human go.)