opencode-skills-antigravity 0.0.3 → 0.0.5
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/bundled-skills/astro/SKILL.md +359 -0
- package/bundled-skills/browser-extension-builder/SKILL.md +0 -12
- package/bundled-skills/devcontainer-setup/SKILL.md +3 -0
- package/bundled-skills/docs/contributors/skill-anatomy.md +24 -3
- package/bundled-skills/docs/users/faq.md +3 -0
- package/bundled-skills/goldrush-api/SKILL.md +109 -0
- package/bundled-skills/hono/SKILL.md +348 -0
- package/bundled-skills/openclaw-github-repo-commander/SKILL.md +95 -0
- package/bundled-skills/pydantic-ai/SKILL.md +350 -0
- package/bundled-skills/sveltekit/SKILL.md +286 -0
- package/dist/index.js +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: astro
|
|
3
|
+
description: "Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support."
|
|
4
|
+
category: frontend
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
date_added: "2026-03-18"
|
|
8
|
+
author: suhaibjanjua
|
|
9
|
+
tags: [astro, ssg, ssr, islands, content, markdown, mdx, performance]
|
|
10
|
+
tools: [claude, cursor, gemini]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Astro Web Framework
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Astro is a web framework designed for content-rich websites — blogs, docs, portfolios, marketing sites, and e-commerce. Its core innovation is the **Islands Architecture**: by default, Astro ships zero JavaScript to the browser. Interactive components are selectively hydrated as isolated "islands." Astro supports React, Vue, Svelte, Solid, and other UI frameworks simultaneously in the same project, letting you pick the right tool per component.
|
|
18
|
+
|
|
19
|
+
## When to Use This Skill
|
|
20
|
+
|
|
21
|
+
- Use when building a blog, documentation site, marketing page, or portfolio
|
|
22
|
+
- Use when performance and Core Web Vitals are the top priority
|
|
23
|
+
- Use when the project is content-heavy with Markdown or MDX files
|
|
24
|
+
- Use when you want SSG (static) output with optional SSR for dynamic routes
|
|
25
|
+
- Use when the user asks about `.astro` files, `Astro.props`, content collections, or `client:` directives
|
|
26
|
+
|
|
27
|
+
## How It Works
|
|
28
|
+
|
|
29
|
+
### Step 1: Project Setup
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm create astro@latest my-site
|
|
33
|
+
cd my-site
|
|
34
|
+
npm install
|
|
35
|
+
npm run dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Add integrations as needed:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx astro add tailwind # Tailwind CSS
|
|
42
|
+
npx astro add react # React component support
|
|
43
|
+
npx astro add mdx # MDX support
|
|
44
|
+
npx astro add sitemap # Auto sitemap.xml
|
|
45
|
+
npx astro add vercel # Vercel SSR adapter
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Project structure:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
src/
|
|
52
|
+
pages/ ← File-based routing (.astro, .md, .mdx)
|
|
53
|
+
layouts/ ← Reusable page shells
|
|
54
|
+
components/ ← UI components (.astro, .tsx, .vue, etc.)
|
|
55
|
+
content/ ← Type-safe content collections (Markdown/MDX)
|
|
56
|
+
styles/ ← Global CSS
|
|
57
|
+
public/ ← Static assets (copied as-is)
|
|
58
|
+
astro.config.mjs ← Framework config
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 2: Astro Component Syntax
|
|
62
|
+
|
|
63
|
+
`.astro` files have a code fence at the top (server-only) and a template below:
|
|
64
|
+
|
|
65
|
+
```astro
|
|
66
|
+
---
|
|
67
|
+
// src/components/Card.astro
|
|
68
|
+
// This block runs on the server ONLY — never in the browser
|
|
69
|
+
interface Props {
|
|
70
|
+
title: string;
|
|
71
|
+
href: string;
|
|
72
|
+
description: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const { title, href, description } = Astro.props;
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
<article class="card">
|
|
79
|
+
<h2><a href={href}>{title}</a></h2>
|
|
80
|
+
<p>{description}</p>
|
|
81
|
+
</article>
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
/* Scoped to this component automatically */
|
|
85
|
+
.card { border: 1px solid #eee; padding: 1rem; }
|
|
86
|
+
</style>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Step 3: File-Based Pages and Routing
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
src/pages/index.astro → /
|
|
93
|
+
src/pages/about.astro → /about
|
|
94
|
+
src/pages/blog/[slug].astro → /blog/:slug (dynamic)
|
|
95
|
+
src/pages/blog/[...path].astro → /blog/* (catch-all)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Dynamic route with `getStaticPaths`:
|
|
99
|
+
|
|
100
|
+
```astro
|
|
101
|
+
---
|
|
102
|
+
// src/pages/blog/[slug].astro
|
|
103
|
+
export async function getStaticPaths() {
|
|
104
|
+
const posts = await getCollection('blog');
|
|
105
|
+
return posts.map(post => ({
|
|
106
|
+
params: { slug: post.slug },
|
|
107
|
+
props: { post },
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const { post } = Astro.props;
|
|
112
|
+
const { Content } = await post.render();
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
<h1>{post.data.title}</h1>
|
|
116
|
+
<Content />
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Step 4: Content Collections
|
|
120
|
+
|
|
121
|
+
Content collections give you type-safe access to Markdown and MDX files:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// src/content/config.ts
|
|
125
|
+
import { z, defineCollection } from 'astro:content';
|
|
126
|
+
|
|
127
|
+
const blog = defineCollection({
|
|
128
|
+
type: 'content',
|
|
129
|
+
schema: z.object({
|
|
130
|
+
title: z.string(),
|
|
131
|
+
date: z.coerce.date(),
|
|
132
|
+
tags: z.array(z.string()).default([]),
|
|
133
|
+
draft: z.boolean().default(false),
|
|
134
|
+
}),
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export const collections = { blog };
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```astro
|
|
141
|
+
---
|
|
142
|
+
// src/pages/blog/index.astro
|
|
143
|
+
import { getCollection } from 'astro:content';
|
|
144
|
+
|
|
145
|
+
const posts = (await getCollection('blog'))
|
|
146
|
+
.filter(p => !p.data.draft)
|
|
147
|
+
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
<ul>
|
|
151
|
+
{posts.map(post => (
|
|
152
|
+
<li>
|
|
153
|
+
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
|
154
|
+
<time>{post.data.date.toLocaleDateString()}</time>
|
|
155
|
+
</li>
|
|
156
|
+
))}
|
|
157
|
+
</ul>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Step 5: Islands — Selective Hydration
|
|
161
|
+
|
|
162
|
+
By default, UI framework components render to static HTML with no JS. Use `client:` directives to hydrate:
|
|
163
|
+
|
|
164
|
+
```astro
|
|
165
|
+
---
|
|
166
|
+
import Counter from '../components/Counter.tsx'; // React component
|
|
167
|
+
import VideoPlayer from '../components/VideoPlayer.svelte';
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
<!-- Static HTML — no JavaScript sent to browser -->
|
|
171
|
+
<Counter initialCount={0} />
|
|
172
|
+
|
|
173
|
+
<!-- Hydrate immediately on page load -->
|
|
174
|
+
<Counter initialCount={0} client:load />
|
|
175
|
+
|
|
176
|
+
<!-- Hydrate when the component scrolls into view -->
|
|
177
|
+
<VideoPlayer src="/demo.mp4" client:visible />
|
|
178
|
+
|
|
179
|
+
<!-- Hydrate only when browser is idle -->
|
|
180
|
+
<Analytics client:idle />
|
|
181
|
+
|
|
182
|
+
<!-- Hydrate only on a specific media query -->
|
|
183
|
+
<MobileMenu client:media="(max-width: 768px)" />
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Step 6: Layouts
|
|
187
|
+
|
|
188
|
+
```astro
|
|
189
|
+
---
|
|
190
|
+
// src/layouts/BaseLayout.astro
|
|
191
|
+
interface Props {
|
|
192
|
+
title: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
}
|
|
195
|
+
const { title, description = 'My Astro Site' } = Astro.props;
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
<html lang="en">
|
|
199
|
+
<head>
|
|
200
|
+
<meta charset="utf-8" />
|
|
201
|
+
<title>{title}</title>
|
|
202
|
+
<meta name="description" content={description} />
|
|
203
|
+
</head>
|
|
204
|
+
<body>
|
|
205
|
+
<nav>...</nav>
|
|
206
|
+
<main>
|
|
207
|
+
<slot /> <!-- page content renders here -->
|
|
208
|
+
</main>
|
|
209
|
+
<footer>...</footer>
|
|
210
|
+
</body>
|
|
211
|
+
</html>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```astro
|
|
215
|
+
---
|
|
216
|
+
// src/pages/about.astro
|
|
217
|
+
import BaseLayout from '../layouts/BaseLayout.astro';
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
<BaseLayout title="About Us">
|
|
221
|
+
<h1>About Us</h1>
|
|
222
|
+
<p>Welcome to our company...</p>
|
|
223
|
+
</BaseLayout>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Step 7: SSR Mode (On-Demand Rendering)
|
|
227
|
+
|
|
228
|
+
Enable SSR for dynamic pages by setting an adapter:
|
|
229
|
+
|
|
230
|
+
```javascript
|
|
231
|
+
// astro.config.mjs
|
|
232
|
+
import { defineConfig } from 'astro/config';
|
|
233
|
+
import vercel from '@astrojs/vercel/serverless';
|
|
234
|
+
|
|
235
|
+
export default defineConfig({
|
|
236
|
+
output: 'hybrid', // 'static' | 'server' | 'hybrid'
|
|
237
|
+
adapter: vercel(),
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Opt individual pages into SSR with `export const prerender = false`.
|
|
242
|
+
|
|
243
|
+
## Examples
|
|
244
|
+
|
|
245
|
+
### Example 1: Blog with RSS Feed
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
// src/pages/rss.xml.ts
|
|
249
|
+
import rss from '@astrojs/rss';
|
|
250
|
+
import { getCollection } from 'astro:content';
|
|
251
|
+
|
|
252
|
+
export async function GET(context) {
|
|
253
|
+
const posts = await getCollection('blog');
|
|
254
|
+
return rss({
|
|
255
|
+
title: 'My Blog',
|
|
256
|
+
description: 'Latest posts',
|
|
257
|
+
site: context.site,
|
|
258
|
+
items: posts.map(post => ({
|
|
259
|
+
title: post.data.title,
|
|
260
|
+
pubDate: post.data.date,
|
|
261
|
+
link: `/blog/${post.slug}/`,
|
|
262
|
+
})),
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Example 2: API Endpoint (SSR)
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
// src/pages/api/subscribe.ts
|
|
271
|
+
import type { APIRoute } from 'astro';
|
|
272
|
+
|
|
273
|
+
export const POST: APIRoute = async ({ request }) => {
|
|
274
|
+
const { email } = await request.json();
|
|
275
|
+
|
|
276
|
+
if (!email) {
|
|
277
|
+
return new Response(JSON.stringify({ error: 'Email required' }), {
|
|
278
|
+
status: 400,
|
|
279
|
+
headers: { 'Content-Type': 'application/json' },
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
await addToNewsletter(email);
|
|
284
|
+
return new Response(JSON.stringify({ success: true }), { status: 200 });
|
|
285
|
+
};
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Example 3: React Component as Island
|
|
289
|
+
|
|
290
|
+
```tsx
|
|
291
|
+
// src/components/SearchBox.tsx
|
|
292
|
+
import { useState } from 'react';
|
|
293
|
+
|
|
294
|
+
export default function SearchBox() {
|
|
295
|
+
const [query, setQuery] = useState('');
|
|
296
|
+
const [results, setResults] = useState([]);
|
|
297
|
+
|
|
298
|
+
async function search(e: React.FormEvent) {
|
|
299
|
+
e.preventDefault();
|
|
300
|
+
const data = await fetch(`/api/search?q=${query}`).then(r => r.json());
|
|
301
|
+
setResults(data);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return (
|
|
305
|
+
<form onSubmit={search}>
|
|
306
|
+
<input value={query} onChange={e => setQuery(e.target.value)} />
|
|
307
|
+
<button type="submit">Search</button>
|
|
308
|
+
<ul>{results.map(r => <li key={r.id}>{r.title}</li>)}</ul>
|
|
309
|
+
</form>
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
```astro
|
|
315
|
+
---
|
|
316
|
+
import SearchBox from '../components/SearchBox.tsx';
|
|
317
|
+
---
|
|
318
|
+
<!-- Hydrated immediately — this island is interactive -->
|
|
319
|
+
<SearchBox client:load />
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## Best Practices
|
|
323
|
+
|
|
324
|
+
- ✅ Keep most components as static `.astro` files — only hydrate what must be interactive
|
|
325
|
+
- ✅ Use content collections for all Markdown/MDX content — you get type safety and auto-validation
|
|
326
|
+
- ✅ Prefer `client:visible` over `client:load` for below-the-fold components to reduce initial JS
|
|
327
|
+
- ✅ Use `import.meta.env` for environment variables — prefix public vars with `PUBLIC_`
|
|
328
|
+
- ✅ Add `<ViewTransitions />` from `astro:transitions` for smooth page navigation without a full SPA
|
|
329
|
+
- ❌ Don't use `client:load` on every component — this defeats Astro's performance advantage
|
|
330
|
+
- ❌ Don't put secrets in `.astro` frontmatter that gets used in client-facing templates
|
|
331
|
+
- ❌ Don't skip `getStaticPaths` for dynamic routes in static mode — builds will fail
|
|
332
|
+
|
|
333
|
+
## Security & Safety Notes
|
|
334
|
+
|
|
335
|
+
- Frontmatter code in `.astro` files runs server-side only and is never exposed to the browser.
|
|
336
|
+
- Use `import.meta.env.PUBLIC_*` only for non-sensitive values. Private env vars (no `PUBLIC_` prefix) are never sent to the client.
|
|
337
|
+
- When using SSR mode, validate all `Astro.request` inputs before database queries or API calls.
|
|
338
|
+
- Sanitize any user-supplied content before rendering with `set:html` — it bypasses auto-escaping.
|
|
339
|
+
|
|
340
|
+
## Common Pitfalls
|
|
341
|
+
|
|
342
|
+
- **Problem:** JavaScript from a React/Vue component doesn't run in the browser
|
|
343
|
+
**Solution:** Add a `client:` directive (`client:load`, `client:visible`, etc.) — without it, components render as static HTML only.
|
|
344
|
+
|
|
345
|
+
- **Problem:** `getStaticPaths` data is stale after content updates during dev
|
|
346
|
+
**Solution:** Astro's dev server watches content files — restart if changes to `content/config.ts` are not reflected.
|
|
347
|
+
|
|
348
|
+
- **Problem:** `Astro.props` type is `any` — no autocomplete
|
|
349
|
+
**Solution:** Define a `Props` interface or type in the frontmatter and Astro will infer it automatically.
|
|
350
|
+
|
|
351
|
+
- **Problem:** CSS from a `.astro` component bleeds into other components
|
|
352
|
+
**Solution:** Styles in `.astro` `<style>` tags are automatically scoped. Use `:global()` only when intentionally targeting children.
|
|
353
|
+
|
|
354
|
+
## Related Skills
|
|
355
|
+
|
|
356
|
+
- `@sveltekit` — When you need a full-stack framework with reactive UI (vs Astro's content focus)
|
|
357
|
+
- `@nextjs-app-router-patterns` — When you need a React-first full-stack framework
|
|
358
|
+
- `@tailwind-patterns` — Styling Astro sites with Tailwind CSS
|
|
359
|
+
- `@progressive-web-app` — Adding PWA capabilities to an Astro site
|
|
@@ -34,9 +34,6 @@ Structure for modern browser extensions
|
|
|
34
34
|
|
|
35
35
|
**When to use**: When starting a new extension
|
|
36
36
|
|
|
37
|
-
```javascript
|
|
38
|
-
## Extension Architecture
|
|
39
|
-
|
|
40
37
|
### Project Structure
|
|
41
38
|
```
|
|
42
39
|
extension/
|
|
@@ -91,7 +88,6 @@ Popup ←→ Background (Service Worker) ←→ Content Script
|
|
|
91
88
|
↓
|
|
92
89
|
chrome.storage
|
|
93
90
|
```
|
|
94
|
-
```
|
|
95
91
|
|
|
96
92
|
### Content Scripts
|
|
97
93
|
|
|
@@ -99,9 +95,6 @@ Code that runs on web pages
|
|
|
99
95
|
|
|
100
96
|
**When to use**: When modifying or reading page content
|
|
101
97
|
|
|
102
|
-
```javascript
|
|
103
|
-
## Content Scripts
|
|
104
|
-
|
|
105
98
|
### Basic Content Script
|
|
106
99
|
```javascript
|
|
107
100
|
// content.js - Runs on every matched page
|
|
@@ -159,7 +152,6 @@ injectUI();
|
|
|
159
152
|
}]
|
|
160
153
|
}
|
|
161
154
|
```
|
|
162
|
-
```
|
|
163
155
|
|
|
164
156
|
### Storage and State
|
|
165
157
|
|
|
@@ -167,9 +159,6 @@ Persisting extension data
|
|
|
167
159
|
|
|
168
160
|
**When to use**: When saving user settings or data
|
|
169
161
|
|
|
170
|
-
```javascript
|
|
171
|
-
## Storage and State
|
|
172
|
-
|
|
173
162
|
### Chrome Storage API
|
|
174
163
|
```javascript
|
|
175
164
|
// Save data
|
|
@@ -218,7 +207,6 @@ async function setStorage(data) {
|
|
|
218
207
|
const { settings } = await getStorage(['settings']);
|
|
219
208
|
await setStorage({ settings: { ...settings, theme: 'dark' } });
|
|
220
209
|
```
|
|
221
|
-
```
|
|
222
210
|
|
|
223
211
|
## Anti-Patterns
|
|
224
212
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devcontainer-setup
|
|
3
3
|
description: Creates devcontainers with Claude Code, language-specific tooling (Python/Node/Rust/Go), and persistent volumes. Use when adding devcontainer support to a project, setting up isolated development environments, or configuring sandboxed Claude Code workspaces.
|
|
4
|
+
risk: safe
|
|
5
|
+
source: vibeship-spawner-skills (Apache 2.0)
|
|
6
|
+
date_added: 2026-03-06
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# Devcontainer Setup Skill
|
|
@@ -45,6 +45,8 @@ The frontmatter is at the very top, wrapped in `---`:
|
|
|
45
45
|
---
|
|
46
46
|
name: my-skill-name
|
|
47
47
|
description: "Brief description of what this skill does"
|
|
48
|
+
risk: safe
|
|
49
|
+
source: community
|
|
48
50
|
---
|
|
49
51
|
```
|
|
50
52
|
|
|
@@ -59,9 +61,26 @@ description: "Brief description of what this skill does"
|
|
|
59
61
|
#### `description`
|
|
60
62
|
- **What it is:** One-sentence summary
|
|
61
63
|
- **Format:** String in quotes
|
|
62
|
-
- **Length:** Keep it under
|
|
64
|
+
- **Length:** Keep it under 200 characters
|
|
63
65
|
- **Example:** `"Stripe payment integration patterns including checkout, subscriptions, and webhooks"`
|
|
64
66
|
|
|
67
|
+
#### `risk`
|
|
68
|
+
- **What it is:** The safety classification of the skill
|
|
69
|
+
- **Values:** `none` | `safe` | `critical` | `offensive` | `unknown`
|
|
70
|
+
- **Example:** `risk: safe`
|
|
71
|
+
- **Guide:**
|
|
72
|
+
- `none` — pure text/reasoning, no commands or mutations
|
|
73
|
+
- `safe` — reads files, runs non-destructive commands
|
|
74
|
+
- `critical` — modifies state, deletes files, pushes to production
|
|
75
|
+
- `offensive` — pentesting/red-team tools; **must** include "Authorized Use Only" warning
|
|
76
|
+
- `unknown` — legacy or unclassified; prefer a concrete level for new skills
|
|
77
|
+
|
|
78
|
+
#### `source`
|
|
79
|
+
- **What it is:** Attribution for the skill's origin
|
|
80
|
+
- **Format:** URL or a short label
|
|
81
|
+
- **Examples:** `source: community`, `source: "https://example.com/original"`
|
|
82
|
+
- **Use `"self"`** if you are the original author
|
|
83
|
+
|
|
65
84
|
### Optional Fields
|
|
66
85
|
|
|
67
86
|
Some skills include additional metadata:
|
|
@@ -70,9 +89,11 @@ Some skills include additional metadata:
|
|
|
70
89
|
---
|
|
71
90
|
name: my-skill-name
|
|
72
91
|
description: "Brief description"
|
|
73
|
-
|
|
74
|
-
|
|
92
|
+
risk: safe
|
|
93
|
+
source: community
|
|
94
|
+
author: "your-name-or-handle"
|
|
75
95
|
tags: ["react", "typescript", "testing"]
|
|
96
|
+
tools: [claude, cursor, gemini]
|
|
76
97
|
---
|
|
77
98
|
```
|
|
78
99
|
|
|
@@ -37,6 +37,9 @@ Start from:
|
|
|
37
37
|
- ✅ **Cursor** (AI IDE)
|
|
38
38
|
- ✅ **Antigravity IDE**
|
|
39
39
|
- ✅ **OpenCode**
|
|
40
|
+
- ✅ **Kiro CLI** (Amazon)
|
|
41
|
+
- ✅ **Kiro IDE** (Amazon)
|
|
42
|
+
- ✅ **AdaL CLI**
|
|
40
43
|
- ⚠️ **GitHub Copilot** (partial support via copy-paste)
|
|
41
44
|
|
|
42
45
|
### Are these skills free to use?
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: goldrush-api
|
|
3
|
+
description: "Query blockchain data across 100+ chains: wallet balances, token prices, transactions, DEX pairs, and real-time OHLCV streams via the GoldRush API by Covalent."
|
|
4
|
+
category: blockchain
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
date_added: "2026-03-17"
|
|
8
|
+
author: covalenthq
|
|
9
|
+
tags: [blockchain, crypto, web3, api, defi, wallet, multi-chain]
|
|
10
|
+
tools: [claude, cursor, gemini, codex, copilot]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# GoldRush API
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
GoldRush by Covalent provides blockchain data across 100+ chains through a unified REST API, real-time WebSocket streams, a CLI, and an x402 pay-per-request proxy. This skill enables AI agents to query wallet balances, token prices, transaction history, NFT holdings, and DEX pair data without building chain-specific integrations.
|
|
17
|
+
|
|
18
|
+
## When to Use This Skill
|
|
19
|
+
- Retrieving wallet token balances or total portfolio value across any chain
|
|
20
|
+
- Fetching transaction history or decoded event logs for an address
|
|
21
|
+
- Getting current or historical token prices (USD or native)
|
|
22
|
+
- Monitoring DEX pairs, liquidity events, and real-time OHLCV candles via WebSocket
|
|
23
|
+
- Building block explorers, portfolio dashboards, tax tools, or DeFi analytics
|
|
24
|
+
- Accessing on-chain data with no signup via x402 pay-per-request
|
|
25
|
+
|
|
26
|
+
## How It Works
|
|
27
|
+
|
|
28
|
+
### Step 1: Get credentials
|
|
29
|
+
Sign up at https://goldrush.dev for a free API key. For agent-native no-signup access, use the x402 proxy instead.
|
|
30
|
+
|
|
31
|
+
### Step 2: Set your API key
|
|
32
|
+
```bash
|
|
33
|
+
export GOLDRUSH_API_KEY="your_api_key_here"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 3: Query data
|
|
37
|
+
|
|
38
|
+
**REST API (most endpoints):**
|
|
39
|
+
```bash
|
|
40
|
+
# Wallet token balances on Ethereum
|
|
41
|
+
curl -H "Authorization: Bearer $GOLDRUSH_API_KEY" "https://api.covalenthq.com/v1/eth-mainnet/address/0xADDRESS/balances_v2/"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**CLI (quick terminal queries):**
|
|
45
|
+
```bash
|
|
46
|
+
npx @covalenthq/goldrush-cli balances --chain eth-mainnet --address 0xADDRESS
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**SDK (in code):**
|
|
50
|
+
```javascript
|
|
51
|
+
import GoldRushClient from "@covalenthq/client-sdk";
|
|
52
|
+
const client = new GoldRushClient(process.env.GOLDRUSH_API_KEY);
|
|
53
|
+
const resp = await client.BalanceService.getTokenBalancesForWalletAddress(
|
|
54
|
+
"eth-mainnet", "0xADDRESS"
|
|
55
|
+
);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
### Example 1: Token Balances
|
|
61
|
+
```bash
|
|
62
|
+
curl -H "Authorization: Bearer $GOLDRUSH_API_KEY" "https://api.covalenthq.com/v1/eth-mainnet/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/balances_v2/"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Example 2: Token Price History
|
|
66
|
+
```bash
|
|
67
|
+
curl -H "Authorization: Bearer $GOLDRUSH_API_KEY" "https://api.covalenthq.com/v1/pricing/historical_by_addresses_v2/eth-mainnet/USD/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Example 3: Transaction History
|
|
71
|
+
```bash
|
|
72
|
+
curl -H "Authorization: Bearer $GOLDRUSH_API_KEY" "https://api.covalenthq.com/v1/eth-mainnet/address/0xADDRESS/transactions_v3/"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Example 4: Real-time OHLCV via WebSocket
|
|
76
|
+
```javascript
|
|
77
|
+
// Stream live price candles for a token pair
|
|
78
|
+
const ws = new WebSocket("wss://streaming.covalenthq.com/v1/eth-mainnet/ohlcv");
|
|
79
|
+
ws.on("message", (data) => console.log(JSON.parse(data)));
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Best Practices
|
|
83
|
+
✅ Use chain slugs: `eth-mainnet`, `matic-mainnet`, `base-mainnet`, `bsc-mainnet` — full list at https://goldrush.dev/docs/networks
|
|
84
|
+
✅ Store API key in `GOLDRUSH_API_KEY` env var — never hardcode
|
|
85
|
+
✅ Use WebSocket streams for real-time data rather than polling REST
|
|
86
|
+
✅ Use SDK cursor pagination for large result sets
|
|
87
|
+
❌ Don't use x402 for high-volume use cases — get a standard API key instead
|
|
88
|
+
❌ Don't use chain IDs (e.g., `1`) — use chain slugs (e.g., `eth-mainnet`)
|
|
89
|
+
|
|
90
|
+
## Security & Safety Notes
|
|
91
|
+
- API key in `GOLDRUSH_API_KEY` environment variable only
|
|
92
|
+
- x402 payments use USDC on Base — set spending limits before autonomous agent use
|
|
93
|
+
- Read-only data API — no write operations, no transaction signing
|
|
94
|
+
|
|
95
|
+
## Common Pitfalls
|
|
96
|
+
|
|
97
|
+
**Problem:** 401 Unauthorized
|
|
98
|
+
**Solution:** Ensure API key is in `Authorization: Bearer` header, not query string
|
|
99
|
+
|
|
100
|
+
**Problem:** `chain_name not found`
|
|
101
|
+
**Solution:** Use chain slug format — see https://goldrush.dev/docs/networks
|
|
102
|
+
|
|
103
|
+
**Problem:** Empty results for new wallet
|
|
104
|
+
**Solution:** Some endpoints require on-chain activity; new wallets with no transactions return empty arrays, not errors
|
|
105
|
+
|
|
106
|
+
## Related Skills
|
|
107
|
+
- @goldrush-streaming-api — real-time WebSocket DEX pair and OHLCV streams
|
|
108
|
+
- @goldrush-x402 — pay-per-request blockchain data without API key
|
|
109
|
+
- @goldrush-cli — terminal-first blockchain data queries
|