Communitygithub.com

钱包资产组合分析

分析EVM钱包资产分配并识别高风险协议敞口。

钱包资产组合分析 是什么?

本技能用于分析EVM钱包的资产分布并评估DeFi协议的风险敞口。它通过Zerion API获取钱包资产数据,利用DefiLlama和rekt.news对DeFi协议进行风险评分,最终生成结构化的Markdown报告。用户只需提供钱包地址,技能会自动验证格式、获取数据、分类资产、识别DeFi协议并计算风险等级。支持Ethereum、Arbitrum、Base等多条链,并内置Aave、Uniswap等已知安全协议的自动低风险标记。该技能适用于Claude Code、Cursor、Codex等平台,帮助用户快速了解钱包健康状况并规避潜在风险。

兼容平台✓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-portfolio.py 使用Zerion API

# 获取所有资产
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头寸:具有协议属性且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.

相关技能