원클릭으로
sync
Sync all financial institutions — balances, transactions, MFA handling, import, classify
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Sync all financial institutions — balances, transactions, MFA handling, import, classify
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | sync |
| description | Sync all financial institutions — balances, transactions, MFA handling, import, classify |
| trigger | manual |
When the user says "sync", "update my accounts", "refresh", or "sync my finances" — run the full sync pipeline.
NEVER run sync-all.js as a foreground Bash command. A foreground command blocks the agent from reading messages. MFA codes from the user will sit unprocessed, bank sessions will time out, and the entire sync will fail. This has happened before — do not repeat it.
Notify user immediately: "Starting sync for all accounts..."
Start sync in background with run_in_background: true:
node readers/sync-all.js --import --classify
Flags:
--balances — balances only (faster)--bank <name> — single institution only--import — import JSON → SQLite after sync--classify — classify transactions after importImmediately begin MFA monitoring loop — do NOT wait for sync to finish:
Loop every 3-5 seconds until background task completes:
a. Run: ls data/mfa-pending/*.request.json (check for MFA requests)
b. If request files exist → read each one, build list of banks needing codes
c. Notify user: "MFA codes needed: [bank1], [bank2], ..."
d. Wait for user's reply
e. Parse codes and submit ALL in parallel (see parsing rules below)
f. Also check: ls data/adaptive-pending/*.json (visual help requests)
g. Check if background task completed (TaskOutput)
When sync completes, run the extraction step (see below), then report summary to user.
After the sync background task finishes, the agent handles LLM extraction. The sync scripts capture raw text — the agent extracts structured data from it.
Read each data/sync-output/*.json file. For any file with a pendingExtraction field:
Balance extraction (pendingExtraction.balanceText):
config/accounts.json for known accounts (last-4 digits, aliases, types)balances array in the output JSONpendingExtraction.balanceText fieldPDF transaction extraction (pendingExtraction.pdfTexts):
$99.00 (positive), write 99.00. If it shows a payment as -$753.56, write -753.56. Sign normalization is handled by import.js using config/data-semantics.json — the LLM's job is extraction only.($8.38) → -8.38. $753.56 CR → -753.56.transactions array in the output JSONstatementBalances array in the output JSON: { accountId, periodStart, periodEnd, openingBalance, closingBalance, source: 'pdf' }statement_balances table (dedup on institution + account_id + period_end)pendingExtraction.pdfTexts fieldStatement balance extraction (pendingExtraction.statementPdfs):
statementBalances array in the output JSON: { accountId, periodStart, periodEnd, openingBalance, closingBalance, source: 'pdf' }pendingExtraction.statementPdfs fieldReal estate extraction (pendingExtraction.pageTexts + pendingExtraction.address):
balances array as: accountId "home-residence", accountType "real_estate", balance = average valuependingExtraction fieldAfter all extractions, remove the pendingExtraction field from each output file. Then run import + classify:
node sync-engine/import.js
node sync-engine/classify.js
Import automatically validates transaction signs against known anchors in config/data-semantics.json. If validation warnings appear (e.g., "TARGET is a debit but has positive amount"), the data semantics for that institution may need updating — check config/data-semantics.json and verify the platform hasn't changed its sign convention.
Users provide codes in flexible formats:
BankA 123456, BankB 7654321banka: 123456 bankb: 7654321123456 7654321 (in order of request)Map institution names flexibly — see config/institutions-status.md for the name mapping table.
Submit via:
node -e "require('./readers/mfa-bridge').submitCode('<institution>', '<code>')"
Submit ALL codes in parallel — do NOT wait between submissions. Bank sessions time out.
When the browser primitive encounters an unknown page state, it writes a help request to data/adaptive-pending/. The request includes an annotated screenshot and page URL.
When a task (balances or transactions) fails during execution, the graduated recovery system may write a type: 'task-error' request to data/adaptive-pending/. This is distinct from type: 'unknown-state' requests (login-phase).
The request includes:
task — which task failed (balances or transactions)step — where in the task it failed (e.g., extract-dashboard-text, download-transactions)failedSelector — the Playwright selector that timed out (if applicable)error.category — classification: timeout, selector-not-found, navigation, maintenance, session-expired, unknownpage.url — current page URLpage.textSnippet — first 2000 chars of visible page textscreenshot — path to annotated screenshotelements — interactive elements on the pageTo respond, submit instructions the same way as unknown-state requests:
node -e "require('./readers/adaptive-bridge').submitInstruction('<institution>', { actions: [...] })"
Actions can include: click (with selector), type (with selector + text), evaluate (with code), navigate (with url), wait (with ms), key (with key).
The recovery system has a 60s timeout for Level 3 adaptive requests (vs 300s for login adaptive). If no instruction arrives, it skips the task, preserves partial data, and sends a Telegram notification.
The sync script sends its own notification via the bot API when MFA is detected. This is a backup — the agent MUST still poll the bridge directory, because the script notification may fail silently.
syncedAt and previousSyncedAt for staleness trackingAfter sync completes, report:
SYNC COMPLETE
Institution Status Balances Transactions Time
─────────────────────────────────────────────────────────
BankA ✓ 4 12 45s
BankB ✓ 2 8 38s
BankC ✓ 1 5 52s
BankD ✓ (API) 2 15 2s
BankE ✗ MFA timeout —
...
Imported: 24 balances, 40 transactions → SQLite
Classified: 35 new transactions categorized
⚠ BankE: MFA code not received within timeout
✓ All other institutions synced successfully
node readers/sync-all.js --import --classify # full pipeline
node readers/sync-all.js # sync only (JSON staging)
node readers/sync-all.js --balances # balances only (faster)
node sync-engine/import.js # import JSON → SQLite (independent)
node sync-engine/classify.js # classify transactions (independent)
node sync-engine/classify.js --stats # classification breakdown
node readers/run.js <bank> --balances # single bank balances
node readers/run.js <bank> --transactions # single bank transactions
Daily financial summary — net worth, recent activity, payment due dates, alerts
Manage recurring scheduled tasks — add, list, pause, resume, remove
Build a custom dashboard view from a natural language request — query, API, React component, build, deploy
On-demand financial briefing — spending, balances, portfolio, transactions, reports, CSV export
Override transaction categories via natural language — update rules, reclassify
Guided first-bank setup — credentials, exploration, sync, extraction, import