Agent skill

Portfolio Tracker

by keypo-us in keypo-us/keypo-cli

A skill your agent uses when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens.

MITAuto-check passedBackend & APIs

Install Portfolio Tracker

skills CLI
$ npx skills add keypo-us/keypo-cli --skill portfolio-tracker -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install keypo-us/keypo-cli portfolio-tracker --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/keypo-us/keypo-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/portfolio-tracker .claude/skills/portfolio-tracker && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portfolio-tracker
GitHub stars
182
Token cost
~2.7k tokens
SKILL.md length
680 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens.

  • The user asks about token balances
  • SKILL.md covers Prerequisites, API Details, Querying Token Balances and Getting Token Metadata, plus 5 more sections
  • Calls curl and python3; reaches api.g.alchemy.com and base-sepolia.g.alchemy.com; needs ALCHEMY_API_KEY
  • What tokens a wallet holds

What it does

Portfolio Tracker is an agent skill from keypo-us/keypo-cli. Use when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens. Discovers all ERC-20 tokens and native token balances held by any EVM address using Alchemy's Portfolio API — one call returns everything. Works on both mainnets and testnets including Base Sepolia. Use this instead of manually checking individual token contracts or scraping block explorers. Also use when the user says "what tokens do I have", "show my portfolio", "what's in my…

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Smart contracts and Web scraping. It works with Ethereum. The repository describes itself as: Local-first, hardware-bound key management and encrypted secrets for AI agents. The licence is MIT.

When your agent uses it

  • The user asks about token balances
  • What tokens a wallet holds
  • Wants a complete portfolio overview including ERC-20 tokens
  • The user says what tokens do I have

Example prompts

  • “what tokens do I have”
  • “show my portfolio”
  • “s in my wallet”
  • “/portfolio-tracker”

Requirements

  • Python 3
  • A credential in ALCHEMY_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 7331b6f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.g.alchemy.com
    • base-sepolia.g.alchemy.com
    • dashboard.alchemy.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ALCHEMY_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portfolio Tracker loads about 2.7k tokens when it runs. Until then it costs about 167 tokens; SKILL.md has 680 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~167
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from keypo-us/keypo-cli at commit 7331b6f, republished under its MIT licence (© keypo-us). 680 words, ~2,661 tokens.

Download SKILL.mdSave it as .claude/skills/portfolio-tracker/SKILL.md (or your agent's skills folder).
name
portfolio-tracker
description
Use when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens. Discovers all ERC-20 tokens and native token balances held by any EVM address using Alchemy's Portfolio API — one call returns everything. Works on both mainnets and testnets including Base Sepolia. Use this instead of manually checking individual token contracts or scraping block explorers. Also use when the user says "what tokens do I have", "show my portfolio", "what's in my wallet", "check my token balances", "what other tokens", or asks for token holdings beyond native ETH. Requires an Alchemy API key.
license
MIT
metadata.author
keypo-us
metadata.version
0.2.0
metadata.compatibility
Works on any EVM chain Alchemy supports, including testnets (Base Sepolia, Ethereum Sepolia, Arbitrum Sepolia, etc.).

Portfolio Tracker — Token Discovery for Any EVM Wallet

Discover all token balances (native + ERC-20) for any EVM address in a single API call. Works on mainnets and testnets including Base Sepolia.

This skill is read-only — it discovers what a wallet holds but does not send transactions.


Prerequisites

Alchemy API key

An Alchemy API key is required. Check for it immediately:

bash
echo $ALCHEMY_API_KEY

If empty, tell the user to set it in their shell environment. Do not ask them to paste the key in chat.

Please set your Alchemy API key as an environment variable.
Add this to your ~/.zshrc (or ~/.bashrc) and restart your terminal:

  export ALCHEMY_API_KEY="your-key-here"

Get a free API key at https://dashboard.alchemy.com/signup
Then re-run this command.

Do not proceed without the key.


API Details

This skill uses Alchemy's Portfolio API, not the older Token API. One call returns native tokens and all ERC-20s together — no separate metadata calls needed.

  • Endpoint: https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/balances/by-address
  • Method: POST
  • API key goes in the URL path, not in a header.
  • Max 2 addresses and 5 networks per request.
Network slugs
ChainSlugChain ID
Ethereumeth-mainnet1
Basebase-mainnet8453
Base Sepoliabase-sepolia84532
Arbitrumarb-mainnet42161
Arbitrum Sepoliaarb-sepolia421614
Optimismopt-mainnet10
Polygonpolygon-mainnet137
Ethereum Sepoliaeth-sepolia11155111

Querying Token Balances

Single wallet, single chain
bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/balances/by-address" \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": [
      {
        "address": "<wallet-address>",
        "networks": ["base-sepolia"]
      }
    ],
    "includeNativeTokens": true,
    "includeErc20Tokens": true
  }'
Response format
json
{
  "data": {
    "tokens": [
      {
        "address": "0xWallet...",
        "network": "base-sepolia",
        "tokenAddress": null,
        "tokenBalance": "0x16b3bd933bca8"
      },
      {
        "address": "0xWallet...",
        "network": "base-sepolia",
        "tokenAddress": "0x036cbd53842c5426634e7929541ec2318f3dcf7e",
        "tokenBalance": "0x023cbca5"
      }
    ],
    "pageKey": null
  }
}
  • tokenAddress: null means native ETH (or the chain's native token)
  • tokenAddress: "0x..." means an ERC-20 token
  • tokenBalance is a hex string — convert to human-readable using the token's decimals (18 for ETH/WETH, varies for others)
Multiple wallets or chains

Pass up to 2 addresses and 5 networks per request:

bash
curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/balances/by-address" \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": [
      {
        "address": "0xWallet1...",
        "networks": ["base-sepolia"]
      },
      {
        "address": "0xWallet2...",
        "networks": ["base-sepolia"]
      }
    ],
    "includeNativeTokens": true,
    "includeErc20Tokens": true
  }'

If querying more than 2 wallets, batch them into sequential requests of 2. Do not parallelize — Alchemy rate limits will cause failures. Add sleep 0.5 between batches.


Getting Token Metadata

The Portfolio API returns raw hex balances and contract addresses but not token names or decimals. For each discovered token, fetch metadata with the Token API:

bash
curl -s -X POST "https://base-sepolia.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "alchemy_getTokenMetadata",
    "params": ["<token-contract-address>"]
  }'

Returns: { "name": "USD Coin", "symbol": "USDC", "decimals": 6, "logo": "..." }

For native tokens (tokenAddress: null), no metadata call is needed — it's always ETH with 18 decimals on EVM chains.


Known Tokens Not Found by Auto-Discovery

The Portfolio API may not discover all tokens. Predeploy contracts on OP Stack chains (Base, Optimism, etc.) are not indexed by Alchemy's auto-discovery. WETH is the most common example.

Always check these known tokens explicitly after the main query by calling the Token API:

bash
curl -s -X POST "https://base-sepolia.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "alchemy_getTokenBalances",
    "params": ["<wallet-address>", ["0x4200000000000000000000000000000000000006"]]
  }'
ChainTokenPredeploy AddressDecimals
Base / Base SepoliaWETH0x420000000000000000000000000000000000000618
OptimismWETH0x420000000000000000000000000000000000000618

Merge results from the predeploy check into the Portfolio API results before presenting. Deduplicate by tokenAddress — if a token appears in both, use the Portfolio API result.


Show full SKILL.md (276 more words)Show less

Converting Hex Balances

All balances are hex strings. Convert using python:

python
hex_balance = "0x16b3bd933bca8"
decimals = 18  # ETH/WETH
balance = int(hex_balance, 16) / (10 ** decimals)
print(f"{balance:.6f}")  # 0.000399

Common decimals: ETH/WETH = 18, USDC = 6, USDT = 6, DAI = 18.


Complete Example

Query a wallet for all tokens including WETH predeploy:

bash
ADDR="<wallet-address>"
NETWORK="base-sepolia"

# Step 1: Portfolio API for native + discovered ERC-20s
PORTFOLIO=$(curl -s -X POST "https://api.g.alchemy.com/data/v1/$ALCHEMY_API_KEY/assets/tokens/balances/by-address" \
  -H 'Content-Type: application/json' \
  -d "{\"addresses\":[{\"address\":\"$ADDR\",\"networks\":[\"$NETWORK\"]}],\"includeNativeTokens\":true,\"includeErc20Tokens\":true}")

# Step 2: Explicit check for WETH predeploy
WETH=$(curl -s -X POST "https://$NETWORK.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"alchemy_getTokenBalances\",\"params\":[\"$ADDR\",[\"0x4200000000000000000000000000000000000006\"]]}")

# Step 3: Parse and display
echo "$PORTFOLIO" | python3 -c "
import sys, json
data = json.load(sys.stdin)
tokens = data.get('data', {}).get('tokens', [])
for t in tokens:
    addr = t['tokenAddress'] or 'native (ETH)'
    bal = int(t['tokenBalance'], 16)
    if addr == 'native (ETH)':
        print(f'  ETH: {bal / 1e18:.6f}')
    else:
        print(f'  {addr}: {bal} (raw)')
"

echo "$WETH" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for t in data.get('result', {}).get('tokenBalances', []):
    bal = int(t['tokenBalance'], 16)
    if bal > 0:
        print(f'  WETH: {bal / 1e18:.6f}')
"

Presenting Results

Multi-wallet overview (most common case)

When the user asks for a portfolio overview across multiple wallets, present one consolidated table — not individual cards per wallet. This is the preferred format:

Base Sepolia Wallet Overview

  Name                       Address        Policy     ETH        USDC       WETH
  ─────────────────────────────────────────────────────────────────────────────────────
  test-open                  0xC660...Bc13  open       0.000999   —          —
  dave-test-key              0xD88E...eb80  biometric  0.003399   —          —
  dave-testkey-passcode      0x60e8...B959  passcode   0.001899   —          —
  dave-bio-test-key          0x63BC...35EC  biometric  0.001799   —          —
  dave-unified-test-key      0xEE38...5e49  open       0.001299   —          —
  dave-unified-test-key-bio  0xC702...CcE4  biometric  0.000399   37.534885  0.000100
  ─────────────────────────────────────────────────────────────────────────────────────
  Total                                                0.009794   37.534885  0.000100

Key rules for the consolidated table:

  • One row per wallet, all wallets in a single table
  • Include name, truncated address, signing policy, and all token balances as columns
  • Use — for tokens a wallet doesn't hold
  • Add a totals row at the bottom
  • Only add token columns that at least one wallet holds (don't show empty columns)
  • Do NOT create separate info cards, tables, or sections per wallet
Single wallet query

When the user asks about one specific wallet, a compact format is fine:

dave-unified-test-key-bio (0xC702...CcE4) — Base Sepolia, biometric

  Token       Balance         Contract
  ─────────────────────────────────────────────────────
  ETH         0.000399        (native)
  WETH        0.000100        0x4200...0006
  USDC        37.534885       0x036C...CF7e
  ─────────────────────────────────────────────────────
General rules
  • Always include native ETH alongside ERC-20 tokens.
  • If a token has a non-zero balance but you can't resolve its name via alchemy_getTokenMetadata, show the contract address as the identifier.
  • Use eth_getBalance via the Alchemy RPC for native ETH if needed as a fallback.

Notes

  • Testnet support is a key advantage. Use for Base Sepolia, Ethereum Sepolia, Arbitrum Sepolia, etc.
  • Alchemy does not return USD prices on testnets. For mainnet price data, use a price API.
  • Query wallets sequentially, not in parallel. Max 2 addresses per request. Add sleep 0.5 between requests when querying more than 2 wallets.
  • Always check predeploy tokens explicitly (especially WETH on OP Stack chains) — they are not found by auto-discovery.
  • Use pageKey from the response to paginate if a wallet holds many tokens.

© keypo-us, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/portfolio-tracker of keypo-us/keypo-cli.

Open the folder on GitHubat commit 7331b6f

Compare with similar skills

Portfolio Tracker next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portfolio Tracker compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portfolio Tracker this skillkeypo-us/keypo-cli182—~2.7kAutomated safety check: PassMIT
Explorer Contract Verificationsablier-labs/evm-monorepo353—~1.9kAutomated safety check: PassCustom licence
Developing Smart ContractsLFDT-Lineth/lineth-monorepo126—~1.4kAutomated safety check: PassAGPL-3.0
Deposit QrSuperior-Trade/superior-skills215—~1.1kAutomated safety check: PassMIT
Squash BugbotLFDT-Lineth/lineth-monorepo126—~3.3kAutomated safety check: PassApache-2.0
Ops Indexer Queryboundless-xyz/boundless193—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Explorer Contract Verification

    sablier-labs/evm-monorepo

    Verify smart contracts on Etherscan, Routescan, and Blockscout block explorers.

    353 GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Developing Smart Contracts

    LFDT-Lineth/lineth-monorepo

    Solidity smart contract development guidelines for Lineth blockchain.

    126 GitHub stars~1.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    215 GitHub stars~1.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Squash Bugbot

    LFDT-Lineth/lineth-monorepo

    Triage unresolved bot review comments on a GitHub PR. An agent skill from LFDT-Lineth/lineth-monorepo.

    126 GitHub stars~3.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Ops Indexer Query

    boundless-xyz/boundless

    Internal — for Boundless team members only. An agent skill from boundless-xyz/boundless.

    193 GitHub stars~3.5k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • External Call Safety

    quillai-network/quillshield_skills

    Detects unsafe external call patterns and token integration vulnerabilities in smart contracts.

    130 GitHub stars~3.1k tokensUpdated 6 mo ago
    Backend & APIsAuto-check passed

More from keypo-us/keypo-cli

  • Checkout Purchase

    keypo-us/keypo-cli

    A skill your agent uses when the user asks to buy a product from the Shopify store.

    182 GitHub stars~880 tokensUpdated 6 mo ago
    Auto-check: notes
  • Keypo Shopping

    keypo-us/keypo-cli

    MUST LOAD for any shopping, buying, gift, or product request.

    182 GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Keypo Signer

    keypo-us/keypo-cli

    A skill your agent uses when managing Secure Enclave signing keys or encrypted secrets.

    182 GitHub stars~3.6k tokensUpdated 6 mo ago
    Auto-check: notes
  • Keypo Wallet

    keypo-us/keypo-cli

    A skill your agent uses when interacting with keypo-wallet — checking wallet balances, listing wallets, sending transactions, or managing Secure Enclave signing keys.

    182 GitHub stars~2.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Uniswap V3 Swap

    keypo-us/keypo-cli

    A skill your agent uses when the user wants to swap tokens on Base Sepolia (or Base mainnet) using Uniswap V3.

    182 GitHub stars~3.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Weth Base Sepolia

    keypo-us/keypo-cli

    Interact with Wrapped Ether (WETH) at 0x4200000000000000000000000000000000000006 on Base Sepolia.

    182 GitHub stars~1.5k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Categories

Questions about Portfolio Tracker

What does Portfolio Tracker do?

A skill your agent uses when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens. Portfolio Tracker is an agent skill from keypo-us/keypo-cli. Use when the user asks about token balances, what tokens a wallet holds, or wants a complete portfolio overview including ERC-20 tokens.

When should I use Portfolio Tracker?

Portfolio Tracker fits situations like: the user asks about token balances; what tokens a wallet holds; wants a complete portfolio overview including ERC-20 tokens; the user says what tokens do I have.

How do I install Portfolio Tracker in Claude Code?

Run `npx skills add keypo-us/keypo-cli --skill portfolio-tracker -a claude-code`. Or copy the skill folder (skills/portfolio-tracker in keypo-us/keypo-cli) into .claude/skills/portfolio-tracker in your project. Claude Code loads it when a task matches its description.

How do I install Portfolio Tracker in Codex?

Run `npx skills add keypo-us/keypo-cli --skill portfolio-tracker -a codex`. Or copy the skill folder (skills/portfolio-tracker in keypo-us/keypo-cli) into .agents/skills/portfolio-tracker in your project. Codex loads it when a task matches its description.

Can I use Portfolio Tracker in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add keypo-us/keypo-cli --skill portfolio-tracker -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio-tracker, .gemini/skills/portfolio-tracker, .github/skills/portfolio-tracker and .opencode/skills/portfolio-tracker in your project.

What does Portfolio Tracker need to run?

Going by SKILL.md and its folder, Portfolio Tracker needs the command-line tools its instructions call (curl and python3) and credentials named ALCHEMY_API_KEY. Our summary lists: Python 3; A credential in ALCHEMY_API_KEY.

Does Portfolio Tracker access the network?

SKILL.md names 3 domains. In commands or code: api.g.alchemy.com, base-sepolia.g.alchemy.com and dashboard.alchemy.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Portfolio Tracker safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Portfolio Tracker use?

Portfolio Tracker is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portfolio Tracker use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Portfolio Tracker?

Skills that share tags, products or a category with Portfolio Tracker: Explorer Contract Verification (sablier-labs/evm-monorepo, 353 stars), Developing Smart Contracts (LFDT-Lineth/lineth-monorepo, 126 stars), Deposit Qr (Superior-Trade/superior-skills, 215 stars) and Squash Bugbot (LFDT-Lineth/lineth-monorepo, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portfolio Tracker?

keypo-us (a GitHub organization) maintains it in keypo-us/keypo-cli, which has 182 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on April 2, 2026.

Source: keypo-us/keypo-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.