Skip to content

Commit 65d8904

Browse files
committed
feat: add Claude Code skill for listing new assets
1 parent 67d328b commit 65d8904

File tree

2 files changed

+183
-0
lines changed

2 files changed

+183
-0
lines changed

.claude-plugin/marketplace.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "assets-skills",
3+
"owner": {
4+
"name": "Trust Wallet",
5+
"email": "developer@trustwallet.com"
6+
},
7+
"metadata": {
8+
"description": "Claude Code skills for contributing to the Trust Wallet assets repository",
9+
"version": "1.0.0"
10+
},
11+
"plugins": [
12+
{
13+
"name": "assets-skills",
14+
"description": "Skills for listing and contributing new token assets to trustwallet/assets",
15+
"source": "./",
16+
"strict": false,
17+
"skills": [
18+
"./skills/add-asset"
19+
]
20+
}
21+
]
22+
}

skills/add-asset/SKILL.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
name: add-asset
3+
description: Add a new token asset to the Trust Wallet assets repository. Use when the user wants to list a token, add a token logo, submit a new asset to trustwallet/assets, update info.json, or fix a logo for an existing token.
4+
---
5+
6+
# Add Asset to Trust Wallet
7+
8+
Step-by-step guide for contributing a new token logo and metadata to [`trustwallet/assets`](https://github.com/trustwallet/assets).
9+
10+
## Before You Start — Requirements
11+
12+
**Brand new tokens are not accepted.** The project must:
13+
- Have a mainnet launch with non-minimal circulation
14+
- Have publicly available information and documentation
15+
- Not exhibit spam-like behavior (e.g. mass airdrops)
16+
17+
Full requirements: `developer.trustwallet.com/listing-new-assets/requirements`
18+
19+
---
20+
21+
## Repository Structure
22+
23+
```
24+
blockchains/
25+
└── <chain>/
26+
└── assets/
27+
└── <address>/
28+
├── logo.png ← required
29+
└── info.json ← required
30+
```
31+
32+
**Chain slug examples**: `ethereum`, `smartchain` (BNB Chain), `polygon`, `solana`, `arbitrum`, `optimism`, `base`, `avalanchec`, `tron`, `ton`, `cosmos`
33+
34+
**Address format**:
35+
- EVM chains: EIP-55 checksum address (e.g. `0xdAC17F958D2ee523a2206206994597C13D831ec7`)
36+
- Solana: base58 mint address
37+
- Other chains: native token ID
38+
39+
---
40+
41+
## Step-by-Step: Adding a Token
42+
43+
### Option A — Web app (easiest, no CLI needed)
44+
Go to `assets.trustwallet.com` and follow the UI. GitHub account required.
45+
46+
### Option B — Manual PR
47+
48+
**1. Fork and clone the repo**
49+
```bash
50+
git clone https://github.com/<your-username>/assets.git
51+
cd assets
52+
```
53+
54+
**2. Scaffold the info.json**
55+
```bash
56+
make add-token asset_id=c60_t0x<ContractAddress>
57+
# Example for USDC on Ethereum:
58+
make add-token asset_id=c60_t0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
59+
```
60+
This creates `blockchains/ethereum/assets/0xA0b86991.../info.json`.
61+
62+
**Asset ID format**:
63+
- `c<slip44>_t<address>` for tokens (c60 = Ethereum, c20000714 = BNB Chain, c501 = Solana)
64+
- Full list of coin IDs: `github.com/trustwallet/wallet-core/blob/master/registry.json`
65+
66+
**3. Fill in info.json**
67+
```json
68+
{
69+
"name": "USD Coin",
70+
"website": "https://centre.io",
71+
"description": "USDC is a fully collateralized US dollar stablecoin.",
72+
"explorer": "https://etherscan.io/token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
73+
"type": "ERC20",
74+
"symbol": "USDC",
75+
"decimals": 6,
76+
"status": "active",
77+
"id": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
78+
"tags": ["stablecoin"],
79+
"links": [
80+
{ "name": "x", "url": "https://x.com/centre_io" },
81+
{ "name": "coinmarketcap", "url": "https://coinmarketcap.com/currencies/usd-coin/" },
82+
{ "name": "coingecko", "url": "https://coingecko.com/en/coins/usd-coin" }
83+
]
84+
}
85+
```
86+
87+
**Required fields**: `name`, `symbol`, `decimals`, `type`, `status`, `id`
88+
89+
**`type` values**: `ERC20`, `BEP20`, `BEP2`, `SPL`, `TRC20`, `POLYGON`, `ARBITRUM`, `OPTIMISM`, `BASE`, `AVAXC`, `TON_JET`
90+
91+
**`status` values**: `active`, `abandoned`, `spam`
92+
93+
**`tags` values**: `stablecoin`, `wrapped`, `defi`, `nft`, `governance`, `meme`, `bridge`
94+
95+
**4. Add logo.png**
96+
97+
Place `logo.png` in the same directory as `info.json`:
98+
```
99+
blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png
100+
```
101+
102+
**Logo requirements**:
103+
- Format: PNG
104+
- Size: exactly **256×256 pixels**
105+
- File size: under **100KB**
106+
- Transparent background preferred
107+
- Must be clearly recognizable at small sizes
108+
109+
**5. Validate**
110+
```bash
111+
make check # full validation — must pass before opening PR
112+
make fix # auto-fix common issues (resizes images, formats JSON)
113+
```
114+
115+
**6. Optionally add to tokenlist**
116+
```bash
117+
make add-tokenlist asset_id=c60_t0x<ContractAddress>
118+
make add-tokenlist-extended asset_id=c60_t0x<ContractAddress>
119+
```
120+
121+
**7. Open a PR** against the `master` branch of `trustwallet/assets`
122+
123+
---
124+
125+
## Common Validation Errors
126+
127+
| Error | Fix |
128+
|-------|-----|
129+
| Logo wrong dimensions | Must be exactly 256×256px — run `make fix` or resize manually |
130+
| Logo file too large | Compress the PNG to under 100KB |
131+
| Address not checksummed | Use EIP-55 checksum — convert with `web3.utils.toChecksumAddress()` |
132+
| Missing required fields | Ensure `name`, `symbol`, `decimals`, `type`, `status`, `id` are all present |
133+
| Invalid `type` value | Must be one of the supported type strings (see above) |
134+
| Duplicate asset | Token already exists — check `blockchains/<chain>/assets/<address>/` |
135+
136+
---
137+
138+
## CDN URL (after merge)
139+
140+
Once merged, the logo is served at:
141+
```
142+
https://assets-cdn.trustwallet.com/blockchains/<chain>/assets/<address>/logo.png
143+
```
144+
145+
Example:
146+
```
147+
https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png
148+
```
149+
150+
---
151+
152+
## Available make commands
153+
154+
```bash
155+
make check # validate entire repo (runs in CI)
156+
make fix # auto-fix resizable/formattable issues
157+
make add-token asset_id=<id> # scaffold info.json
158+
make add-tokenlist asset_id=<id> # add to tokenlist.json
159+
make add-tokenlist-extended asset_id=<id> # add to tokenlist-extended.json
160+
make update-auto # sync from external sources (maintainers only)
161+
```

0 commit comments

Comments
 (0)