eigen-skills 1.0.1 → 1.1.1

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/README.md CHANGED
@@ -1,16 +1,8 @@
1
- <p align="center">
2
- <h1 align="center">eigen-skills</h1>
3
- <p align="center">
4
- <strong>EigenLayer Agent Skills — Plug-and-play AI agent capabilities for the entire EigenLayer stack</strong>
5
- </p>
6
- <p align="center">
7
- <a href="#installation">Installation</a> •
8
- <a href="#skills-overview">Skills</a> •
9
- <a href="#architecture">Architecture</a> •
10
- <a href="#usage">Usage</a> •
11
- <a href="#api-reference">API Reference</a>
12
- </p>
13
- </p>
1
+ # eigen-skills
2
+
3
+ **EigenLayer Agent Skills — Plug-and-play AI agent capabilities for the entire EigenLayer stack**
4
+
5
+ [Installation](#installation) | [Skills](#skills-overview) | [Architecture](#architecture) | [Usage](#usage) | [API Reference](#api-reference)
14
6
 
15
7
  ---
16
8
 
@@ -126,20 +118,29 @@ npx skills add zeeshan8281/eigen-skills
126
118
 
127
119
  ## Installation
128
120
 
129
- ### For AI Agents (Primary Method)
121
+ ### For Claude Code (one command)
130
122
 
131
123
  ```bash
132
- npx skills add zeeshan8281/eigen-skills
124
+ npm install eigen-skills
133
125
  ```
134
126
 
135
- This clones the skills into your agent's skill directory. The agent will auto-discover the `SKILL.md` files.
127
+ That's it. The postinstall script automatically copies the `SKILL.md` into `.claude/skills/eigen/` — Claude Code discovers it instantly. Just set your API key:
136
128
 
137
- ### For Programmatic Use (npm)
129
+ ```bash
130
+ export EIGEN_API_KEY="your-key-here"
131
+ ```
132
+
133
+ Then open Claude Code and ask anything about EigenLayer.
134
+
135
+ ### Alternative: curl (no npm)
138
136
 
139
137
  ```bash
140
- npm install eigen-skills
138
+ mkdir -p .claude/skills/eigen
139
+ curl -o .claude/skills/eigen/SKILL.md https://raw.githubusercontent.com/zeeshan8281/eigen-agent-skills/main/SKILL.md
141
140
  ```
142
141
 
142
+ ### For Programmatic Use (JavaScript)
143
+
143
144
  ```javascript
144
145
  const { EigenAPI, AVSAPI, RewardsAPI, DelegationAPI, EigenCompute, EigenDA } = require('eigen-skills');
145
146
  ```
package/SKILL.md ADDED
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: eigen-skills
3
+ description: "Query live EigenLayer data — restaking, operators, AVS, rewards, delegation, stakers, TVL, deposits, withdrawals, EigenCompute TEE, and EigenDA blob storage via EigenExplorer API"
4
+ version: 1.0.1
5
+ metadata:
6
+ emoji: "🔄"
7
+ tags: ["eigenlayer", "restaking", "avs", "operators", "rewards", "delegation", "eigencompute", "eigenda"]
8
+ user-invocable: true
9
+ ---
10
+
11
+ # EigenLayer Skills for Claude Code
12
+
13
+ One-command integration: drop this file into your project and Claude Code can query live EigenLayer data.
14
+
15
+ ## Setup
16
+
17
+ ```bash
18
+ curl -o SKILL.md https://raw.githubusercontent.com/zeeshan8281/eigen-agent-skills/main/SKILL.md
19
+ ```
20
+
21
+ Get a free API key at https://developer.eigenexplorer.com and set it:
22
+
23
+ ```bash
24
+ export EIGEN_API_KEY="your-key-here"
25
+ ```
26
+
27
+ ## Data Source
28
+
29
+ **EigenExplorer API** — `https://api.eigenexplorer.com`
30
+ - Auth: `x-api-token` header
31
+ - Testnet: `https://api-holesky.eigenexplorer.com`
32
+
33
+ ---
34
+
35
+ ## 1. Ecosystem Metrics
36
+
37
+ Use when the user asks about EigenLayer stats, total TVL, total stakers, total operators, or an ecosystem overview.
38
+
39
+ ### Get ecosystem metrics
40
+ ```bash
41
+ curl -s "https://api.eigenexplorer.com/metrics" -H "x-api-token: $EIGEN_API_KEY"
42
+ ```
43
+
44
+ ### Get historical TVL
45
+ ```bash
46
+ curl -s "https://api.eigenexplorer.com/metrics/historical/tvl" -H "x-api-token: $EIGEN_API_KEY"
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 2. Operators
52
+
53
+ Use when the user asks about EigenLayer operators, top operators, operator details, or operator search.
54
+
55
+ ### List operators (sorted by staker count)
56
+ ```bash
57
+ curl -s "https://api.eigenexplorer.com/operators?withTvl=true&sortByTotalStakers=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
58
+ ```
59
+
60
+ ### List operators by TVL
61
+ ```bash
62
+ curl -s "https://api.eigenexplorer.com/operators?withTvl=true&sortByTvl=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
63
+ ```
64
+
65
+ ### List operators by APY
66
+ ```bash
67
+ curl -s "https://api.eigenexplorer.com/operators?withTvl=true&sortByApy=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
68
+ ```
69
+
70
+ ### Search operators by name
71
+ ```bash
72
+ curl -s "https://api.eigenexplorer.com/operators?searchByText=NAME&withTvl=true" -H "x-api-token: $EIGEN_API_KEY"
73
+ ```
74
+
75
+ ### Get a specific operator
76
+ ```bash
77
+ curl -s "https://api.eigenexplorer.com/operators/0xOPERATOR_ADDRESS?withTvl=true" -H "x-api-token: $EIGEN_API_KEY"
78
+ ```
79
+
80
+ ### Get stakers delegating to an operator
81
+ ```bash
82
+ curl -s "https://api.eigenexplorer.com/operators/0xOPERATOR_ADDRESS/stakers?take=20" -H "x-api-token: $EIGEN_API_KEY"
83
+ ```
84
+
85
+ ### Get all operator addresses (lightweight)
86
+ ```bash
87
+ curl -s "https://api.eigenexplorer.com/operators/addresses" -H "x-api-token: $EIGEN_API_KEY"
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 3. Stakers
93
+
94
+ Use when the user asks about a specific staker's position, deposits, withdrawals, or delegation.
95
+
96
+ ### Get staker info
97
+ ```bash
98
+ curl -s "https://api.eigenexplorer.com/stakers/0xSTAKER_ADDRESS" -H "x-api-token: $EIGEN_API_KEY"
99
+ ```
100
+
101
+ ### Get staker deposits
102
+ ```bash
103
+ curl -s "https://api.eigenexplorer.com/stakers/0xSTAKER_ADDRESS/deposits?take=20" -H "x-api-token: $EIGEN_API_KEY"
104
+ ```
105
+
106
+ ### Get staker withdrawals
107
+ ```bash
108
+ curl -s "https://api.eigenexplorer.com/stakers/0xSTAKER_ADDRESS/withdrawals?take=20" -H "x-api-token: $EIGEN_API_KEY"
109
+ ```
110
+
111
+ ### Get staker rewards
112
+ ```bash
113
+ curl -s "https://api.eigenexplorer.com/stakers/0xSTAKER_ADDRESS/rewards" -H "x-api-token: $EIGEN_API_KEY"
114
+ ```
115
+
116
+ ---
117
+
118
+ ## 4. AVS (Actively Validated Services)
119
+
120
+ Use when the user asks about AVS, which services exist, operators/stakers per AVS, or comparing AVS.
121
+
122
+ ### List all AVS (sorted by TVL)
123
+ ```bash
124
+ curl -s "https://api.eigenexplorer.com/avs?withTvl=true&sortByTvl=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
125
+ ```
126
+
127
+ ### List AVS by APY
128
+ ```bash
129
+ curl -s "https://api.eigenexplorer.com/avs?withTvl=true&sortByApy=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
130
+ ```
131
+
132
+ ### Search AVS by name
133
+ ```bash
134
+ curl -s "https://api.eigenexplorer.com/avs?searchByText=NAME&withTvl=true" -H "x-api-token: $EIGEN_API_KEY"
135
+ ```
136
+
137
+ ### Get a specific AVS
138
+ ```bash
139
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS?withTvl=true" -H "x-api-token: $EIGEN_API_KEY"
140
+ ```
141
+
142
+ ### Get operators registered to an AVS
143
+ ```bash
144
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS/operators?take=20" -H "x-api-token: $EIGEN_API_KEY"
145
+ ```
146
+
147
+ ### Get stakers for an AVS
148
+ ```bash
149
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS/stakers?take=20" -H "x-api-token: $EIGEN_API_KEY"
150
+ ```
151
+
152
+ ### Get rewards distributed by an AVS
153
+ ```bash
154
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS/rewards" -H "x-api-token: $EIGEN_API_KEY"
155
+ ```
156
+
157
+ ### Get registration events for an AVS
158
+ ```bash
159
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS/events/registration?take=20" -H "x-api-token: $EIGEN_API_KEY"
160
+ ```
161
+
162
+ ### Get operator-sets for an AVS
163
+ ```bash
164
+ curl -s "https://api.eigenexplorer.com/avs/0xAVS_ADDRESS/operator-sets?take=20" -H "x-api-token: $EIGEN_API_KEY"
165
+ ```
166
+
167
+ ---
168
+
169
+ ## 5. Rewards & Yield
170
+
171
+ Use when the user asks about rewards, APY, yield, best operators/AVS by returns, or how much a staker is earning.
172
+
173
+ ### Top operators by APY
174
+ ```bash
175
+ curl -s "https://api.eigenexplorer.com/operators?withTvl=true&sortByApy=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
176
+ ```
177
+
178
+ ### Top AVS by APY
179
+ ```bash
180
+ curl -s "https://api.eigenexplorer.com/avs?withTvl=true&sortByApy=desc&take=10" -H "x-api-token: $EIGEN_API_KEY"
181
+ ```
182
+
183
+ ### Get rewards for a specific operator
184
+ ```bash
185
+ curl -s "https://api.eigenexplorer.com/operators/0xOPERATOR_ADDRESS/rewards" -H "x-api-token: $EIGEN_API_KEY"
186
+ ```
187
+
188
+ ---
189
+
190
+ ## 6. Deposits & Withdrawals (Global)
191
+
192
+ Use when the user asks about recent deposits/withdrawals across the whole protocol.
193
+
194
+ ### Get recent deposits
195
+ ```bash
196
+ curl -s "https://api.eigenexplorer.com/deposits?take=20" -H "x-api-token: $EIGEN_API_KEY"
197
+ ```
198
+
199
+ ### Get recent withdrawals
200
+ ```bash
201
+ curl -s "https://api.eigenexplorer.com/withdrawals?take=20" -H "x-api-token: $EIGEN_API_KEY"
202
+ ```
203
+
204
+ ---
205
+
206
+ ## 7. Delegation & Events
207
+
208
+ Use when the user asks about delegation events, who is delegating to whom, or operator registration events.
209
+
210
+ ### Get delegation events
211
+ ```bash
212
+ curl -s "https://api.eigenexplorer.com/events/delegation?take=20" -H "x-api-token: $EIGEN_API_KEY"
213
+ ```
214
+
215
+ ### Get operator registration events
216
+ ```bash
217
+ curl -s "https://api.eigenexplorer.com/events/registration-status?take=20" -H "x-api-token: $EIGEN_API_KEY"
218
+ ```
219
+
220
+ ### Get all operator-sets
221
+ ```bash
222
+ curl -s "https://api.eigenexplorer.com/operator-sets?take=20" -H "x-api-token: $EIGEN_API_KEY"
223
+ ```
224
+
225
+ ---
226
+
227
+ ## 8. EigenCompute (TEE)
228
+
229
+ Use when the user asks about deploying to EigenCompute, TEE, EigenCloud, attestation, or app management.
230
+
231
+ **Requires:** `npm install -g @layr-labs/ecloud-cli`
232
+
233
+ ### Authentication
234
+ ```bash
235
+ ecloud auth login
236
+ ecloud auth whoami
237
+ ```
238
+
239
+ ### Deploy an app
240
+ ```bash
241
+ ecloud compute app create --name my-app --language typescript
242
+ ecloud compute app deploy
243
+ ```
244
+ Always use **"Build and deploy from Dockerfile"** — deploy from registry is unreliable.
245
+
246
+ ### Manage apps
247
+ ```bash
248
+ ecloud compute app list
249
+ ecloud compute app info <APP_ID>
250
+ ecloud compute app logs <APP_ID>
251
+ ecloud compute app start <APP_ID>
252
+ ecloud compute app stop <APP_ID>
253
+ ecloud compute app terminate <APP_ID>
254
+ ecloud compute app upgrade <APP_ID>
255
+ ```
256
+
257
+ ### Set sealed secrets
258
+ ```bash
259
+ ecloud compute app env set MY_SECRET="value" API_KEY="key"
260
+ ```
261
+
262
+ ### TEE attestation
263
+ Inside the TEE, the KMS signing key is at `/usr/local/bin/kms-signing-public-key.pem`. Verify at `https://verify-sepolia.eigencloud.xyz`.
264
+
265
+ ---
266
+
267
+ ## 9. EigenDA (Data Availability)
268
+
269
+ Use when the user asks about storing/retrieving data on EigenDA, blob storage, or data availability.
270
+
271
+ **Requires:** EigenDA Proxy running locally:
272
+ ```bash
273
+ docker run -d --name eigenda-proxy -p 3100:3100 \
274
+ ghcr.io/layr-labs/eigenda-proxy:latest \
275
+ --eigenda.disperser-rpc=disperser-sepolia.eigenda.xyz:443 \
276
+ --eigenda.service-manager-addr=0xD4A7E1Bd8015057293f0D0A557088c286942e84b \
277
+ --eigenda.eth-rpc=YOUR_SEPOLIA_RPC_URL \
278
+ --eigenda.status-query-timeout=45s \
279
+ --eigenda.signer-private-key-hex=YOUR_PRIVATE_KEY \
280
+ --memstore.enabled=false --eigenda.disable-tls=false
281
+ ```
282
+
283
+ ### Store a blob
284
+ ```bash
285
+ curl -s -X POST "http://127.0.0.1:3100/put?commitment_mode=standard" \
286
+ -H "Content-Type: application/json" \
287
+ -d '{"key": "value"}'
288
+ ```
289
+
290
+ ### Retrieve a blob
291
+ ```bash
292
+ curl -s "http://127.0.0.1:3100/get/COMMITMENT_HASH?commitment_mode=standard"
293
+ ```
294
+
295
+ ### Health check
296
+ ```bash
297
+ curl -s "http://127.0.0.1:3100/health"
298
+ ```
299
+
300
+ ### View blob on explorer
301
+ ```
302
+ https://blobs-sepolia.eigenda.xyz/blobs/COMMITMENT_HASH
303
+ ```
304
+
305
+ ---
306
+
307
+ ## Query Parameters Reference
308
+
309
+ | Parameter | Used On | Values | Description |
310
+ |-----------|---------|--------|-------------|
311
+ | `withTvl` | operators, avs | `true`/`false` | Include TVL calculations |
312
+ | `sortByTvl` | operators, avs | `asc`/`desc` | Sort by TVL |
313
+ | `sortByApy` | operators, avs | `asc`/`desc` | Sort by APY |
314
+ | `sortByTotalStakers` | operators, avs | `asc`/`desc` | Sort by staker count |
315
+ | `sortByTotalAvs` | operators | `asc`/`desc` | Sort by AVS count |
316
+ | `searchByText` | operators, avs | string | Case-insensitive name search |
317
+ | `skip` | all list endpoints | number | Pagination offset (default: 0) |
318
+ | `take` | all list endpoints | number | Results per page (default: 12) |
319
+
320
+ ## Response Formatting
321
+
322
+ When presenting results to users:
323
+ - **Bold names** and abbreviate addresses (`0x1234...abcd`)
324
+ - TVL in human-readable form ("$1.2B" not "1200000000")
325
+ - APY as percentages ("4.2% APY")
326
+ - Show staker counts and operator counts
327
+ - Use bullet points, not tables
328
+ - Flag high APY + low TVL as potentially risky
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "eigen-skills",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "Agent Skills for EigenLayer — restaking, AVS, operators, rewards, delegation data powered by EigenExplorer API",
5
5
  "main": "index.js",
6
6
  "agents": {
7
7
  "skills": "skills/"
8
8
  },
9
9
  "scripts": {
10
+ "postinstall": "node scripts/postinstall.js",
10
11
  "test": "node scripts/test-all.js",
11
- "demo": "node scripts/demo.js"
12
+ "demo": "node scripts/demo.js",
13
+ "ui": "node server.js"
12
14
  },
13
15
  "keywords": [
14
16
  "eigenlayer",
@@ -24,6 +26,9 @@
24
26
  "author": "zeeshan8281",
25
27
  "license": "MIT",
26
28
  "dependencies": {
27
- "axios": "^1.7.0"
29
+ "axios": "^1.7.0",
30
+ "dotenv": "^17.3.1",
31
+ "express": "^5.2.1",
32
+ "socket.io": "^4.8.3"
28
33
  }
29
- }
34
+ }
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ // Resolve symlinks to get the real path, then find the package root
7
+ const scriptDir = fs.realpathSync(__dirname);
8
+ const packageDir = path.resolve(scriptDir, '..');
9
+ const src = path.join(packageDir, 'SKILL.md');
10
+
11
+ if (!fs.existsSync(src)) {
12
+ process.exit(0);
13
+ }
14
+
15
+ // Walk up from the original __dirname (may be symlinked) to find project root
16
+ // npm sets INIT_CWD to where `npm install` was run
17
+ const projectRoot = process.env.INIT_CWD || path.resolve(packageDir, '..', '..');
18
+
19
+ // Don't run if we're installing our own deps
20
+ if (path.resolve(projectRoot) === path.resolve(packageDir)) {
21
+ process.exit(0);
22
+ }
23
+
24
+ if (!fs.existsSync(path.join(projectRoot, 'package.json'))) {
25
+ process.exit(0);
26
+ }
27
+
28
+ const destDir = path.join(projectRoot, '.claude', 'skills', 'eigen');
29
+ const dest = path.join(destDir, 'SKILL.md');
30
+
31
+ try {
32
+ fs.mkdirSync(destDir, { recursive: true });
33
+ fs.copyFileSync(src, dest);
34
+ console.log('\n⚡ eigen-skills: SKILL.md installed to .claude/skills/eigen/');
35
+ console.log(' Claude Code can now query live EigenLayer data.');
36
+ console.log(' Set your API key: export EIGEN_API_KEY="your-key"\n');
37
+ } catch (err) {
38
+ // Silent fail — don't break the user's install
39
+ }