@agnic/wallet-skills 1.3.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +53 -31
- package/package.json +8 -6
- package/skills/agent-email/SKILL.md +88 -0
- package/skills/ai-gateway/SKILL.md +29 -99
- package/skills/ai-gateway/reference/models-and-options.md +68 -0
- package/skills/authenticate-wallet/SKILL.md +49 -27
- package/skills/check-balance/SKILL.md +28 -29
- package/skills/fund-wallet/SKILL.md +24 -23
- package/skills/get-agent-identity/SKILL.md +33 -27
- package/skills/pay-for-service/SKILL.md +32 -59
- package/skills/pay-for-service/reference/x402-protocol.md +36 -0
- package/skills/search-for-service/SKILL.md +19 -12
- package/skills/agent-email.md +0 -21
- package/skills/agnic/SKILL.md +0 -108
- package/skills/ai-gateway.md +0 -22
- package/skills/authenticate-wallet.md +0 -18
- package/skills/check-balance.md +0 -15
- package/skills/fund-wallet.md +0 -17
- package/skills/get-agent-identity.md +0 -19
- package/skills/pay-for-service.md +0 -16
- package/skills/search-for-service.md +0 -15
- package/skills/send-usdc/SKILL.md +0 -96
- package/skills/send-usdc.md +0 -19
- package/skills/trade-tokens/SKILL.md +0 -107
- package/skills/trade-tokens.md +0 -22
package/skills/ai-gateway.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-gateway
|
|
3
|
-
description: Access 340+ AI models through the Agnic AI Gateway. Use when the user wants to chat with AI, generate images, or list available models.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Check auth: `npx agnic@latest status --json`
|
|
9
|
-
2. List models: `npx agnic@latest ai models --json`
|
|
10
|
-
3. Filter by provider: `npx agnic@latest ai models --provider openai --json`
|
|
11
|
-
4. Chat with a model: `npx agnic@latest ai chat --model <provider/model> --prompt "<text>" --json`
|
|
12
|
-
5. Chat with system prompt: `npx agnic@latest ai chat --model <id> --system "<system>" --prompt "<text>" --json`
|
|
13
|
-
6. Generate image: `npx agnic@latest ai image --prompt "<text>" --output image.png`
|
|
14
|
-
7. Generate image with aspect ratio: `npx agnic@latest ai image --prompt "<text>" --aspect-ratio 16:9 --output wide.png`
|
|
15
|
-
|
|
16
|
-
Model format: `provider/model-name` (e.g., `openai/gpt-4o`, `anthropic/claude-3.5-sonnet`, `meta-llama/llama-3.3-70b`).
|
|
17
|
-
Free models: meta-llama, google/gemma, mistralai.
|
|
18
|
-
|
|
19
|
-
## Allowed Tools
|
|
20
|
-
- npx agnic@latest ai models
|
|
21
|
-
- npx agnic@latest ai chat
|
|
22
|
-
- npx agnic@latest ai image
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: authenticate-wallet
|
|
3
|
-
description: Sign in to AgnicPay wallet. Use when the user wants to log in, authenticate, or when any command fails with auth errors.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic status` to check current auth state
|
|
9
|
-
2. If not authenticated, ask user for their email
|
|
10
|
-
3. Run `npx agnic auth login <email>` — sends OTP code to their email
|
|
11
|
-
4. Ask user for the 6-digit code from their email
|
|
12
|
-
5. Run `npx agnic auth verify <flowId> <otp>`
|
|
13
|
-
6. Confirm with `npx agnic status`
|
|
14
|
-
|
|
15
|
-
## Allowed Tools
|
|
16
|
-
- npx agnic status
|
|
17
|
-
- npx agnic auth login
|
|
18
|
-
- npx agnic auth verify
|
package/skills/check-balance.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: check-balance
|
|
3
|
-
description: Check USDC balance across networks. Use when the user asks about their balance, funds, or how much they have.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic balance --json` to get balances across all networks
|
|
9
|
-
2. If user asks about a specific network, use `npx agnic balance --network <network> --json`
|
|
10
|
-
3. Present the balance in a clear format with network and amount
|
|
11
|
-
|
|
12
|
-
Supported networks: base, solana, base-sepolia, solana-devnet
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic balance
|
package/skills/fund-wallet.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fund-wallet
|
|
3
|
-
description: Get instructions for funding your AgnicPay wallet. Use when the user needs to add funds, deposit, or top up.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Check current balance: `npx agnic balance --json`
|
|
9
|
-
2. Show the wallet address: `npx agnic address`
|
|
10
|
-
3. Provide funding instructions:
|
|
11
|
-
- Visit https://pay.agnic.ai to fund via the dashboard
|
|
12
|
-
- Or send USDC directly to the displayed wallet address on Base or Solana
|
|
13
|
-
4. After funding, verify with `npx agnic balance --json`
|
|
14
|
-
|
|
15
|
-
## Allowed Tools
|
|
16
|
-
- npx agnic balance
|
|
17
|
-
- npx agnic address
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: get-agent-identity
|
|
3
|
-
description: Check agent's on-chain identity, trust score, and KYA credentials. Use when the user asks about agent identity, trust, reputation, or credentials.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Check auth status: `npx agnic status --json`
|
|
9
|
-
2. If authenticated, show the agent's wallet address and identity info
|
|
10
|
-
3. Explain what ERC-8004 agent identity provides:
|
|
11
|
-
- On-chain identity (NFT-based)
|
|
12
|
-
- Trust score and reputation
|
|
13
|
-
- KYA (Know Your Agent) credentials for identity verification
|
|
14
|
-
- Delegation credentials for authorized actions
|
|
15
|
-
4. Direct user to https://pay.agnic.ai for full identity management
|
|
16
|
-
|
|
17
|
-
## Allowed Tools
|
|
18
|
-
- npx agnic status
|
|
19
|
-
- npx agnic address
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pay-for-service
|
|
3
|
-
description: Make a paid request to an x402-enabled API. Use when the user wants to call, use, or pay for an API service.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm the API URL and HTTP method with the user
|
|
9
|
-
2. Check balance: `npx agnic balance --network base --json`
|
|
10
|
-
3. Execute: `npx agnic x402 pay <url> --method <METHOD> --json`
|
|
11
|
-
4. If the request needs a body, add `--body '{"key":"value"}'`
|
|
12
|
-
5. Present the API response and cost to the user
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic balance
|
|
16
|
-
- npx agnic x402 pay
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: search-for-service
|
|
3
|
-
description: Search for x402-enabled APIs and services. Use when the user wants to find, discover, or browse available paid APIs.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic x402 search "<query>" --json` with the user's search terms
|
|
9
|
-
2. Present results with name, description, and price per request
|
|
10
|
-
3. If user wants to filter by category, add `--category <category>`
|
|
11
|
-
|
|
12
|
-
Available categories: AI, Crypto, Data, Trading, Finance, Weather
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic x402 search
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: send-usdc
|
|
3
|
-
description: Send USDC to an Ethereum address or ENS name. Use when you or the user want to send money, pay someone, transfer USDC, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like "send $5 to", "pay 0x...", "transfer to vitalik.eth", "tip someone", "send USDC".
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest status*)", "Bash(npx agnic@latest send *)", "Bash(npx agnic@latest balance*)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Sending USDC
|
|
10
|
-
|
|
11
|
-
Use the `npx agnic@latest send` command to transfer USDC from the wallet to any Ethereum address or ENS name on Base.
|
|
12
|
-
|
|
13
|
-
## Confirm wallet is initialized and authed
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npx agnic@latest status
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
If the wallet is not authenticated, refer to the `authenticate-wallet` skill.
|
|
20
|
-
|
|
21
|
-
## Command Syntax
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npx agnic@latest send <amount> <recipient> [--chain <chain>] [--json]
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Arguments
|
|
28
|
-
|
|
29
|
-
| Argument | Description |
|
|
30
|
-
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
31
|
-
| `amount` | Amount to send: `'$1.00'`, `1.00`, or atomic units (1000000 = $1). Always single-quote amounts that use `$` to prevent bash variable expansion. If the number looks like atomic units (no decimal or > 100), treat as atomic units. |
|
|
32
|
-
| `recipient` | Ethereum address (0x...) or ENS name (vitalik.eth) |
|
|
33
|
-
|
|
34
|
-
## Options
|
|
35
|
-
|
|
36
|
-
| Option | Description |
|
|
37
|
-
| ---------------- | ---------------------------------- |
|
|
38
|
-
| `--chain <name>` | Blockchain network (default: base) |
|
|
39
|
-
| `--json` | Output result as JSON |
|
|
40
|
-
|
|
41
|
-
## Input Validation
|
|
42
|
-
|
|
43
|
-
Before constructing the command, validate all user-provided values to prevent shell injection:
|
|
44
|
-
|
|
45
|
-
- **amount**: Must match `^\$?[\d.]+$` (digits, optional decimal point, optional `$` prefix). Reject if it contains spaces, semicolons, pipes, backticks, or other shell metacharacters.
|
|
46
|
-
- **recipient**: Must be a valid `0x` hex address (`^0x[0-9a-fA-F]{40}$`) or an ENS name (`^[a-zA-Z0-9.-]+\.eth$`). Reject any value containing spaces or shell metacharacters.
|
|
47
|
-
|
|
48
|
-
Do not pass unvalidated user input into the command.
|
|
49
|
-
|
|
50
|
-
## USDC Amounts
|
|
51
|
-
|
|
52
|
-
| Format | Example | Description |
|
|
53
|
-
| ------------- | ---------------------- | -------------------------------------- |
|
|
54
|
-
| Dollar prefix | `'$1.00'`, `'$0.50'` | USD notation (single-quote the `$`) |
|
|
55
|
-
| Decimal | `1.0`, `0.50` | Human-readable with decimal point |
|
|
56
|
-
| Whole number | `5`, `100` | Interpreted as whole USDC tokens |
|
|
57
|
-
| Atomic units | `500000` | Large integers treated as atomic units |
|
|
58
|
-
|
|
59
|
-
**IMPORTANT**: Always single-quote amounts that use `$` to prevent bash variable expansion (e.g. `'$1.00'` not `$1.00`).
|
|
60
|
-
|
|
61
|
-
## ENS Resolution
|
|
62
|
-
|
|
63
|
-
ENS names are automatically resolved to addresses via Ethereum mainnet. The command will:
|
|
64
|
-
1. Detect ENS names (any string containing `.eth`)
|
|
65
|
-
2. Resolve the name to an address
|
|
66
|
-
3. Display both the ENS name and resolved address in the output
|
|
67
|
-
|
|
68
|
-
## Examples
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Send $1.00 USDC to an address
|
|
72
|
-
npx agnic@latest send 1 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7
|
|
73
|
-
|
|
74
|
-
# Send $0.50 USDC to an ENS name
|
|
75
|
-
npx agnic@latest send 0.50 vitalik.eth
|
|
76
|
-
|
|
77
|
-
# Send with dollar sign prefix (note the single quotes)
|
|
78
|
-
npx agnic@latest send '$5.00' 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7
|
|
79
|
-
|
|
80
|
-
# Get JSON output
|
|
81
|
-
npx agnic@latest send 1 vitalik.eth --json
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Prerequisites
|
|
85
|
-
|
|
86
|
-
- Must be authenticated (`npx agnic@latest status` to check)
|
|
87
|
-
- Wallet must have sufficient USDC balance (`npx agnic@latest balance` to check)
|
|
88
|
-
|
|
89
|
-
## Error Handling
|
|
90
|
-
|
|
91
|
-
Common errors:
|
|
92
|
-
|
|
93
|
-
- "Not authenticated" — Run `npx agnic@latest auth login` first
|
|
94
|
-
- "Insufficient balance" — Check balance with `npx agnic@latest balance`
|
|
95
|
-
- "Could not resolve ENS name" — Verify the ENS name exists
|
|
96
|
-
- "Invalid recipient" — Must be valid 0x address or ENS name
|
package/skills/send-usdc.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: send-usdc
|
|
3
|
-
description: Send USDC to a wallet address. Use when the user wants to send, transfer, or pay someone USDC.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm the recipient address and amount with the user
|
|
9
|
-
2. Check balance first: `npx agnic balance --network base --json`
|
|
10
|
-
3. If sufficient funds, execute: `npx agnic send <amount> <address> --json`
|
|
11
|
-
4. Report the transaction hash and explorer link
|
|
12
|
-
|
|
13
|
-
Optional flags:
|
|
14
|
-
- `--network <network>` — default is "base"
|
|
15
|
-
- `--memo <text>` — attach a memo to the transaction
|
|
16
|
-
|
|
17
|
-
## Allowed Tools
|
|
18
|
-
- npx agnic balance
|
|
19
|
-
- npx agnic send
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: trade-tokens
|
|
3
|
-
description: Swap or trade tokens on Base network. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and WETH. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH", "swap tokens", "trade USDC for WETH".
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest status*)", "Bash(npx agnic@latest trade *)", "Bash(npx agnic@latest balance*)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Trading Tokens
|
|
10
|
-
|
|
11
|
-
Use the `npx agnic@latest trade` command to swap tokens on Base network. You must be authenticated to trade.
|
|
12
|
-
|
|
13
|
-
## Confirm wallet is initialized and authed
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npx agnic@latest status
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
If the wallet is not authenticated, refer to the `authenticate-wallet` skill.
|
|
20
|
-
|
|
21
|
-
## Command Syntax
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npx agnic@latest trade <amount> <from> <to> [options]
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Arguments
|
|
28
|
-
|
|
29
|
-
| Argument | Description |
|
|
30
|
-
| -------- | ---------------------------------------------------------------------- |
|
|
31
|
-
| `amount` | Amount to swap (see Amount Formats below) |
|
|
32
|
-
| `from` | Source token: alias (usdc, eth, weth) or contract address (0x...) |
|
|
33
|
-
| `to` | Destination token: alias (usdc, eth, weth) or contract address (0x...) |
|
|
34
|
-
|
|
35
|
-
## Amount Formats
|
|
36
|
-
|
|
37
|
-
| Format | Example | Description |
|
|
38
|
-
| ------------- | ---------------------- | -------------------------------------- |
|
|
39
|
-
| Dollar prefix | `'$1.00'`, `'$0.50'` | USD notation (decimals based on token) |
|
|
40
|
-
| Decimal | `1.0`, `0.50`, `0.001` | Human-readable with decimal point |
|
|
41
|
-
| Whole number | `5`, `100` | Interpreted as whole tokens |
|
|
42
|
-
| Atomic units | `500000` | Large integers treated as atomic units |
|
|
43
|
-
|
|
44
|
-
**Auto-detection**: Large integers without a decimal point are treated as atomic units. For example, `500000` for USDC (6 decimals) = $0.50.
|
|
45
|
-
|
|
46
|
-
**IMPORTANT**: Always single-quote amounts that use `$` to prevent bash variable expansion (e.g. `'$1.00'` not `$1.00`).
|
|
47
|
-
|
|
48
|
-
## Token Aliases
|
|
49
|
-
|
|
50
|
-
| Alias | Token | Decimals | Address |
|
|
51
|
-
| ----- | ----- | -------- | ------------------------------------------ |
|
|
52
|
-
| usdc | USDC | 6 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
|
|
53
|
-
| eth | ETH | 18 | 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE |
|
|
54
|
-
| weth | WETH | 18 | 0x4200000000000000000000000000000000000006 |
|
|
55
|
-
|
|
56
|
-
## Options
|
|
57
|
-
|
|
58
|
-
| Option | Description |
|
|
59
|
-
| -------------------- | --------------------------------------------- |
|
|
60
|
-
| `-s, --slippage <n>` | Slippage tolerance in basis points (100 = 1%) |
|
|
61
|
-
| `--json` | Output result as JSON |
|
|
62
|
-
|
|
63
|
-
## Input Validation
|
|
64
|
-
|
|
65
|
-
Before constructing the command, validate all user-provided values to prevent shell injection:
|
|
66
|
-
|
|
67
|
-
- **amount**: Must match `^\$?[\d.]+$` (digits, optional decimal point, optional `$` prefix). Reject if it contains spaces, semicolons, pipes, backticks, or other shell metacharacters.
|
|
68
|
-
- **from / to**: Must be a known alias (`usdc`, `eth`, `weth`) or a valid `0x` hex address (`^0x[0-9a-fA-F]{40}$`). Reject any other value.
|
|
69
|
-
- **slippage**: Must be a positive integer (`^\d+$`).
|
|
70
|
-
|
|
71
|
-
Do not pass unvalidated user input into the command.
|
|
72
|
-
|
|
73
|
-
## Examples
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# Swap $1 USDC for ETH (dollar prefix — note the single quotes)
|
|
77
|
-
npx agnic@latest trade '$1' usdc eth
|
|
78
|
-
|
|
79
|
-
# Swap 0.50 USDC for ETH (decimal format)
|
|
80
|
-
npx agnic@latest trade 0.50 usdc eth
|
|
81
|
-
|
|
82
|
-
# Swap 0.01 ETH for USDC
|
|
83
|
-
npx agnic@latest trade 0.01 eth usdc
|
|
84
|
-
|
|
85
|
-
# Swap with custom slippage (2%)
|
|
86
|
-
npx agnic@latest trade '$5' usdc eth --slippage 200
|
|
87
|
-
|
|
88
|
-
# Get JSON output
|
|
89
|
-
npx agnic@latest trade '$1' usdc eth --json
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Prerequisites
|
|
93
|
-
|
|
94
|
-
- Must be authenticated (`npx agnic@latest status` to check)
|
|
95
|
-
- Wallet must have sufficient balance of the source token
|
|
96
|
-
- Trading is only available on Base mainnet
|
|
97
|
-
|
|
98
|
-
## Error Handling
|
|
99
|
-
|
|
100
|
-
Common errors:
|
|
101
|
-
|
|
102
|
-
- "Not authenticated" — Run `npx agnic@latest auth login` first
|
|
103
|
-
- "Invalid token" — Use a valid alias (usdc, eth, weth) or 0x address
|
|
104
|
-
- "Cannot swap a token to itself" — From and to must be different
|
|
105
|
-
- "Swap failed: TRANSFER_FROM_FAILED" — Insufficient balance or approval issue
|
|
106
|
-
- "No liquidity" — Try a smaller amount or different token pair
|
|
107
|
-
- "Amount has X decimals but token only supports Y" — Too many decimal places
|
package/skills/trade-tokens.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: trade-tokens
|
|
3
|
-
description: Trade/swap tokens on Base. Use when the user wants to buy, sell, swap, trade, or exchange tokens like ETH, USDC, DAI, AERO, cbETH.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm which tokens to trade and the amount
|
|
9
|
-
2. Check balance: `npx agnic balance --network base --json`
|
|
10
|
-
3. Optionally preview: `npx agnic trade <amount> <sellToken> <buyToken> --dry-run --json`
|
|
11
|
-
4. Execute trade: `npx agnic trade <amount> <sellToken> <buyToken> --json`
|
|
12
|
-
5. Report results: tokens received, price, transaction hash
|
|
13
|
-
|
|
14
|
-
Supported tokens: USDC, ETH, WETH, cbETH, DAI, AERO
|
|
15
|
-
|
|
16
|
-
Optional flags:
|
|
17
|
-
- `--slippage <percent>` — max slippage percentage (default: 1.0)
|
|
18
|
-
- `--dry-run` — show quote without executing
|
|
19
|
-
|
|
20
|
-
## Allowed Tools
|
|
21
|
-
- npx agnic balance
|
|
22
|
-
- npx agnic trade
|