jeremylongshore

analyzing-nft-rarity

@jeremylongshore/analyzing-nft-rarity
jeremylongshore
1,004
123 forks
Updated 1/18/2026
View on GitHub

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".

Installation

$skills install @jeremylongshore/analyzing-nft-rarity
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathplugins/crypto/nft-rarity-analyzer/skills/analyzing-nft-rarity/SKILL.md
Branchmain
Scoped Name@jeremylongshore/analyzing-nft-rarity

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

skills list

Skill Instructions


name: analyzing-nft-rarity 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 *) version: 1.0.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT

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_KEY for higher rate limits
  • Optional: ALCHEMY_API_KEY for 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

AlgorithmDescriptionBest For
rarity_scoreSum of 1/frequency (default)General use, matches rarity.tools
statisticalSame as rarity_scoreBackward compatibility
averageMean of trait raritiesBalanced scoring
informationEntropy-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

More by jeremylongshore

View all
rabbitmq-queue-setup
1,004

Rabbitmq Queue Setup - Auto-activating skill for Backend Development. Triggers on: rabbitmq queue setup, rabbitmq queue setup Part of the Backend Development skill category.

model-evaluation-suite
1,004

evaluating-machine-learning-models: This skill allows Claude to evaluate machine learning models using a comprehensive suite of metrics. It should be used when the user requests model performance analysis, validation, or testing. Claude can use this skill to assess model accuracy, precision, recall, F1-score, and other relevant metrics. Trigger this skill when the user mentions "evaluate model", "model performance", "testing metrics", "validation results", or requests a comprehensive "model evaluation".

neural-network-builder
1,004

building-neural-networks: This skill allows Claude to construct and configure neural network architectures using the neural-network-builder plugin. It should be used when the user requests the creation of a new neural network, modification of an existing one, or assistance with defining the layers, parameters, and training process. The skill is triggered by requests involving terms like "build a neural network," "define network architecture," "configure layers," or specific mentions of neural network types (e.g., "CNN," "RNN," "transformer").

oauth-callback-handler
1,004

Oauth Callback Handler - Auto-activating skill for API Integration. Triggers on: oauth callback handler, oauth callback handler Part of the API Integration skill category.