
Analyzing NFT Rarity
FreeEvaluate NFT rarity and rank tokens by uniqueness.
Free · Opens the source repo
What Analyzing NFT Rarity does
The Analyzing NFT Rarity skill provides a comprehensive solution for assessing the rarity of NFTs within various collections. By leveraging the OpenSea API, this skill fetches metadata for ERC-721 and ERC-1155 tokens, allowing users to analyze and compare the uniqueness of different tokens based on their traits. The skill is designed for NFT collectors, traders, and developers who want to make informed decisions based on rarity metrics.
Users can execute a variety of commands to analyze collections, check specific tokens, or compare multiple NFTs. The skill supports different rarity calculation algorithms, including rarity_score, statistical, average, and information, catering to different analytical needs. The results can be exported in JSON or CSV formats, making it easy to integrate findings into reports or further analysis.
This skill is particularly useful for those involved in the NFT space who need to quickly assess the value of tokens based on their rarity. Whether you're a collector looking to understand the market better or a developer building tools around NFT analysis, this skill provides the necessary functionalities to evaluate and rank NFTs effectively.
With built-in error handling and a clear structure for managing cache and data exports, the Analyzing NFT Rarity skill ensures a smooth user experience. Its reliance on Python and Bash makes it accessible for developers familiar with these environments, while the clear command-line instructions facilitate quick adoption.
When to use it
Use this skill when you need to analyze NFT collections, check the rarity of specific tokens, or compare multiple NFTs in a straightforward manner.
When not to use it
This skill may not be suitable for users looking for a graphical user interface or those who require real-time updates beyond the OpenSea API limits.
What you can build with it
Analyze a Collection
Fetch and analyze the rarity of all tokens in a specific NFT collection using the rarity_analyzer.py script.
Check Specific Token Rarity
Quickly check the rarity details of a specific NFT token by its ID within a collection.
Compare Multiple NFTs
Compare the rarity traits of multiple NFTs side-by-side to determine which tokens are more unique.
How to install Analyzing NFT Rarity
View source1. Install with the skills CLI
npx skills add jeremylongshore/claude-code-plugins-plus-skills/analyzing-nft-rarity --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by jeremylongshoreAnalyzing 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 ${CLAUDE_SKILL_DIR}/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 ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py token pudgypenguins 1234 # port 1234 - example/test
3. Compare Multiple Tokens
cd ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py compare azuki 1234,5678,9012 # 5678: 1234: 9012 = configured value
4. View Trait Distribution
cd ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py traits doodles
5. Export Rankings
JSON:
cd ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py export coolcats > rankings.json
CSV:
cd ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py export coolcats --format csv > rankings.csv
6. Manage Cache
cd ${CLAUDE_SKILL_DIR}/scripts && python3 rarity_analyzer.py cache --list
cd ${CLAUDE_SKILL_DIR}/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 ${CLAUDE_SKILL_DIR}/references/errors.md for:
- API rate limiting
- IPFS gateway issues
- Collection not found
- Token ID not found
Examples
See ${CLAUDE_SKILL_DIR}/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
Frequently asked questions about Analyzing NFT Rarity
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
