skills/plaid-integration/SKILL.md
This skill should be used when the user wants to 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.
npx skillsauth add b-open-io/prompts plaid-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integrate 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,
}
}
}));
Omit redirect_uri to use popup mode — required for local HTTP development:
const response = await plaidClient.linkTokenCreate({
user: { client_user_id: `user-${Date.now()}` },
client_name: 'My App',
products: ['transactions'],
country_codes: ['US'],
language: 'en',
// No redirect_uri = popup mode, works with HTTP localhost
});
const linkToken = response.data.link_token;
After the user completes Link, exchange the temporary public_token for a permanent access_token:
const response = await plaidClient.itemPublicTokenExchange({ public_token });
const { access_token, item_id } = response.data;
// Store access_token securely — never expose to clients
Plaid returns a maximum of 500 transactions per request. Always paginate:
let offset = 0;
const count = 500;
while (true) {
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;
if (offset >= response.data.total_transactions) break;
}
For ongoing incremental updates, prefer transactionsSync with a cursor — see references/api-reference.md.
Catch Plaid errors from error.response?.data:
try {
await plaidClient.transactionsGet({ ... });
} catch (error: any) {
const plaidError = error.response?.data;
if (!plaidError) throw error;
switch (plaidError.error_code) {
case 'ITEM_LOGIN_REQUIRED':
// Re-initialize Link in update mode
break;
case 'INVALID_ACCESS_TOKEN':
// Token revoked — delete item, prompt re-link
break;
case 'PRODUCT_NOT_READY':
// Data still processing — retry after delay
break;
default:
throw new Error(`Plaid error: ${plaidError.error_code} — ${plaidError.error_message}`);
}
}
Use Bun SQLite with items → accounts → transactions hierarchy. For the complete schema with indexes, prepared statements, and TypeScript types, see references/code-examples.md.
references/code-examples.md — Full working implementations: bank connection flow with Elysia server, transaction sync with pagination, complete Bun SQLite database module, CLI integrationreferences/api-reference.md — All API endpoints with request/response shapes, sandbox test credentials, webhook events, rate limitsdevelopment
This skill should be used when the user asks to "design a business card", "make a printable PDF", "render HTML to PDF", "generate a postcard", "build print collateral", "set up an HTML print pipeline", or needs help with bleed, safe areas, font embedding, or QR generation for print. Provides a Playwright-based pipeline with multiple bundled templates and theme variants for business cards (minimal, watercolor light, watercolor dark) and instructions for adding new templates.
tools
Get recent tweets from an X/Twitter user. Use when user asks "what has @username posted", "recent tweets from", "user's X posts", "show timeline for", "what is @user saying". Requires X_BEARER_TOKEN.
data-ai
Get X/Twitter user profile by username. Use when user asks "who is @username", "get X profile", "lookup Twitter user", "find X account", "user details", "follower count for". Requires X_BEARER_TOKEN.
data-ai
Search recent X/Twitter posts by query. Returns RAW TWEETS (last 7 days). Use when user asks "search X for", "find tweets about", "what are people saying about", "Twitter search", "raw tweets about". For AI summaries/sentiment, use x-research instead. Requires X_BEARER_TOKEN.