skills/data-sync/SKILL.md
> **OpenClaw skill context:** This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations. --- name: data-sync description: "Synchronize data with external accounting systems (QuickBooks, Xero) and bank feeds (Plaid). Use when importing/exporting financial data, syncing to accounting software, or updating from bank feeds. Handles bi-directional sync wi
npx skillsauth add alexi5000/clawkeeper skills/data-syncInstall 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.
OpenClaw skill context: This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations.
Synchronizes financial data between ClawKeeper and external systems (QuickBooks, Xero, Plaid) with proper data mapping, conflict resolution, and error handling.
// Map ClawKeeper invoice to QuickBooks invoice
function map_to_quickbooks(invoice: Invoice): QBInvoice {
return {
CustomerRef: { value: invoice.customer_id },
TxnDate: invoice.invoice_date,
DueDate: invoice.due_date,
Line: invoice.line_items.map(item => ({
Amount: cents_to_dollars(item.amount),
DetailType: 'SalesItemLineDetail',
SalesItemLineDetail: {
ItemRef: { value: item.product_id },
Qty: item.quantity,
UnitPrice: cents_to_dollars(item.unit_price),
},
})),
TotalAmt: cents_to_dollars(invoice.amount),
};
}
// Send to QuickBooks
const qb_invoice = await quickbooks.createInvoice(qb_data);
// Store mapping
await store_sync_mapping({
clawkeeper_id: invoice.id,
external_system: 'quickbooks',
external_id: qb_invoice.Id,
entity_type: 'invoice',
});
// Fetch invoices modified since last sync
const last_sync = await get_last_sync_time('quickbooks');
const qb_invoices = await quickbooks.query({
where: `MetaData.LastUpdatedTime > '${last_sync}'`,
type: 'Invoice',
});
// Map to ClawKeeper format
for (const qb_inv of qb_invoices) {
const invoice = map_from_quickbooks(qb_inv);
// Check if already exists
const mapping = await get_sync_mapping('quickbooks', qb_inv.Id);
if (mapping) {
// Update existing
await update_invoice(mapping.clawkeeper_id, invoice);
} else {
// Create new
const created = await create_invoice(invoice);
await store_sync_mapping({
clawkeeper_id: created.id,
external_system: 'quickbooks',
external_id: qb_inv.Id,
entity_type: 'invoice',
});
}
}
Similar pattern to QuickBooks:
// Fetch transactions
const plaid_client = new PlaidApi(config);
const transactions = await plaid_client.transactionsGet({
access_token: tenant.plaid_access_token,
start_date: '2026-01-01',
end_date: '2026-01-31',
});
// Import to ClawKeeper
for (const txn of transactions.transactions) {
// Check if already imported
const existing = await find_transaction_by_plaid_id(txn.transaction_id);
if (!existing) {
await create_transaction({
tenant_id: tenant.id,
account_id: account.id,
date: txn.date,
amount: dollars_to_cents(txn.amount),
description: txn.name,
category: map_plaid_category(txn.category),
plaid_transaction_id: txn.transaction_id,
});
}
}
When same entity modified in both systems:
Conflict detection:
if (clawkeeper_updated_at > external_updated_at && external_updated_at > last_sync_time) {
// Conflict! Both systems updated since last sync
flag_for_manual_review({
entity: 'invoice',
clawkeeper_version: ck_invoice,
external_version: qb_invoice,
conflict_type: 'concurrent_modification',
});
}
Store last sync timestamp per entity type:
CREATE TABLE sync_status (
tenant_id UUID,
external_system VARCHAR(50),
entity_type VARCHAR(50),
last_sync_time TIMESTAMPTZ,
status VARCHAR(50),
PRIMARY KEY (tenant_id, external_system, entity_type)
);
Only fetch records modified since last_sync_time.
| ClawKeeper Field | QuickBooks Field | Xero Field | |------------------|------------------|------------| | vendor_name | Vendor.DisplayName | Contact.Name | | invoice_date | TxnDate | Date | | amount | TotalAmt | Total | | line_items | Line[] | LineItems[] |
Store mappings in configuration per tenant (custom field mappings).
Invoke this skill for scheduled syncs or when user requests manual sync with external systems.
testing
> **OpenClaw skill context:** This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations. --- name: payment-gateway description: "Process payments via Stripe, PayPal, or ACH. Use when paying invoices, processing customer payments, or managing payment methods. Handles payment scheduling, execution, and confirmation with full audit trail." --- # Paymen
development
> **OpenClaw skill context:** This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations. --- name: invoice-processor description: "Parse, validate, and categorize invoices using OCR and LLM. Use when processing uploaded invoices, extracting invoice data, validating invoice fields, or categorizing expenses. Handles PDF, image, and scanned invoices wit
testing
> **OpenClaw skill context:** This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations. --- name: financial-reporting description: "Generate standard financial reports including P&L, balance sheet, and cash flow statements. Use when creating monthly/quarterly/annual reports, comparing periods, or exporting financial data. Supports GAAP and custom re
development
> **OpenClaw skill context:** This skill supports ClawKeeper v1.5 as an OpenClaw-native SMB finance-agent platform. Implementations should preserve tenant isolation, deterministic policy enforcement, and auditable financial operations. --- name: document-parser description: "OCR and parse documents including invoices, receipts, and bank statements. Use when extracting text from PDF/images, parsing scanned documents, or processing uploaded files. Supports Google Document AI and Tesseract OCR." -