Astro Sites Managerのロゴ

Astro Sites Manager

コミュニティ
fabricioctelles
astro-sites-manager

Astro v7プロジェクトの構築、移行、保守を網羅したスキルです。公式のAGENTS.mdに基づくベストプラクティス、v6からv7への移行手順、破壊的変更や非推奨パターンの検証、AIを活用した開発サーバーの使い方(バックグラウンドモード、JSONログ)、src/fetch.tsを使った高度なルーティング、ルートキャッシュ、Sätteri Markdown、Rustコンパイラを扱います。ユーザーが「Astro」「.astroファイル」「astro dev」「astro build」「islands architecture」「content collections」「SSG」「SSR adapter」「Astro 7へのアップグレード」「Astroの移行」「Astro v7」「Astro v6」「Sätteri」「ルートキャッシュ」「Astro.cache」「astro dev --background」「src/fetch.ts」「高度なルーティング」「Hono + Astro」「Rolldown」「Vite 8」「queued rendering」「CDN cache provider」「Astro AI」「関連コンテンツ」「関連記事」「Astroのベクトル埋め込み」「astro-related-content」について言及した場合、またはAstroでの静的サイト生成について質問した場合に使用します。

概要

公開者fabricioctelles
リポジトリskills
スキル名astro-sites-manager
スター
87
フォーク
7
同梱ファイル
12
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 12個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    fabricioctellesがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Astro Sites Manager」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/fabricioctelles/skills/tree/main/skills/astro-sites-manager
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fabricioctelles/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/astro-sites-manager .claude/skills/astro-sites-manager
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAstro Sites Managerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAstro Sites Managerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Astro Sites Managerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Astro Framework — v7

MCP Documentation Access

This skill works alongside the Astro Docs MCP server. Before answering Astro questions, check if the astro-docs MCP tool is available and query it for the latest documentation. The MCP server provides real-time access to docs.astro.build and is the single source of truth for current APIs.

MCP Server: astro-docs
Tool: search_astro_docs

If the MCP server is unavailable, fall back to the reference material in this skill and https://docs.astro.build.


Best Practices

Component Design

  • One .astro component per file. Keep components small and focused.
  • Use frontmatter (---) for data fetching and logic; template below for markup only.
  • Prefer Astro components over framework components unless client interactivity is needed.
  • Use client:* directives sparingly — each adds JavaScript to the bundle.
  • Directive hierarchy: client:idle > client:visible > client:load (prefer lazy).

Routing & Pages

  • Use file-based routing in src/pages/. Dynamic routes: [slug].astro, [...path].astro.
  • Always export getStaticPaths() for prerendered dynamic routes.
  • For SSR pages: export const prerender = false at the top.
  • Use src/fetch.ts (v7) only when you need control beyond middleware — don't use it for simple auth.

Content Collections

  • Define schemas in content.config.ts with Zod — never trust untyped content.
  • Use getCollection() for lists, getEntry() for single items.
  • Prefer glob() loader for local files, custom loaders for CMS data.

Performance

  • Default to static (prerender = true). Use SSR only for personalized/dynamic content.
  • Use <Image /> from astro:assets — never raw <img> for local images.
  • Prefer Sätteri (default v7) over unified for Markdown — it's significantly faster.
  • Use Server Islands (server:defer) for mixing static shells with dynamic fragments.

Styling

  • Scoped <style> in .astro files is default and preferred.
  • Use is:global only when truly needed (third-party component styling).
  • Tailwind: install with astro add tailwind, don't configure manually.

TypeScript

  • Run astro sync after changing content schemas or env variables.
  • Run astro check before committing — catches template type errors other tools miss.
  • Use astro:env/server and astro:env/client for typed env variables (never process.env directly).

Development Workflow

  • Use astro dev for HMR. Never use python -m http.server or other static servers.
  • Use astro add for official integrations — don't manually edit config for them.
  • Use astro build && astro preview to test production behavior locally.
  • In AI agent workflows: use astro dev --background and validate via /_astro/status.

CLI Commands

bash
npx astro dev              # Dev server (foreground)
npx astro dev --background # Dev server (detached, for AI agents)
npx astro dev --json       # Dev server with JSON structured logs
npx astro build            # Production build
npx astro preview          # Serve production build locally
npx astro check            # Type checking and diagnostics
npx astro sync             # Generate TypeScript types
npx astro add <integration># Install and configure integration

Background Dev Server (AI Agents)

When working as an AI agent, use background mode:

bash
# Start (blocks until ready, then detaches)
astro dev --background
# → Dev server running at http://localhost:4321 (pid 12345)

# Check status
astro dev status

# Read logs
astro dev logs

# Stop
astro dev stop

# Health check endpoint (JSON)
curl http://localhost:4321/_astro/status
# → {"ok": true}

Key behaviors:

  • Lockfile prevents duplicate instances — starting again returns existing instance
  • All commands are idempotent (stop when not running = silent success)
  • Auto-detected when running inside an AI agent (no flag needed)
  • Opt out: ASTRO_DEV_BACKGROUND=0 astro dev

Project Structure

src/
├── pages/          # File-based routing (.astro, .md, .mdx)
├── layouts/        # Reusable page layouts
├── components/     # Astro & framework components
├── content/        # Content collections (type-safe)
├── middleware.ts   # Request middleware
├── fetch.ts        # Advanced routing (v7, optional)
├── styles/         # Global CSS
├── assets/         # Optimized assets (images, fonts)
├── actions/        # Server actions
└── env.d.ts        # Environment type declarations
astro.config.mjs    # Main configuration
content.config.ts   # Content collection schemas
tsconfig.json       # TypeScript config

Configuration (v7)

typescript
import { defineConfig, memoryCache, logHandlers } from 'astro/config';

export default defineConfig({
  // Output mode
  output: 'static', // or configure per-page with server adapter

  // Route caching (stable in v7)
  cache: {
    provider: memoryCache(),
  },
  routeRules: {
    '/blog/[...path]': { maxAge: 300, swr: 60 },
  },

  // Logger (stable in v7)
  logger: logHandlers.json(), // or .console(), or .compose(...)

  // Markdown (Sätteri is default in v7)
  markdown: {
    // No config needed for defaults (GFM, smartypants, heading IDs)
    // For extra features:
    // processor: satteri({ features: { directive: true, math: true } })
  },

  // Advanced routing file (default: src/fetch.ts)
  // fetchFile: null, // disable if src/fetch.ts is used for other purposes

  // Whitespace (v7 default: 'jsx')
  compressHTML: 'jsx', // or true (v6 behavior), or false (preserve all)
});

Islands Architecture (client:* directives)

astro
<!-- Load immediately (interactive above the fold) -->
<Counter client:load />

<!-- Load when browser is idle (non-critical interactivity) -->
<Newsletter client:idle />

<!-- Load when scrolled into viewport (below the fold) -->
<Comments client:visible />

<!-- Load on media query match (mobile-only widget) -->
<MobileMenu client:media="(max-width: 768px)" />

<!-- Client-only, skip SSR entirely (browser APIs needed) -->
<MapWidget client:only="react" />

<!-- Server Island: static shell, fetched at request time (v6+) -->
<UserGreeting server:defer />

Decision guide: No directive (default) = zero JS, static HTML. Add directive only when user interaction is required.


Image Optimization

astro
---
import { Image } from 'astro:assets';
import heroImage from '../assets/hero.jpg';
---
<!-- Local image (optimized, lazy-loaded, responsive) -->
<Image src={heroImage} alt="Hero" width={1200} />

<!-- Remote image (must allowlist domain in config) -->
<Image src="https://cdn.example.com/photo.jpg" alt="Photo" width={800} height={600} />

Config for remote images:

typescript
// astro.config.mjs
image: {
  domains: ['cdn.example.com'],
  remotePatterns: [{ protocol: 'https', hostname: '**.cloudinary.com' }],
}

Detailed References

  • Install MCP Server — Setup Astro Docs MCP for any AI tool (Kiro, Claude, Cursor, VS Code, etc.)
  • Migration Guide v6→v7 — Step-by-step upgrade plan with breaking changes checklist
  • Validation Checklist — Verify installation, detect breaking/deprecated patterns
  • AI Dev Server — Background mode, JSON logging, agent detection
  • Astro v7 Features — Rust compiler, Sätteri, Advanced Routing, Route Caching, CDN providers
  • Astro v6 Features — Content Collections v2, Actions, Sessions, Server Islands, env module
  • Related Content — Vector embeddings para posts relacionados, deploy leve no Coolify sem modelo
  • Testing — Vitest components, Playwright E2E, link checking, CI pipeline
  • SEO Full Stack — JSON-LD graph, agent discovery, IndexNow, OG images, build-time validation, performance
  • Starlight & Patterns — Docs sites, Pagefind search, i18n, pagination, RSS
  • Deployment — Cloudflare, Vercel, Netlify, Firebase, GitHub Pages, Docker/Coolify, Azure
  • Coolify Deploy — Self-hosted deploy on Coolify (Dockerfile, API, gotchas, recommended stack)

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Astro Sites Manager」では何ができますか?

Astro v7プロジェクトの構築、移行、保守を網羅したスキルです。公式のAGENTS.mdに基づくベストプラクティス、v6からv7への移行手順、破壊的変更や非推奨パターンの検証、AIを活用した開発サーバーの使い方(バックグラウンドモード、JSONログ)、src/fetch.tsを使った高度なルーティング、ルートキャッシュ、Sätteri Markdown、Rustコンパイラを扱います。ユーザーが「Astro」「.astroファイル」「astro dev」「astro build」「islands architecture」「content collections」「SSG」「SSR adapter」「Astro 7へのアップグレード」「Astroの移行」「Astro v7」「Astro v6」「Sätteri」「ルートキャッシュ」「Astro.cache」「astro dev --background」「src/fetch.ts」「高度なルーティング」「Hono + Astro」「Rolldown」「Vite 8」「queued rendering」「CDN cache provider」「Astro AI」「関連コンテンツ」「関連記事」「Astroのベクトル埋め込み」「astro-related-content」について言及した場合、またはAstroでの静的サイト生成につ...

TypingMindでAstro Sites Managerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Astro Sites Managerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAstro Sites Managerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/fabricioctelles/skills/tree/main/skills/astro-sites-managerを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Astro Sites Managerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Astro Sites Managerで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAstro Sites Managerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Astro Sites Manager」は無料ですか?

はい。fabricioctellesがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇