From 70b407b05fb90fc38d6af9c1bbd10124bf6a3329 Mon Sep 17 00:00:00 2001 From: NieZhuZhu Date: Mon, 20 Jul 2026 21:55:47 +0800 Subject: [PATCH] docs: use yarn commands in agent instruction files to match yarn.lock .cursorrules, CLAUDE.md, and .github/copilot-instructions.md all taught npm run asset:set/verify/list, but the repo's only lockfile is yarn.lock and CI installs with yarn --frozen-lockfile. Switch the commands to their yarn form in all three files (keeping the two pointer stubs byte-identical twins) and add the missing yarn bootstrap note to the canonical doc. Co-Authored-By: Claude Fable 5 Change-Id: Id941d5838ede9da33686becd7444771a0ac3ee06 --- .cursorrules | 6 +++--- .github/copilot-instructions.md | 22 ++++++++++++---------- CLAUDE.md | 6 +++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.cursorrules b/.cursorrules index 995ba6bcf1..12599a0908 100644 --- a/.cursorrules +++ b/.cursorrules @@ -9,8 +9,8 @@ This repository uses a CLI tool for managing CAIP-19 contract metadata and icons. **Main commands:** -- `npm run asset:set` - Add or update an asset -- `npm run asset:verify` - Verify asset files -- `npm run asset:list` - List assets in a namespace +- `yarn asset:set` - Add or update an asset +- `yarn asset:verify` - Verify asset files +- `yarn asset:list` - List assets in a namespace For detailed usage, parameters, examples, and workflow, refer to the canonical documentation in `.github/copilot-instructions.md`. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f6e8abfe06..c25d65cf07 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,6 +4,8 @@ This repository uses a CLI tool (`cli-update-asset.js`) to manage contract metadata and icons following the CAIP-19 standard. +Install dependencies first with `yarn` (the repo pins them via `yarn.lock`, which is what CI installs from). + ### Available Commands #### 1. Add or Update an Asset @@ -12,7 +14,7 @@ Use the `set` command to add a new asset or update an existing one: ```bash # Add a new asset with all required fields -npm run asset:set -- \ +yarn asset:set \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" \ --name "Token Name" \ --symbol "SYMBOL" \ @@ -20,12 +22,12 @@ npm run asset:set -- \ --image ./path/to/logo.svg # Add or update labels for an asset -npm run asset:set -- \ +yarn asset:set \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" \ --labels "stable_coin,blue_chip" # Or use a direct URL for the image -npm run asset:set -- \ +yarn asset:set \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" \ --name "Token Name" \ --symbol "SYMBOL" \ @@ -33,12 +35,12 @@ npm run asset:set -- \ --image "https://example.com/logo.png" # Update only specific fields of an existing asset -npm run asset:set -- \ +yarn asset:set \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" \ --name "Updated Token Name" # Update just the image -npm run asset:set -- \ +yarn asset:set \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" \ --image ./new-logo.svg ``` @@ -67,7 +69,7 @@ npm run asset:set -- \ Check if an asset's metadata and icon files are valid: ```bash -npm run asset:verify -- \ +yarn asset:verify \ --caip "eip155:1/erc20:0xTOKEN_ADDRESS" ``` @@ -77,16 +79,16 @@ List all assets in a specific namespace: ```bash # List all Ethereum Mainnet assets -npm run asset:list -- --namespace "eip155:1" +yarn asset:list --namespace "eip155:1" # List all Polygon assets -npm run asset:list -- --namespace "eip155:137" +yarn asset:list --namespace "eip155:137" ``` ### Workflow -1. **Add or update** an asset using `npm run asset:set` -2. **Verify** the changes using `npm run asset:verify` +1. **Add or update** an asset using `yarn asset:set` +2. **Verify** the changes using `yarn asset:verify` 3. **Rebuild** the contract-map.json: `node buildindex.js` 4. **Review** the changes in git 5. **Commit and push** your changes diff --git a/CLAUDE.md b/CLAUDE.md index f2c6e2f64c..a963206c1d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,8 +9,8 @@ This repository uses a CLI tool for managing CAIP-19 contract metadata and icons. **Main commands:** -- `npm run asset:set` - Add or update an asset -- `npm run asset:verify` - Verify asset files -- `npm run asset:list` - List assets in a namespace +- `yarn asset:set` - Add or update an asset +- `yarn asset:verify` - Verify asset files +- `yarn asset:list` - List assets in a namespace For detailed usage, parameters, examples, and workflow, refer to the canonical documentation in `.github/copilot-instructions.md`.