/fondo-pack:fondo-sdk-patternsfrom fondo-pack
Build internal tools that consume Fondo financial data exports with typed parsers, QuickBooks integration, and financial modeling patterns. Trigger: "fondo data patterns", "fondo integration", "fondo QuickBooks sync".
Ships in fondo-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Production-ready patterns for integrating with Fondo tax and accounting data. Fondo is a managed bookkeeping platform that syncs through QuickBooks Online and payroll providers. Integration uses the FONDO_API_KEY-authenticated REST endpoints for exports, the QuickBooks Online API for GL data, and structured CSV parsing with Zod validation for bulk imports.
const FONDO_BASE = 'https://api.fondo.com/v1';
let _client: FondoClient | null = null;
export function getClient(): FondoClient {
if (!_client) {
const apiKey = process.env.FONDO_API_KEY;
if (!apiKey) throw new Error('FONDO_API_KEY must be set — get it from your Fondo dashboard');
_client = new FondoClient(apiKey);
}
return _client;
}
class FondoClient {
private headers: Record<string, string>;
constructor(apiKey: string) { this.headers = { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }; }
async getTransactions(start: string, end: string): Promise<FondoTransaction[]> {
const res = await fetch(`${FONDO_BASE}/transactions?start=${start}&end=${end}`, { headers: this.headers });
if (!res.ok) throw new FondoError(res.status, await res.text()); return res.json();
}
async getAccounts(): Promise<FondoAccount[]> {
const res = await fetch(`${FONDO_BASE}/accounts`, { headers: this.headers });
if (!res.ok) throw new FondoError(res.status, await res.text()); return res.json();
}
}
export class FondoError extends Error {
constructor(public status: number, message: string) { super(message); this.name = 'FondoError'; }
}
export async function safeCall<T>(operation: string, fn: () => Promise<T>): Promise<T> {
try { return await fn(); }
catch (err: any) {
if (err instanceof FondoError && err.status === 429) { await new Promise(r => setTimeout(r, 5000)); return fn(); }
if (err instanceof FondoError && err.status === 401) throw new FondoError(401, 'Invalid FONDO_API_KEY');
throw new FondoError(err.status ?? 0, `${operation} failed: ${err.message}`);
}
}
class FondoQuery {
private params: Record<string, string> = {};
dateRange(start: string, end: string) { this.params.start = start; this.params.end = end; return this; }
category(cat: string) { this.params.category = cat; return this; }
accountId(id: string) { this.params.account_id = id; return this; }
rndOnly() { this.params.is_rnd = 'true'; return this; }
limit(n: number) { this.params.limit = String(n); return this; }
build() { return new URLSearchParams(this.params).toString(); }
}
// Usage: new FondoQuery().dateRange('2025-01-01','2025-03-31').rndOnly().build();
interface FondoTransaction {
id: string; date: string; description: string; amount: number;
category: string; account: string; is_rnd: boolean; vendor: string;
}
interface FondoAccount {
id: string; name: string; type: 'asset' | 'liability' | 'equity' | 'revenue' | 'expense';
balance: number; currency: string;
}
interface FondoReport {
id: string; period: string; type: 'trial_balance' | 'profit_loss' | 'balance_sheet';
generated_at: string; rows: Array<{ account: string; debit: number; credit: number }>;
}
interface FondoRnDCredit {
tax_year: number; qualifying_expenses: number; credit_amount: number;
status: 'draft' | 'filed' | 'approved';
}
export function mockTransaction(overrides: Partial<FondoTransaction> = {}): FondoTransaction {
return { id: 'txn-001', date: '2025-03-15', description: 'AWS hosting',
amount: 450.00, category: 'Cloud Infrastructure', account: 'Operating Expenses',
is_rnd: true, vendor: 'Amazon Web Services', ...overrides };
}
export function mockAccount(overrides: Partial<FondoAccount> = {}): FondoAccount {
return { id: 'acct-001', name: 'Operating Expenses', type: 'expense',
balance: 12500.00, currency: 'USD', ...overrides };
}
| Pattern | When to Use | Example |
|---|---|---|
safeCall wrapper | All Fondo API calls | Structured error logging with operation context |
| Retry on 429 | Bulk transaction exports | 5s backoff before retry |
| Zod validation | CSV import parsing | Reject malformed rows before DB insert |
| Auth validation | Client init | Fail fast on missing FONDO_API_KEY |
Apply patterns in fondo-core-workflow-a.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
18 skills in this plugin
/fondo-ci-integrationAutomate financial reporting workflows that complement Fondo with CI/CD
pipelines for expense tracking, budget alerts, and financial data validation.
Trigger: "fondo CI", "fondo automation", "fondo financial alerts".
/fondo-common-errorsDiagnose and fix common Fondo issues including integration sync failures,
categorization errors, and R&D credit qualification problems.
Trigger: "fondo error", "fondo sync issue", "fondo not syncing", "fondo problem".
/fondo-core-workflow-aExecute Fondo primary workflow: monthly bookkeeping close and financial reporting.
Use when managing month-end close, reviewing financial statements,
or preparing for board meetings and fundraising.
Trigger: "fondo bookkeeping", "fondo month close", "fondo financial reports".
/fondo-core-workflow-bExecute Fondo R&D tax credit workflow: qualify activities, calculate credits,
file Form 6765, and claim payroll tax offset for startups.
Trigger: "fondo R&D credit", "fondo tax credit", "fondo Form 6765", "startup tax credit".
/fondo-cost-tuningOptimize Fondo costs by maximizing R&D tax credits, choosing the right plan,
and reducing unnecessary bookkeeping complexity.
Trigger: "fondo costs", "fondo pricing", "maximize R&D credit", "fondo ROI".
/fondo-debug-bundleCollect diagnostic information for Fondo support including integration status,
transaction discrepancies, and financial data reconciliation issues.
Trigger: "fondo debug", "fondo support", "fondo diagnostic", "fondo reconciliation".
npx claudepluginhub flight505/skill-forge --plugin fondo-pack