Communitygithub.com

錢包投資組合分析

分析EVM錢包的資產分佈,並識別高風險的協議曝險。

錢包投資組合分析 是什麼?

這項技能旨在分析EVM錢包的資產分佈,並評估其DeFi協議的風險。它透過Zerion API擷取錢包中的所有資產,包括原生幣、穩定幣、DeFi部位與其他代幣,並根據類別進行分組與計算佔比。隨後,針對每個DeFi協議,它會從DefiLlama獲取TVL、審計資訊與類別,並查詢rekt.news在過去90天內是否有安全事件。根據這些數據,它會計算一個風險分數,並將協議歸類為高、中、低三個風險等級。最終生成一份結構化的Markdown報告,內容涵蓋摘要、資產分佈、前十大持倉、DeFi曝險以及風險總結,幫助使用者快速掌握錢包狀態並識別高風險投資。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/majiayu000/claude-skill-registry/tree/HEAD/skills/analysis/pubfi-wallet-portfolio-analysis

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

錢包投資組合分析 是做什麼的?

目標:提供EVM錢包的資產分佈分析與風險評估。

輸入

  • wallet_address (必填):EVM地址 (0x...)

資料來源

主要:透過 Zerion API (zerion-portfolio.py)

# 取得所有資產
python3 zerion-portfolio.py <地址>

# 僅取得DeFi部位
python3 zerion-portfolio.py <地址> --only-defi

環境變數:必須設定 ZERION_API_KEY。若未設定,請至 https://www.zerion.io/api 取得你的API金鑰。

執行流程

步驟 1:驗證輸入

1. 檢查地址格式:0x + 40 個十六進位字元
2. 格式無效:顯示錯誤訊息並結束

步驟 2:擷取投資組合資料

# 執行 Zerion 投資組合腳本
python3 skills/pubfi-wallet-portfolio-analysis/zerion-portfolio.py <地址>

處理邊界情況:

  • 空錢包 → 回報「空錢包」
  • API 失敗 → 顯示錯誤,無法繼續
  • 零價值部位 → 跳過

步驟 3:分類資產

依類型分組:
  原生幣:ETH, MATIC, BNB 等
  穩定幣:USDC, USDT, DAI, USDS
  DeFi 部位:具有 protocol 屬性且 position_type != 'wallet'
  其他代幣:其餘所有

追蹤每個類別的總價值,以計算分佈佔比

步驟 4:識別 DeFi 協議

針對每個 DeFi 部位:
  1. 從 attributes.protocol 提取協議名稱
  2. 識別部位類型 (借貸/質押/流動性池等)
  3. 記錄部位價值及其佔投資組合的百分比
  4. 建立獨特協議清單,以便進行風險評估

步驟 5:風險評估 (僅限 DeFi 協議)

針對每個識別的協議:
  
  A. 擷取協議資料 (並行處理):
     - DefiLlama API:curl "https://api.llama.fi/protocol/{slug}"
     - 提取 TVL、區塊鏈、審計資訊、分類
  
  B. 檢查近期漏洞事件:
     - 在 rekt.news 搜尋協議名稱
     - 篩選過去 90 天內的記錄
     - 記錄任何事件
  
  C. 計算風險分數:
     風險 = 基礎分數 + 事件 + 審計 + TVL 趨勢
     
     考量因素:
     - 無審計:+5
     - 近期漏洞 (90 天內):+5
     - TVL 跌幅 >50% (30 天內):+3
     - TVL 跌幅 20-50%:+2
     - 新協議 (<6 個月):+2
     - 單一審計:+1
     - 多次審計:-2
     - 歷經考驗 (>1 年):-1
  
  D. 分配風險等級:
     - 分數 > 7:🔴 高風險
     - 分數 4-7:🟡 中風險
     - 分數 < 4:🟢 低風險
  
  E. 錯誤處理:
     - DefiLlama 失敗:將 TVL 標記為「N/A」,繼續執行
     - Rekt.news 無法使用:將漏洞事件標記為「未知」

已知安全協議 (自動 🟢):
  - Aave V2/V3、Uniswap V2/V3、Compound V2/V3
  - Lido、Curve、MakerDAO/Sky

步驟 6:產生報告

按照下方「輸出格式」區段所述,輸出結構化的 Markdown 報告。


輸出格式

1) 摘要

投資組合:0x...
總價值:$X,XXX USD
區塊鏈:Ethereum、Arbitrum、Base

2) 資產分佈

資產明細:
• 原生幣:$XXX (XX%)
• 穩定幣:$XXX (XX%)
• DeFi 部位:$XXX (XX%)
• 其他代幣:$XXX (XX%)

3) 前十大部位

依價值排序的表格格式:

協議/錢包 | 部位類型 | 價值 | 佔投資組合%
----------------|---------------|-------|------------
錢包資產   | 錢包        | $XXX  | XX%
協議 A      | 借貸       | $XXX  | XX%
協議 B      | 流動性池    | $XXX  | XX%

4) 前十大持倉 (佔投資組合 >2%)

表格格式:

區塊鏈 | 資產 | 類型 | 數量 | 價值 | 佔投資組合%
------|-------|------|--------|-------|------------

5) DeFi 曝險

僅針對 🟡 中風險或 🔴 高風險的協議 (跳過 🟢 低風險):

協議名稱 (區塊鏈)
• 部位價值:$XXX (佔投資組合 XX%)
• 部位類型:借貸/質押/流動性池/等
• 風險:🟡/🔴
• TVL:$XXX (DefiLlama)
• 審計:是/否 (審計者名稱)
• 近期問題:無 / [說明]

若所有協議皆為低風險,則輸出:「所有 DeFi 部位皆屬於低風險協議 (🟢)」

6) 風險總結

高優先級:

  • 列出所有 🔴 高風險部位及其建議行動

中優先級:

  • 列出所有 🟡 中風險部位及其考量

總體評估:

  • 一段總結
  • 風險分數:低/中/高

7) 資料來源

  • Zerion API:投資組合資料 (時間戳記)
  • DefiLlama:協議 TVL 與資訊
  • Rekt.news:安全事件
  • [其他使用的來源]

品質標準

精簡性:

  • 總報告:200-400 字 (不含表格)
  • 僅著重可操作的見解
  • 無填充內容或籠統陳述

準確性:

  • 所有資料必須帶有時間戳記
  • 所有價值必須來自真實 API 呼叫
  • 風險評估必須引用具體證據

實用性:

  • 強調佔投資組合 >5% 的部位
  • 立即標記任何高風險曝險
  • 必要時提供明確的下一步行動

更新頻率

  • 風險資料庫:每月透過 rekt.news 更新
  • 已知協議:隨著主要新協議上線而更新
  • 審計狀態:每季驗證

最後更新:2026-02-05

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

majiayu000/claude-skill-registry

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry

BlockRun works with Claude Code and Google Antigravity.

majiayu000/claude-skill-registry

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry

CRITICAL: Use for MolyKit AI chat toolkit. Triggers on: BotClient, OpenAI, SSE streaming, AI chat, molykit, PlatformSend, spawn(), ThreadToken, cross-platform async, Chat widget, Messages, PromptInput, Avatar, LLM

majiayu000/claude-skill-registry

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相關技能