generic-balance-checker
星标1
分支0
更新时间2026年1月17日 07:09
Check balances from Singapore financial institutions using browser automation.
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
文件资源管理器
6 个文件SKILL.md
readonly菜单
Check balances from Singapore financial institutions using browser automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | generic-balance-checker |
| description | Check balances from Singapore financial institutions using browser automation. |
| compatibility | Requires bun runtime, and agent-browser npm package. |
Extract balances and transaction data from Singapore financial websites via browser automation.
Ensure you have the following installed:
curl -fsSL https://bun.sh/install | bash)npm install -g agent-browser)agent-browser install)history folder for latest information and trouble shooting tips# 1. Open financial site (see references/supported-websites.md for URLs)
npx agent-browser open https://app.sg.endowus.com/ --headed
# 2. USER LOGS IN MANUALLY (Singpass, 2FA, etc.)
# Wait for user confirmation before proceeding
# 3. Navigate to portfolio/accounts
npx agent-browser snapshot -i
npx agent-browser find text "Portfolio" click
npx agent-browser wait 2000
# 4. Extract data
npx agent-browser snapshot -c
npx agent-browser eval "document.body.innerText" --json
# 5. Close when done
npx agent-browser close
| Action | Command |
|---|---|
| Open browser (visible) | npx agent-browser open <url> --headed |
| Get interactive elements | npx agent-browser snapshot -i |
| Get full page data | npx agent-browser snapshot -c |
| Click by ref | npx agent-browser click @e5 |
| Click by text | npx agent-browser find text "X" click |
| Click by role | npx agent-browser find role button click --name "Submit" |
| Wait for time | npx agent-browser wait 2000 |
| Wait for URL | npx agent-browser wait --url "**/dashboard**" |
| Run JavaScript | npx agent-browser eval "..." |
| Get JSON output | npx agent-browser eval "..." --json |
| Scroll page | npx agent-browser scroll down 500 |
| Take screenshot | npx agent-browser screenshot output.png |
| Close browser | npx agent-browser close |
CRITICAL Security Rules:
--headed flag so user can see and interactnpx agent-browser wait --url "**/dashboard**"| Data Point | Common Patterns |
|---|---|
| Total Value | "Total", "Portfolio Value", "Net Worth", "Balance" |
| Cash Balance | "Cash", "Available", "Uninvested", "Buying Power" |
| Returns | "Return", "P&L", "Gain/Loss", "Performance" |
| Currency | SGD, USD, multi-currency balances |
| Field | Common Labels |
|---|---|
| Date | "Date", "Transaction Date", "Trade Date" |
| Type | Buy, Sell, Deposit, Withdrawal, Dividend, Fee, Transfer |
| Amount | "Amount", "Value", "Quantity" |
| Status | Completed, Pending, Processing, Failed, Cancelled |
npx agent-browser eval "Array.from(document.querySelectorAll('table')[1].querySelectorAll('tbody tr')).map(row => { const cells = row.querySelectorAll('td'); return cells.length >= 4 ? [cells[0].innerText.trim(), cells[1].innerText.replace(/\\n/g, ' ').trim(), cells[2].innerText.trim(), cells[3].innerText.trim()].join(' | ') : null; }).filter(x => x && !x.includes('Load more')).join('\\n')"
# Load all transactions
for i in {1..15}; do
npx agent-browser find text "Load more" click 2>/dev/null || break
npx agent-browser wait 800
done
# Verify all loaded (should show "1-194 of 194")
npx agent-browser eval "document.body.innerText.match(/\\d+-\\d+ of \\d+/)?.[0]"
--headed mode for financial sites| Issue | Solution |
|---|---|
| Timeout on network idle | Proceed with snapshot anyway |
| Multiple table selector conflict | Use snapshot -c instead of -s "table" |
| Element not found | Use 2>/dev/null to suppress errors in loops |
| Empty snapshot content | See references/when-snapshot-returns-empty.md |
Before completing extraction:
--headed flagnpx agent-browser closeReusable shell scripts in scripts/ for common automation tasks.
| Script | When to Use | Usage |
|---|---|---|
detect-frames.sh | When snapshot returns empty or minimal content (DBS, OCBC legacy sites use framesets) | ./scripts/detect-frames.sh |
extract-balances.sh | Quick extraction of SGD amounts and currency patterns from current page | ./scripts/extract-balances.sh |
load-all-transactions.sh | When transaction list has "Load more" pagination | ./scripts/load-all-transactions.sh [max_clicks] |
history folder within the skills directory.dbs.md)references/supported-websites.md - Full list of institutions and login URLsreferences/when-snapshot-returns-empty.md - For DBS/OCBC legacy iframe sites