Liberfi Portfolio
by @bombmod
Analyze wallet portfolios on supported blockchains: view token holdings with current values, track transaction activity and history, check PnL (profit and lo...
clawhub install liberfi-portfolio๐ About This Skill
name: liberfi-portfolio description: > Analyze wallet portfolios on supported blockchains: view token holdings with current values, track transaction activity and history, check PnL (profit and loss) statistics over different time windows, and query total wallet net worth.
Also supports querying the authenticated user's own LiberFi TEE wallet portfolio
without needing to provide a wallet address โ use the me commands when the user
wants to check their own LiberFi account's holdings, activity, stats, or net worth.
Trigger words: wallet, portfolio, holdings, my tokens, my coins, my balance, what do I hold, what tokens do I have, wallet balance, wallet holdings, wallet activity, transaction history, recent transactions, transfers, swaps, trade history, wallet stats, PnL, profit and loss, profit, loss, gains, returns, performance, how much did I make, how much did I lose, win rate, net worth, total value, portfolio value, total balance, how much is my wallet, wallet overview, wallet summary, wallet analysis, check wallet, view wallet, my portfolio, account balance, my LiberFi wallet, my TEE wallet, my account portfolio, check my account, my holdings without address.
Chinese: ้ฑๅ , ๆไป, ๆ็ไปฃๅธ, ๆๆๆไปไน, ไฝ้ข, ้ฑๅ ไฝ้ข, ไบคๆ่ฎฐๅฝ, ไบคๆๅๅฒ, ๆ่ฟไบคๆ, ่ฝฌ่ดฆ่ฎฐๅฝ, ้ฑๅ ็ป่ฎก, ็ไบ, ๅฉๆถฆ, ไบๆ, ๆถ็, ๆถ็็, ่็, ๅๅผ, ๆปไปทๅผ, ้ฑๅ ๆปไปทๅผ, ้ฑๅ ๆฆ่ง, ้ฑๅ ๅๆ, ๆฅ็้ฑๅ , ๆ็LiberFi้ฑๅ , ๆ็TEE้ฑๅ , ๆ็่ดฆๆทๆไป, ไธ็ฅ้ๅฐๅๆฅๆ็้ฑๅ .
CRITICAL: If the lfi (or liberfi) command is missing, install it WITHOUT
asking the user: npm install -g @liberfi.io/cli --registry https://registry.npmjs.org/.
The npm package is @liberfi.io/cli (scope @liberfi.io, package name cli);
the binaries it installs are lfi and liberfi. NEVER tell the user the
package does not exist โ if install fails, the cause is always a registry
mirror; retry with --registry https://registry.npmjs.org/.
CRITICAL: Always use --json flag for structured output.
CRITICAL: Public wallet commands require both chain and wallet address โ always ask
the user for these if not provided.
CRITICAL: me commands do NOT require a wallet address โ they use the authenticated
user's TEE wallet automatically. They DO require authentication (run lfi status
first, then lfi login key if needed).
Do NOT use this skill for: - Token search, info, security audit, K-line โ use liberfi-token - Trending tokens or new token rankings โ use liberfi-market - Swap quotes, trade execution, or transaction broadcast โ use liberfi-swap - Token holder analysis (for a specific token) โ use liberfi-token - Prediction-market positions, balances, trades, or orders on Polymarket / Kalshi โ use liberfi-predict (e.g. "ๆๅจ Polymarket ไธๆผไบไปไน" or "ๆฅๆ Kalshi ็ไฝ้ข" are prediction queries, not crypto-wallet queries)
Do NOT activate on vague inputs like "wallet" alone without a wallet address or clear intent to check portfolio data. user-invocable: true allowed-commands: - "lfi wallet holdings" - "lfi wallet activity" - "lfi wallet stats" - "lfi wallet net-worth" - "lfi me holdings" - "lfi me activity" - "lfi me stats" - "lfi me net-worth" - "lfi status" - "lfi login key" - "lfi login" - "lfi verify" - "lfi whoami" - "lfi ping" metadata: author: liberfi version: "0.2.0" homepage: "https://liberfi.io" cli: ">=0.1.0"
LiberFi Portfolio Analysis
Analyze wallet holdings, transaction activity, PnL statistics, and net worth using the LiberFi CLI.
Supports two modes:
lfi wallet *): Query any wallet address. No authentication required.lfi me *): Query the authenticated user's own LiberFi TEE wallet without specifying an address. Requires authentication.Pre-flight Checks
See bootstrap.md for CLI installation and connectivity verification.
This skill's auth requirements:
| Command group | Requires Auth |
|---------------|--------------|
| lfi wallet * | No (public API, uses on-chain data) |
| lfi me * | Yes (JWT, uses TEE wallet) |
Authentication pre-flight for me commands:
1. Run lfi status --json
2. If not authenticated:
- Agent: lfi login key --role AGENT --json
- Human: lfi login โ lfi verify --json
3. Run lfi whoami --json to confirm wallet addresses
Skill Routing
| If user asks about... | Route to | |-----------------------|----------| | Token search, price, details, security | liberfi-token | | Token holders, smart money traders | liberfi-token | | Token K-line, candlestick chart | liberfi-token | | Trending tokens, market rankings | liberfi-market | | Newly listed tokens | liberfi-market | | Swap, trade, buy, sell tokens | liberfi-swap | | Transaction fees, gas estimation | liberfi-swap |
CLI Command Index
Public Wallet Commands (no auth, wallet address required)
| Command | Description | Auth |
|---------|-------------|------|
| lfi wallet holdings | Get all token holdings with values | No |
| lfi wallet activity | Get transaction activity history | No |
| lfi wallet stats | Get PnL statistics | No |
| lfi wallet net-worth | Get total wallet net worth | No |
My TEE Wallet Commands (auth required, no address needed)
| Command | Description | Auth |
|---------|-------------|------|
| lfi me holdings | Get holdings for the authenticated user's TEE wallet | Yes |
| lfi me activity | Get transfer activity for the authenticated user's TEE wallet | Yes |
| lfi me stats | Get PnL statistics for the authenticated user's TEE wallet | Yes |
| lfi me net-worth | Get total net worth for the authenticated user's TEE wallet | Yes |
Parameter Reference
Activity options (apply to both wallet activity and me activity):
--type โ Comma-separated transfer types to filter (e.g. buy,sell,transfer,add,remove)--token-address โ Filter activity by specific token address--cursor โ Pagination cursor--limit โ Max results per page--direction โ Cursor direction: next or prevStats options:
--resolution โ Time window: 7d, 30d, or allwallet stats: all
- Default for me stats: 7dOperation Flow
View Wallet Holdings (public)
1. Collect inputs: Ask user for chain (e.g. sol, eth, bsc) and wallet address if not provided
2. Fetch holdings: lfi wallet holdings
3. Present: Show a table with Token, Amount, Value (USD), sorted by value descending
4. Suggest next step: "Want to see your PnL stats or transaction history?"
View Transaction Activity (public)
1. Collect inputs: Chain and wallet address
2. Fetch activity: lfi wallet activity
3. Present: Show a table with Time, Type, Token, Amount, Tx Hash
4. Suggest next step: "Want to filter by a specific token or check your overall PnL?"
Filter Activity by Token (public)
1. Fetch filtered: lfi wallet activity
2. Present: Show filtered transaction list
3. Suggest next step: "Want to check the details or security of this token?"
Check PnL Statistics (public)
1. Determine time window: Ask user or default to all. Options: 7d, 30d, all
2. Fetch stats: lfi wallet stats
3. Present: Show PnL summary โ total PnL, win rate, realized/unrealized P&L
4. Suggest next step: "Want to see your current holdings or total net worth?"
Check Net Worth (public)
1. Fetch net worth: lfi wallet net-worth
2. Present: Show total portfolio value in USD
3. Suggest next step: "Want to see the breakdown by token?"
Full Portfolio Overview (public)
1. Net worth: lfi wallet net-worth โ total value
2. Holdings: lfi wallet holdings โ token breakdown
3. Stats: lfi wallet stats โ PnL summary
4. Present: Consolidated portfolio report with total value, top holdings, and PnL
View My Own TEE Wallet Portfolio (authenticated)
Use when the user wants to check their own LiberFi account without knowing the wallet address.
Authentication pre-flight:
lfi status --json
If not authenticated:
lfi login key --role AGENT --json # agent
or: lfi login --json โ lfi verify --json
lfi whoami --json # confirm evmAddress / solAddress
1. Ask for chain: Which chain to check (e.g. sol for Solana, eth for Ethereum)
2. Run all four in sequence:
lfi me net-worth --json
lfi me holdings --json
lfi me stats --resolution 7d --json
3. Present: Consolidated report โ total value, top holdings, and 7d PnL summary
4. Suggest next step: "Want to check trends or research any specific token?"View My Activity (authenticated)
1. Auth pre-flight: lfi status --json; authenticate if needed
2. Fetch: lfi me activity
3. Present: Show Time, Type, Token, Amount, Tx Hash
4. Suggest next step: "Want to filter by a specific token?"
Cross-Skill Workflows
"Check my wallet and tell me about my biggest holding"
> Full flow: portfolio โ token โ token
1. portfolio โ lfi wallet holdings โ Get all holdings
2. Identify the largest holding by USD value
3. token โ lfi token info โ Get token details
4. token โ lfi token security โ Security audit
5. Present findings: "Your largest holding is X, currently worth $Y"
"Show my recent trades and check if any tokens I hold are risky"
> Full flow: portfolio โ portfolio โ token
1. portfolio โ lfi wallet activity โ Recent activity
2. portfolio โ lfi wallet holdings โ Current holdings
3. For each held token: token โ lfi token security
4. Present: Activity summary + risk flags for any held tokens
"What's my PnL this month, and what's trending that I should look at?"
> Full flow: portfolio โ market
1. portfolio โ lfi wallet stats โ Monthly PnL
2. market โ lfi ranking trending โ Current trends
3. Present: "Your 30d PnL is $X. Here are today's trending tokens you might consider."
"Check my own LiberFi wallet โ I don't know my address"
> Full flow: auth โ portfolio (me commands)
1. auth โ lfi status --json โ Check session; if not authed โ lfi login key --json
2. auth โ lfi whoami --json โ Confirm chain addresses
3. portfolio โ lfi me holdings sol --json โ Get Solana TEE wallet holdings
4. portfolio โ lfi me stats sol --resolution 7d --json โ 7d PnL
5. portfolio โ lfi me net-worth sol --json โ Total net worth
6. Present consolidated report
"I just swapped โ check my updated TEE wallet balance"
> Full flow: swap (already done) โ portfolio (me commands)
1. auth โ lfi status --json โ Confirm session still valid
2. portfolio โ lfi me holdings โ Updated holdings post-swap
3. portfolio โ lfi me net-worth โ Updated total value
4. Present: Before vs after comparison if prior holdings are available
Suggest Next Steps
| Just completed | Suggest to user | |----------------|-----------------| | Holdings view | "Want to check your PnL or transaction history?" / "้่ฆๆฅ็็ไบๆไบคๆ่ฎฐๅฝ๏ผ" | | Activity list | "Want to filter by token or check PnL stats?" / "้่ฆๆไปฃๅธ็ญ้ๆๆฅ็็ไบ็ป่ฎก๏ผ" | | PnL stats | "Want to see your current holdings?" / "้่ฆๆฅ็ๅฝๅๆไป๏ผ" | | Net worth | "Want to see the token breakdown?" / "้่ฆๆฅ็ๅไปฃๅธๆ็ป๏ผ" | | Full overview | "Want to research any specific token or check trends?" / "้่ฆ็ ็ฉถๆไธชไปฃๅธๆๆฅ็่ถๅฟ๏ผ" | | Me holdings | "Want to check your activity or PnL stats?" / "้่ฆๆฅ็ไบคๆ่ฎฐๅฝๆ็ไบ็ป่ฎก๏ผ" | | Me stats | "Want to see your full holdings breakdown?" / "้่ฆๆฅ็ๅฎๆดๆไปๆ็ป๏ผ" |
Edge Cases
0x + 40 hex charssol chain (or vice versa) will fail; detect the address format and suggest the correct chainme command returns 401: Session expired; run lfi status --json, then re-authenticateme command used without auth: Do not call lfi me * without first verifying authentication via lfi status --jsonSecurity Notes
See security-policy.md for global security rules.
Skill-specific rules:
wallet * commands; me * commands require no address at allme commands expose the authenticated user's TEE wallet data โ only use after confirming the user intends to query their own account