Skills liberfi-portfolio
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/bombmod/liberfi-portfolio" ~/.claude/skills/openclaw-skills-liberfi-portfolio && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/bombmod/liberfi-portfolio" ~/.openclaw/skills/openclaw-skills-liberfi-portfolio && rm -rf "$T"
manifest:
skills/bombmod/liberfi-portfolio/SKILL.mdsource content
LiberFi Portfolio Analysis
Analyze wallet holdings, transaction activity, PnL statistics, and net worth using the LiberFi CLI.
Supports two modes:
- Public wallet (
): Query any wallet address. No authentication required.lfi wallet * - My TEE wallet (
): Query the authenticated user's own LiberFi TEE wallet without specifying an address. Requires authentication.lfi me *
Pre-flight Checks
See bootstrap.md for CLI installation and connectivity verification.
This skill's auth requirements:
| Command group | Requires Auth |
|---|---|
| No (public API, uses on-chain data) |
| Yes (JWT, uses TEE wallet) |
Authentication pre-flight for
commands:me
- Run
lfi status --json - If not authenticated:
- Agent:
lfi login key --role AGENT --json - Human:
→lfi login <email> --jsonlfi verify <otpId> <code> --json
- Agent:
- Run
to confirm wallet addresseslfi whoami --json
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 |
|---|---|---|
| Get all token holdings with values | No |
| Get transaction activity history | No |
| Get PnL statistics | No |
| Get total wallet net worth | No |
My TEE Wallet Commands (auth required, no address needed)
| Command | Description | Auth |
|---|---|---|
| Get holdings for the authenticated user's TEE wallet | Yes |
| Get transfer activity for the authenticated user's TEE wallet | Yes |
| Get PnL statistics for the authenticated user's TEE wallet | Yes |
| Get total net worth for the authenticated user's TEE wallet | Yes |
Parameter Reference
Activity options (apply to both
wallet activity and me activity):
— Comma-separated transfer types to filter (e.g.--type <type>
)buy,sell,transfer,add,remove
— Filter activity by specific token address--token-address <address>
— Pagination cursor--cursor <cursor>
— Max results per page--limit <limit>
— Cursor direction:--direction <direction>
ornextprev
Stats options:
— Time window:--resolution <resolution>
,7d
, or30dall- Default for
:wallet statsall - Default for
:me stats7d
- Default for
Operation Flow
View Wallet Holdings (public)
- Collect inputs: Ask user for chain (e.g.
,sol
,eth
) and wallet address if not providedbsc - Fetch holdings:
lfi wallet holdings <chain> <address> --json - Present: Show a table with Token, Amount, Value (USD), sorted by value descending
- Suggest next step: "Want to see your PnL stats or transaction history?"
View Transaction Activity (public)
- Collect inputs: Chain and wallet address
- Fetch activity:
lfi wallet activity <chain> <address> --limit 20 --json - Present: Show a table with Time, Type, Token, Amount, Tx Hash
- Suggest next step: "Want to filter by a specific token or check your overall PnL?"
Filter Activity by Token (public)
- Fetch filtered:
lfi wallet activity <chain> <address> --token-address <tokenAddress> --limit 20 --json - Present: Show filtered transaction list
- Suggest next step: "Want to check the details or security of this token?"
Check PnL Statistics (public)
- Determine time window: Ask user or default to
. Options:all
,7d
,30dall - Fetch stats:
lfi wallet stats <chain> <address> --resolution <window> --json - Present: Show PnL summary — total PnL, win rate, realized/unrealized P&L
- Suggest next step: "Want to see your current holdings or total net worth?"
Check Net Worth (public)
- Fetch net worth:
lfi wallet net-worth <chain> <address> --json - Present: Show total portfolio value in USD
- Suggest next step: "Want to see the breakdown by token?"
Full Portfolio Overview (public)
- Net worth:
→ total valuelfi wallet net-worth <chain> <address> --json - Holdings:
→ token breakdownlfi wallet holdings <chain> <address> --json - Stats:
→ PnL summarylfi wallet stats <chain> <address> --json - 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 <email> --json → lfi verify <otpId> <code> --json lfi whoami --json # confirm evmAddress / solAddress
- Ask for chain: Which chain to check (e.g.
for Solana,sol
for Ethereum)eth - Run all four in sequence:
lfi me net-worth <chain> --json lfi me holdings <chain> --json lfi me stats <chain> --resolution 7d --json - Present: Consolidated report — total value, top holdings, and 7d PnL summary
- Suggest next step: "Want to check trends or research any specific token?"
View My Activity (authenticated)
- Auth pre-flight:
; authenticate if neededlfi status --json - Fetch:
lfi me activity <chain> --limit 20 --json - Present: Show Time, Type, Token, Amount, Tx Hash
- 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
- portfolio →
— Get all holdingslfi wallet holdings <chain> <address> --json - Identify the largest holding by USD value
- token →
— Get token detailslfi token info <chain> <tokenAddress> --json - token →
— Security auditlfi token security <chain> <tokenAddress> --json - 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
- portfolio →
— Recent activitylfi wallet activity <chain> <address> --limit 10 --json - portfolio →
— Current holdingslfi wallet holdings <chain> <address> --json - For each held token: token →
lfi token security <chain> <tokenAddress> --json - 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
- portfolio →
— Monthly PnLlfi wallet stats <chain> <address> --resolution 30d --json - market →
— Current trendslfi ranking trending <chain> 24h --limit 10 --json - 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)
- auth →
— Check session; if not authed →lfi status --jsonlfi login key --json - auth →
— Confirm chain addresseslfi whoami --json - portfolio →
— Get Solana TEE wallet holdingslfi me holdings sol --json - portfolio →
— 7d PnLlfi me stats sol --resolution 7d --json - portfolio →
— Total net worthlfi me net-worth sol --json - Present consolidated report
"I just swapped — check my updated TEE wallet balance"
Full flow: swap (already done) → portfolio (me commands)
- auth →
— Confirm session still validlfi status --json - portfolio →
— Updated holdings post-swaplfi me holdings <chain> --json - portfolio →
— Updated total valuelfi me net-worth <chain> --json - 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
- Invalid wallet address: If the API returns 400/404, ask the user to verify the address format. Solana addresses are base58 (32–44 chars), EVM addresses are
+ 40 hex chars0x - Wallet not found / Empty wallet: Inform user: "This wallet has no token holdings on this chain. Verify the address and chain are correct."
- No activity: Inform user: "No recent activity found for this wallet on this chain."
- Network timeout: Retry once after 3 seconds; if still fails, suggest checking connectivity
- Wrong chain for address: EVM addresses used with
chain (or vice versa) will fail; detect the address format and suggest the correct chainsol - Large number of holdings: Default to top 20 by value; inform user if more exist and offer pagination
command returns 401: Session expired; runme
, then re-authenticatelfi status --json
command used without auth: Do not callme
without first verifying authentication vialfi me *lfi status --json
Security Notes
See security-policy.md for global security rules.
Skill-specific rules:
- Public wallet data is public on-chain information — no privacy concern in querying any address
- Never ask for or accept private keys or seed phrases — only public wallet addresses are needed for
commands;wallet *
commands require no address at allme * - When displaying wallet addresses provided by the user, confirm the address before querying to avoid mistakes
- PnL data is historical and may not reflect real-time values — note this when presenting stats
commands expose the authenticated user's TEE wallet data — only use after confirming the user intends to query their own accountme