fondo-sdk-patterns
БесплатноБез исполняемых скриптовНе проверенBuild internal tools that consume Fondo financial data exports with typed parsers, QuickBooks integration, and financial modeling patterns. Trigger: "fondo…
от jeremylongshore★ 2 961 звезда на GitHubОб этом скилле
Fondo SDK Patterns
Overview
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.
Prerequisites
- Scoped credentials, authorized source/destination mappings, synthetic fixtures, and a designated finance-data owner.
- Schema validation, idempotent import design, redacted diagnostics, and professional review for financial conclusions.
Instructions
- Validate source schema and field allowlists before parsing or forwarding data.
- Use opaque operation IDs, bounded retries, and reconciliation gates to prevent duplicate or partial imports.
- Quarantine unknown fields and mismatches for finance review rather than broadening data access.
Output
Produce a client-validation receipt with contract/fixture version, aggregate schema and reconciliation outcome, operation ID, owner, and redacted failure reference. Do not log transactions, accounts, tax/payroll data, or tokens.
Examples
Import a fictional aggregate ledger fixture into staging, repeat it under the same operation ID, and verify duplicate suppression. Introduce an unexpected field and confirm the parser blocks it for review without revealing record contents.
Singleton Client
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();
}
}
Error Wrapper
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}`);
}
}
Request Builder
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();
Response Types
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';
}
Testing Utilities
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: 'Ope
Установить fondo-sdk-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditFAQ
Что делает скилл fondo-sdk-patterns?
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".
Как установить скилл fondo-sdk-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fondo-sdk-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic