nansen-wallet-clustering — Claude Code skill for wallet clusters
A Claude skill that traces related wallets through the Nansen CLI: funding chains, shared signers, exchange deposit patterns.
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a claude-codeWhat nansen-wallet-clustering does
The skill answers two questions: who controls a wallet, and whether two addresses are related. It drives nansen research profiler — labels first, then related-wallets and counterparties. Once a cluster is confirmed, counterparties-batch covers up to 10 of its wallets in one call, capped at --days 90 and one ecosystem per request, so EVM and Solana addresses cannot be mixed.
The chain comes from the address format: 0x means --chain ethereum (also base, arbitrum, optimism, polygon), Base58 means --chain solana. There is compare for a pair of addresses, historical-balances for spotting drained wallets, and trace for multi-hop paths. That last one is credit-heavy, and the skill itself advises keeping --width at 3 or below.
Every research command needs a selected API key or a saved browser session, so run nansen auth status first. NANSEN_API_KEY overrides the saved session. Each call, loops included, can spend funds through x402, while an auth or session-renewal failure never triggers payment. Expansion stops at 10 wallets, and the skill asks the human before querying each new address.
What it helps with
- find out who is behind an unfamiliar wallet
- compare two addresses for shared tokens and counterparties
- group wallets by shared Safe signers
- follow a funding chain two hops deep
- spot wallets drained via historical balances
Example prompts for the agent
- Profile 0x… on ethereum — who controls it and which wallets are related
- Compare these two solana addresses for shared counterparties and tokens
- Batch-profile this cluster with labels, balance and PnL
How to install nansen-wallet-clustering
1Skills CLI (Vercel)
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a claude-code2Manually: put the files in place
~/.claude/skills/nansen-wallet-clustering/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nansen-wallet-clustering/
1Skills CLI (Vercel)
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a codex2Manually: put the files in place
.agents/skills/nansen-wallet-clustering/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a cursor2Manually: put the files in place
.cursor/skills/nansen-wallet-clustering/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install nansen-ai/nansen-cli nansen-wallet-clustering2Manually: put the files in place
.github/skills/nansen-wallet-clustering/SKILL.md1Skills CLI (Vercel)
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a gemini-cli2Platform CLI
gemini skills install https://github.com/nansen-ai/nansen-cli --path skills/nansen-wallet-clusteringManually: put the files in place
.devin/skills/nansen-wallet-clustering/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about nansen-wallet-clustering
How do I install nansen-wallet-clustering in Claude?
Run npx skills add nansen-ai/nansen-cli --skill nansen-wallet-clustering -a claude-code. The skill lands in ~/.claude/skills/nansen-wallet-clustering/SKILL.md.
What does nansen-wallet-clustering do?
It clusters and attributes related wallets — funding chains, shared signers, CEX deposit patterns. Useful when tracing wallet ownership or checking whether two addresses are connected.
What does the skill need to run?
The nansen binary plus a selected API key or saved browser session; the skill has you run nansen auth status before research commands. Each call can spend credits through x402.
Source text
SKILL.md · MIT
---
name: nansen-wallet-clustering
description: "Cluster and attribute related wallets — funding chains, shared signers, CEX deposit patterns. Use when tracing wallet ownership, comparing two wallets, finding wallet relationships, governance voters, or related address clusters."
metadata:
openclaw:
requires:
bins:
- nansen
primaryEnv: NANSEN_API_KEY
install:
- kind: node
package: nansen-cli
bins: [nansen]
allowed-tools: Bash(nansen:*)
---
## Authentication
Browser login requests `nansen:api` for API-key-equivalent account API permissions; existing OAuth/MCP `nansen:read` semantics and separate wallet authorization are unchanged.
Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
# Wallet Attribution
**Answers:** "Who controls this wallet? Are these wallets related?"
Chain: `0x` → `--chain ethereum` (also base, arbitrum, optimism, polygon). Base58 → `--chain solana`.
```bash
ADDR=<address> CHAIN=<ethereum|solana|base|...> # detect from address format above
# 1. Identity
nansen research profiler labels --address $ADDR --chain $CHAIN
# 2. Related wallets (paginate with --page N)
nansen research profiler related-wallets --address $ADDR --chain $CHAIN
# 3. Counterparties (paginate with --page N; widen with --days 365 if empty)
nansen research profiler counterparties --address $ADDR --chain $CHAIN --days 90
# 3b. Once a cluster is confirmed: counterparties for up to 10 of its wallets in one call
# (max --days 90; one ecosystem per request — EVM and Solana cannot be mixed). Rows are
# contiguous per-wallet blocks ordered by wallet address: raise --limit and page with
# --page N to reach later wallets.
nansen research profiler counterparties-batch --addresses "addr1,addr2" --chain $CHAIN --days 90 --limit 50
# 4. Batch profile cluster
nansen research profiler batch --addresses "addr1,addr2" --chain $CHAIN --include labels,balance,pnl
# 5. Compare pairs → shared_counterparties, shared_tokens, balances
nansen research profiler compare --addresses "addr1,addr2" --chain $CHAIN
# 6. Historical balances (fingerprint drained wallets)
nansen research profiler historical-balances --address $ADDR --chain $CHAIN --days 90
# 7. Multi-hop trace (credit-heavy — keep --width ≤3)
nansen research profiler trace --address $ADDR --chain $CHAIN --depth 2 --width 3
```
**Expansion:** Run steps 1-2 on seed. For each new address found, ask the human before querying. Reserve step 3 for seed only.
**Stop when:** known protocol/CEX · Low confidence · already visited · cluster > 10 wallets.
**Confidence:** High = first funder / shared Safe signers / same CEX deposit. Medium = coordinated movements / related-wallets + label match. Exclude = ENS only, single CEX withdrawal, single deployer.
Full attribution rules in REFERENCE.md.
© nansen-ai · MIT · nansen-ai/nansen-cli