Integrate Plaid API for bank account connections and transaction syncing. Use when implementing financial data access, bank linking, or transaction imports in TypeScript/Bun applications.
Adds Plaid API integration for bank account linking and transaction syncing in TypeScript/Bun apps. Claude will use this when you need to connect bank accounts, sync transactions, or implement financial data access with proper authentication flows.
/plugin marketplace add b-open-io/prompts/plugin install bopen-tools@b-open-ioThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/api-reference.mdreferences/code-examples.mdIntegrate Plaid for connecting bank accounts and syncing transactions in TypeScript applications using Bun.
bun add plaid
import { Configuration, PlaidApi, PlaidEnvironments } from 'plaid';
const plaidClient = new PlaidApi(new Configuration({
basePath: PlaidEnvironments[process.env.PLAID_ENV || 'sandbox'],
baseOptions: {
headers: {
'PLAID-CLIENT-ID': process.env.PLAID_CLIENT_ID,
'PLAID-SECRET': process.env.PLAID_SECRET,
}
}
}));
| Environment | Use Case | HTTPS Required | Real Data |
|---|---|---|---|
sandbox | Development/testing | No | No (test accounts) |
development | Limited Production | Yes for redirect, No for popup | Yes (with limits) |
production | Full production | Yes | Yes |
Critical: Use popup mode (no redirect_uri) for local development to avoid HTTPS requirements:
// Popup mode - works with HTTP localhost
const linkConfig = {
user: { client_user_id: `user-${Date.now()}` },
client_name: 'My App',
products: ['transactions'],
country_codes: ['US'],
language: 'en',
// NO redirect_uri = popup mode
};
The Plaid Link flow has 3 steps:
See references/code-examples.md for complete implementation.
Common products to request:
| Product | Description |
|---|---|
transactions | Transaction history and real-time updates |
auth | Account and routing numbers |
identity | Account holder information |
investments | Investment account data |
liabilities | Loan and credit card data |
For multi-account support, use SQLite with Bun's built-in driver:
import { Database } from "bun:sqlite";
db.run(`
CREATE TABLE IF NOT EXISTS items (
id TEXT PRIMARY KEY,
access_token TEXT NOT NULL,
institution_id TEXT,
institution_name TEXT,
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)
`);
db.run(`
CREATE TABLE IF NOT EXISTS accounts (
id TEXT PRIMARY KEY,
item_id TEXT NOT NULL,
name TEXT NOT NULL,
type TEXT NOT NULL,
subtype TEXT,
current_balance REAL,
FOREIGN KEY (item_id) REFERENCES items(id) ON DELETE CASCADE
)
`);
db.run(`
CREATE TABLE IF NOT EXISTS transactions (
id TEXT PRIMARY KEY,
account_id TEXT NOT NULL,
amount REAL NOT NULL,
date TEXT NOT NULL,
name TEXT NOT NULL,
merchant_name TEXT,
category TEXT,
FOREIGN KEY (account_id) REFERENCES accounts(id) ON DELETE CASCADE
)
`);
Plaid returns max 500 transactions per request. Always paginate:
let offset = 0;
const count = 500;
let hasMore = true;
while (hasMore) {
const response = await plaidClient.transactionsGet({
access_token,
start_date: '2023-01-01',
end_date: '2024-12-31',
options: { count, offset },
});
// Process response.data.transactions
offset += response.data.transactions.length;
hasMore = offset < response.data.total_transactions;
}
| Error Code | Cause | Solution |
|---|---|---|
INVALID_ACCESS_TOKEN | Token expired or invalid | Re-link the account |
ITEM_LOGIN_REQUIRED | Bank requires re-authentication | Use update mode Link |
INVALID_FIELD + "redirect_uri must use HTTPS" | Using redirect in dev/prod | Use popup mode or HTTPS |
PRODUCTS_NOT_SUPPORTED | Institution doesn't support product | Check institution capabilities |
references/code-examples.md - Complete implementation patternsreferences/api-reference.md - API endpoints and responsesThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.