AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Astro

skill-ianshk-astro-skills-astro · by ianshk

Skill for building static sites with the Astro web framework. Helps create Astro components and pages, set up content collections, optimize images, configure SEO, and deploy static builds. Use when the user needs to work with Astro, mentions .astro files, asks about static site generation (SSG), islands architecture, content collections, or deploying an Astro project.

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-ianshk-astro-skills-astro

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ianshk-astro-skills-astro)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Astro? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Astro Skill

Reference for building static Astro sites (output: 'static'). Covers architecture decisions, content collections, SEO, image optimization, pagination, and deployment patterns.

Consult docs.astro.build and llms.txt for latest APIs when needed.


References

Read these files for detailed patterns and templates:

| Reference | What it covers | |---|---| | [content-collections.md](./references/content-collections.md) | Schemas (z.image, z.enum, reference()), querying, dynamic routes, entry.body | | [image-optimizations.md](./references/image-optimizations.md) | ` component, downscaling tip, SVG components, aspect ratios | | [seo-checklist.md](./references/seo-checklist.md) | Head component, per-page checklist, structured data (JSON-LD), hreflang, content rules | | [pagination.md](./references/pagination.md) | paginate(), nested pagination, page` prop |


Architecture Rules

1. Astro-first

  • .astro files for everything presentational — zero JS shipped to client.
  • Framework components (.tsx, .svelte, .vue, etc.) only when interactivity is needed.

2. Minimal hydration

Use the lightest client:* directive that works:

| Directive | Use case | |---|---| | client:load | Critical above-the-fold interactivity | | client:idle | Non-critical (modals, popovers) | | client:visible | Below-the-fold widgets | | client:media | Screen-size-specific UI (e.g. mobile sidebar toggle) | | client:only="" | Browser-only APIs (e.g. localStorage, WebGL) |

3. Keep islands small

  • Wrap only the interactive subtree in a framework component. Surrounding static markup stays in .astro.
  • Pass data via props from the .astro parent — never refetch inside islands.

4. Fonts via Fontsource

Always install fonts locally via Fontsource npm packages — never Google Fonts CDN links.

Example if using Inter

npm install @fontsource-variable/inter

Key Patterns

Layout & Head

Use src/layouts/Layout.astro as the base layout. Import with @/layouts/Layout.astro.

Use src/components/Head.astro for SEO meta tags, Open Graph, Twitter Cards, canonical URLs, and JSON-LD structured data. Import it inside your layout — see [seo-checklist.md](./references/seo-checklist.md) for the full component and per-page checklist.

Sitemap

Always include @astrojs/sitemap — it auto-generates sitemap-index.xml at build time. Install and add it to integrations in astro.config.mjs:

npx astro add sitemap

Exclude admin pages, API routes, and utility pages from the sitemap.

robots.txt

Create src/pages/robots.txt.ts — Astro will build it into a static robots.txt file at the site root. It dynamically references the sitemap URL using Astro.site:

import type { APIRoute } from 'astro';

const getRobotsTxt = (sitemapURL: URL) => `\
User-agent: *
Allow: /

Sitemap: ${sitemapURL.href}
`;

export const GET: APIRoute = ({ site }) => {
  const sitemapURL = new URL('sitemap-index.xml', site);
  return new Response(getRobotsTxt(sitemapURL));
};

This requires site to be set in astro.config.mjs so the sitemap URL resolves correctly.

Image optimization

Always use ` from astro:assets — not tags. Set explicit width/height` to downscale large source images (e.g., 10000×10000 → 1024×1024 = smaller WebP output).

Content collections (v5+)

  • Config at src/content.config.ts (NOT src/content/config.ts)
  • Every collection needs a loader (use glob from astro/loaders)
  • Use z.image() for validated, optimized image fields
  • Use z.enum() for constrained values instead of booleans
  • Use reference() for relations between collections

Static output

  • Always use output: 'static' (the default) — all pages are pre-rendered to HTML at build time.
  • Do NOT use output: 'hybrid' — removed in Astro v5.
  • Do NOT use output: 'server' or SSR adapters.

Trailing slashes

  • Set trailingSlash: 'always' in astro.config.mjs to enforce trailing slashes on all generated URLs.
  • Always use trailing slashes in internal links (/about/ not /about) to avoid duplicate content issues.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.