analyzing-nft-rarity
Calculate NFT rarity scores and rank tokens by trait uniqueness. Use when analyzing NFT collections, checking token rarity, or comparing NFTs. Trigger with phrases like "check NFT rarity", "analyze collection", "rank tokens", "compare NFTs".
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2.0k
- Forks
- 233
01 前言 Front Matter
- name
- analyzing-nft-rarity
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Calculate NFT rarity scores and rank tokens by trait uniqueness. Use when analyzing NFT collections, checking token rarity, or comparing NFTs. Trigger with phrases like "check NFT rarity", "analyze collection", "rank tokens", "compare NFTs".
- allowed-tools
- Read, Bash(python3 *)
02 资源文件 13
- 参考文档ARD.md5.1 KB
- 参考文档config/settings.yaml1.9 KB
- 参考文档PRD.md2.7 KB
- 参考文档references/errors.md3.0 KB
- 参考文档references/examples.md6.1 KB
- 参考文档references/experience-rules.md5.6 KB
- 参考文档references/implementation.md1.3 KB
- 参考文档references/verification.md4.3 KB
- 脚本scripts/formatters.py8.6 KB
- 脚本scripts/metadata_fetcher.py11.9 KB
- 脚本scripts/rarity_analyzer.py11.7 KB
- 脚本scripts/rarity_calculator.py11.7 KB
- 脚本scripts/trait_parser.py9.9 KB
03 SKILL.md 正文
Analyzing NFT Rarity
Overview
NFT rarity analysis skill that:
- Fetches collection metadata from OpenSea API
- Parses and normalizes trait attributes
- Calculates rarity using multiple algorithms
- Ranks tokens by composite rarity score
- Exports data in JSON and CSV formats
Prerequisites
- Python 3.8+ with requests library
- Optional:
OPENSEA_API_KEYfor higher rate limits - Optional:
ALCHEMY_API_KEYfor direct metadata fetching
Instructions
1. Analyze a Collection
cd {baseDir}/scripts && python3 rarity_analyzer.py collection boredapeyachtclub
Options:
--limit 500: Fetch more tokens for analysis--top 50: Show top 50 tokens--traits: Include trait distribution--rarest: Show rarest traits--algorithm [statistical|rarity_score|average|information]
2. Check Specific Token
cd {baseDir}/scripts && python3 rarity_analyzer.py token pudgypenguins 1234
3. Compare Multiple Tokens
cd {baseDir}/scripts && python3 rarity_analyzer.py compare azuki 1234,5678,9012
4. View Trait Distribution
cd {baseDir}/scripts && python3 rarity_analyzer.py traits doodles
5. Export Rankings
JSON:
cd {baseDir}/scripts && python3 rarity_analyzer.py export coolcats > rankings.json
CSV:
cd {baseDir}/scripts && python3 rarity_analyzer.py export coolcats --format csv > rankings.csv
6. Manage Cache
cd {baseDir}/scripts && python3 rarity_analyzer.py cache --list
cd {baseDir}/scripts && python3 rarity_analyzer.py cache --clear
Rarity Algorithms
| Algorithm | Description | Best For |
|---|---|---|
rarity_score |
Sum of 1/frequency (default) | General use, matches rarity.tools |
statistical |
Same as rarity_score | Backward compatibility |
average |
Mean of trait rarities | Balanced scoring |
information |
Entropy-based (-log2) | Information theory approach |
Output
- Collection Summary: Name, supply, trait types
- Rankings: Tokens sorted by rarity score with percentile
- Token Detail: Full trait breakdown with contribution
- Comparison: Side-by-side trait comparison
Supported Collections
Works with any ERC-721/ERC-1155 collection that has:
- OpenSea listing
- Standard attributes array format
- Accessible metadata
Error Handling
See {baseDir}/references/errors.md for:
- API rate limiting
- IPFS gateway issues
- Collection not found
- Token ID not found
Examples
See {baseDir}/references/examples.md for:
- Collection analysis workflows
- Token comparison
- Export and caching
- Algorithm comparison
Resources
- OpenSea API - Metadata source
- Rarity Tools - Reference rankings
- IPFS - Decentralized metadata
04 同仓库更多 Skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
neuropixels-analysis
Neuropixels neural recording analysis. Load SpikeGLX/OpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen/IBL curation, AI-assisted visual analysis, for Neuropixels 1.0/2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
notebooklm
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.