Discover and map Pluggy accounts to holders and banks. Authenticates, calls Identity/Item/Accounts APIs, and saves pluggy_items.json. Use when /fetch calls it, or when the user asks to list/map/refresh accounts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/open-personal-finance:accountsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Discovers all Pluggy items, resolves the holder (Identity API), bank (Item API), and accounts (Accounts API), and saves the mapping to `resources/{household}/pluggy_items.json`.
Discovers all Pluggy items, resolves the holder (Identity API), bank (Item API), and accounts (Accounts API), and saves the mapping to resources/{household}/pluggy_items.json.
The {household} is a short lowercase name (e.g. household-1) that scopes all data. Determined from context or by asking.
Read from .env.local at the project root:
PLUGGY_CLIENT_ID=...
PLUGGY_CLIENT_SECRET=...
PLUGGY_ITEM_IDS=id1,id2 # comma-separated, one per bank connection
resources/{household}/pluggy_items.json:
{
"items": {
"<item-id>": {
"holder": "Michel Herszenhaut", // fullName from Identity API
"bank": "Nubank", // resolved from COMPE code (see step 4)
"accounts": {
"<account-id>": {
"type": "BANK", // BANK or CREDIT
"subtype": "CHECKING_ACCOUNT",
"name": "Conta Corrente",
"number": "02215235-0" // account number from Accounts API
}
}
}
}
}
Use node -e (not jq — unavailable on Windows). Source credentials via source .env.local before the node inline script.
POST https://api.pluggy.ai/auth
Body: { "clientId": "...", "clientSecret": "..." }
→ { "apiKey": "..." } // valid ~2 hours
If resources/{household}/pluggy_items.json exists, read it. Only process item IDs from PLUGGY_ITEM_IDS that are not yet in the file (new items). If all items are already mapped, skip to step 6.
For each new item:
GET https://api.pluggy.ai/identity?itemId={itemId}
Header: X-API-KEY: {apiKey}
→ { "id", "itemId", "fullName", "document", "financialRelationships": { "accounts": [{ "compeCode", "number", ... }] }, ... }
Use fullName as holder. If the endpoint returns empty results (some connectors don't support it), fall back to asking the user.
Fetch both the Item API and the Accounts API, then resolve the bank name using this priority:
bankData.transferNumber — parse the COMPE code from the prefix (e.g. "260/0001/02215235-0" → code 260). Map known codes to bank names (see table below).financialRelationships.accounts[].compeCode — same COMPE code, use as fallback if bankData is unavailable.connector.name — only use if it's NOT "MeuPluggy" (MeuPluggy is an aggregator, not a bank). If connector is a direct bank integration, connector.name is the real bank name.name — some accounts include the institution name (e.g. "Nu Pagamentos S.A. - Instituição de Pagamento"). Use as last resort.| Code | Bank |
|---|---|
| 001 | Banco do Brasil |
| 033 | Santander |
| 104 | Caixa Econômica |
| 237 | Bradesco |
| 260 | Nubank |
| 341 | Itaú |
| 077 | Inter |
| 212 | Banco Original |
| 336 | C6 Bank |
| 290 | PagSeguro |
| 380 | PicPay |
| 323 | Mercado Pago |
For unlisted codes, use the account name or ask the user.
Item API call (used for connector.name fallback):
GET https://api.pluggy.ai/items/{itemId}
Header: X-API-KEY: {apiKey}
→ { "connector": { "name": "MeuPluggy" | "Nu Pagamentos S.A.", ... }, ... }
GET https://api.pluggy.ai/accounts?itemId={itemId}
Header: X-API-KEY: {apiKey}
→ { "results": [{ "id", "type" (BANK|CREDIT), "subtype", "name", "number", "bankData": { "transferNumber": "260/0001/12345-6", ... } }] }
Save each account's id, type, subtype, name, and number.
Merge new items into the existing file (or create it) and write to resources/{household}/pluggy_items.json.
/fetch before fetching transactions — ensures pluggy_items.json exists and is up to date/onboard during first-time setupPLUGGY_ITEM_IDS) or asks to refresh/list accountspluggy_items.json — only add new ones or update existingPLUGGY_ITEM_IDS is already in the file, skip it (don't re-fetch)npx claudepluginhub icesnow10/personal-finance --plugin open-personal-financePatterns for Plaid API integration covering Link token flows, transactions sync, identity verification, Auth for ACH, balance checks, webhook handling, and fintech compliance.
Provides patterns for Plaid API integration: link token creation/exchange, transaction sync, identity verification, ACH auth, balance checks, webhook handling, and compliance.
Connects bank accounts via Plaid for automatic daily transaction imports into Wilson. Performs initial 30-day sync, deduplication using transaction_search, and auto-categorization. Requires Pro license.