nansen-wallet-keychain-migration▌
nansen-ai/nansen-cli · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Use this skill when a user already has a nansen-cli wallet set up with the
- ›old password storage method and wants to migrate to the new secure flow.
Wallet Migration — Old Flow to Secure Keychain
Use this skill when a user already has a nansen-cli wallet set up with the old password storage method and wants to migrate to the new secure flow.
When to use
- User mentions they stored their password in
~/.nansen/.env, a.envfile, ormemory.md - User gets the stderr warning:
⚠ Password loaded from insecure .credentials file - User asks to "secure my wallet" or "migrate to keychain"
- User created a wallet before the keychain update was released
Detect current state
wallet show only displays addresses and does NOT load or check the password.
To detect the actual password situation, check for stored password sources:
# 1. Check if a wallet exists at all
nansen wallet list 2>&1
# 2. Check for insecure password stores
ls -la ~/.nansen/.env 2>/dev/null && echo "FOUND: ~/.nansen/.env (insecure)"
ls -la ~/.nansen/wallets/.credentials 2>/dev/null && echo "FOUND: .credentials file (insecure)"
# 3. Try an operation that requires the password (without setting env var)
nansen wallet export default 2>&1
Interpret the export output:
⚠ Password loaded from ~/.nansen/wallets/.credentialson stderr → needs migration (Path B)- Export succeeds silently → password is in keychain, no migration needed
PASSWORD_REQUIREDJSON error → password not persisted anywhere (Path C or D)
Migration paths
Path A: Password in ~/.nansen/.env (old skill pattern)
The previous wallet skill told agents to write the password to ~/.nansen/.env.
Step 1 — Ask the human for their password:
"Your wallet password is currently stored in ~/.nansen/.env, which is insecure. I can migrate it to your OS keychain. Please confirm the password you used when creating the wallet, or I can read it from ~/.nansen/.env if you authorize it."
Step 2 — Migrate:
The source and nansen wallet secure MUST run in the same shell so the env
var is available to the node process:
source ~/.nansen/.env 2>/dev/null && nansen wallet secure
Step 3 — Verify the password actually decrypts the wallet:
# Unset env var to prove keychain works, then export to verify decryption
unset NANSEN_WALLET_PASSWORD
nansen wallet export default 2>&1
If export succeeds (shows private keys), the migration worked. If it shows
Incorrect password, the wrong password was migrated — run nansen wallet forget-password and retry with the correct password.
Step 4 — Clean up the insecure file:
rm -f ~/.nansen/.env
Path B: Password in .credentials file (auto-saved fallback)
This happens when wallet create couldn't access the OS keychain (containers, CI).
nansen wallet secure
If the keychain is still unavailable (e.g. containerized Linux without D-Bus),
nansen wallet secure will explain the situation and suggest alternatives.
After migrating, verify decryption works:
nansen wallet export default 2>&1
Path C: Password only in NANSEN_WALLET_PASSWORD env var
# Persist the env var password to keychain
nansen wallet secure
Then verify without the env var:
unset NANSEN_WALLET_PASSWORD
nansen wallet export default 2>&1
Path D: Password lost entirely
The password cannot be recovered. The wallet's private keys are encrypted with AES-256-GCM and the password is not stored anywhere recoverable.
Tell the human:
"Your wallet password cannot be recovered. If you have funds in this wallet, they may be inaccessible. You can create a new wallet and transfer any remaining accessible funds."
# Create a fresh wallet (human must provide a new password)
NANSEN_WALLET_PASSWORD="<new_password_from_user>" nansen wallet create --name new-wallet
Post-migration verification
After any migration, confirm the password was migrated correctly by proving the keychain password can actually decrypt the wallet:
# Unset env var to prove keychain works
unset NANSEN_WALLET_PASSWORD
# This MUST succeed — it proves the keychain password decrypts the wallet
nansen wallet export default 2>&1
If export shows Incorrect password, the wrong password was saved to the
keychain. Fix with:
nansen wallet forget-password
NANSEN_WALLET_PASSWORD="<correct_password>" nansen wallet secure
If stderr still shows the .credentials warning, the keychain migration did
not succeed — check if the OS keychain service is running (secret-tool on Linux,
security on macOS).
Forget password (all stores)
If the user wants to remove their persisted password entirely:
nansen wallet forget-password
This clears the password from both OS keychain and .credentials file. Future
wallet operations will require NANSEN_WALLET_PASSWORD env var or re-running
nansen wallet secure.
Critical rules for agents
- NEVER generate a password — always ask the human
- NEVER store the password in files, memory, logs, or conversation history
- NEVER use
--humanflag — interactive prompts break agents - If the human authorizes reading
~/.nansen/.env, read it in the same command (source ~/.nansen/.env && nansen wallet secure) — do not echo or log the value - ALWAYS verify after migration with
nansen wallet export default—wallet showdoes NOT prove the password works (it never loads the password)
How to use nansen-wallet-keychain-migration on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add nansen-wallet-keychain-migration
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches nansen-wallet-keychain-migration from GitHub repository nansen-ai/nansen-cli and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate nansen-wallet-keychain-migration. Access the skill through slash commands (e.g., /nansen-wallet-keychain-migration) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★29 reviews- ★★★★★Liam Okafor· Dec 12, 2024
nansen-wallet-keychain-migration reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Isabella Wang· Sep 21, 2024
nansen-wallet-keychain-migration fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Piyush G· Sep 9, 2024
Solid pick for teams standardizing on skills: nansen-wallet-keychain-migration is focused, and the summary matches what you get after install.
- ★★★★★Camila Liu· Sep 5, 2024
nansen-wallet-keychain-migration has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Shikha Mishra· Aug 28, 2024
nansen-wallet-keychain-migration is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Camila Farah· Aug 24, 2024
nansen-wallet-keychain-migration fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Noah Srinivasan· Aug 12, 2024
nansen-wallet-keychain-migration has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Rahul Santra· Jul 19, 2024
nansen-wallet-keychain-migration fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Anaya Brown· Jul 15, 2024
nansen-wallet-keychain-migration is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Noah Rao· Jul 3, 2024
Solid pick for teams standardizing on skills: nansen-wallet-keychain-migration is focused, and the summary matches what you get after install.
showing 1-10 of 29