ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
Astro content-first framework - islands architecture, content collections, file-based routing, SSR/SSG hybrid rendering, View Transitions, server islands, multi-framework component support
$ npx -y skills add agents-inc/skills --skill web-meta-framework-astro --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/web-meta-framework-astroContext preview
The summary Claude sees to decide when to auto-load this skill.
Astro content-first framework - islands architecture, content collections, file-based routing, SSR/SSG hybrid rendering, View Transitions, server islands, multi-framework component support
name: web-meta-framework-astro description: Astro content-first framework - islands architecture, content collections, file-based routing, SSR/SSG hybrid rendering, View Transitions, server islands, multi-framework component support
> **Quick Guide:** Astro renders pages to static HTML with zero client JavaScript by default. `.astro` > components carry static content; framework components become interactive islands only when given a > `client:*` directive. Content collections give structured Markdown type-safe frontmatter through Zod > schemas. Rendering mode is per page: static unless `export const prerender = false`. Astro 6 replaced > `<ViewTransitions />` with `<ClientRouter />`, replaced `Astro.glob()` with `import.meta.glob()`, moved > `z` from `astro:content` to `astro/zod` (now Zod 4), requires string `getStaticPaths()` params, and > requires Node 22.12.0+.
**Detailed Resources:**
---
`getStaticPaths()`. Follow [examples/routing.md](examples/routing.md).
those pages, and install a server adapter. Same file, plus the adapter table in [reference.md](reference.md).
static with `export const prerender = true`.
---
<critical_requirements>
**Leave pages static and add `export const prerender = false` only where the page reads request-time data.** Static is the default and is where the framework's speed comes from.
**Install a server adapter before any page opts out of prerendering.** Without one, a build containing `prerender = false` fails.
**Give a framework component a `client:*` directive when it needs to be interactive.** Without a directive it renders to static HTML and its event handlers never run.
**Define collections in `src/content.config.ts` with a Zod schema.** The schema validates frontmatter at build time and generates the types the queries return.
**Use `getStaticPaths()` for dynamic routes in static mode.** On-demand routes read `Astro.params` directly and need no such export.
</critical_requirements>
---
**Auto-detection:** Astro, .astro files, astro.config, islands architecture, client:load, client:visible, client:idle, client:only, client:media, server:defer, content collections, defineCollection, defineLiveCollection, getCollection, getLiveCollection, getEntry, getLiveEntry, render, astro:content, astro:transitions, ClientRouter, getStaticPaths, Astro.props, Astro.params, Astro.cookies, Astro.redirect, prerender, astro add, @astrojs/react, @astrojs/vue, @astrojs/svelte, Starlight
**Applies to:**
**Handled elsewhere:**
library wrote it, and Astro settles only the boundary.
whose default is on-demand rendering rather than one whose default is static output.
---
<philosophy>
Astro is a **content-first framework that ships zero JavaScript by default**. Most of a page is static HTML; small interactive "islands" hydrate independently, each paying only for itself.
Four consequences follow, and they explain most of the API:
1. **A component is static until told otherwise** — `client:*` is the opt-in, so the cost of interactivity is always visible at the call site. 2. **The UI library is a detail** — React, Vue, Svelte, Solid and Preact components are all just island contents, and one page can carry several. 3. **Content is typed data** — collections put a Zod schema between Markdown frontmatter and the code that reads it, so a typo in a post fails the build rather than the page. 4. **Rendering mode is per page** — static and on-demand pages coexist in one project, which is why `prerender` is an export rather than a global setting.
</philosophy>
---
<decision_framework>
**Static or on-demand?** A page needs on-demand rendering when it reads cookies, headers or user-specific data at request time, or when its data changes faster than you are willing to rebuild. Everything
The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation,…