Logo Astro Website

Astro Website

Cộng đồng
lfurze
astro-website

Build multi-page Astro websites from provided content (markdown articles, PDFs, eBooks). Use this skill when asked to build a website, create a new site, set up a web project, or turn content into a website. Triggers on phrases like "build a website", "new site", "create a website", "set up a site", "turn this into a website", "make a site from these". Always deployed to GitHub + Cloudflare Pages with a custom domain. This skill should be used in an empty project folder where the user has already placed their source content.

Tổng quan

Nhà phát hànhlfurze
Kho mãclaude-skills
Tên kỹ năngastro-website
Sao
24
Bản fork
5
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được lfurze công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Astro Website trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/lfurze/claude-skills/tree/main/astro-website
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lfurze/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/astro-website .claude/skills/astro-website
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Astro Website trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Astro Website ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Astro Website không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Astro Website Builder

Build polished, multi-page static websites from provided content using Astro 5, deployed to Cloudflare Pages with custom domains.

When This Skill Applies

The user provides content in one of these forms (placed in the project root before starting):

  • Markdown (.md) articles
  • A PDF or eBook on a topic
  • A collection of text files on a theme
  • A WordPress XML export
  • Sometimes just a topic and verbal description

The job is to transform that into a professional, fast, accessible website.

Before Starting: Gather Requirements

Ask these questions (skip any already answered):

  1. Site name and domain — What's it called? What custom domain? (e.g., myproject.com)
  2. Purpose and audience — Who is this for?
  3. Content sections — What pages should the site have? (Suggest a structure based on the provided content)
  4. Theme preference — Dark mode default, light mode, or both with toggle? Color preferences?
  5. Font style — Editorial/serif, clean modern, or technical? (See references/design-tokens.md for options)

Project Initialization

Run in the empty project folder:

bash
npm create astro@latest . -- --template minimal --typescript strict --install --git --no
npm install @astrojs/sitemap marked sanitize-html

Create the folder structure:

src/
├── components/    # Header, Footer, cards, reusable UI
├── layouts/       # BaseLayout.astro
├── pages/         # File-based routes
├── data/          # Content as TypeScript arrays
├── styles/        # global.css
└── utils/         # Helpers (if needed)
public/
├── images/
├── fonts/         # Self-hosted fonts (if any)
├── favicon.svg
├── favicon.ico
├── robots.txt
└── _headers

Create these config files:

astro.config.mjs:

javascript
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
export default defineConfig({
  site: 'https://[your-domain.com]',
  integrations: [sitemap()],
});

wrangler.jsonc:

jsonc
{
  "name": "[project-name]",
  "compatibility_date": "[YYYY-MM-DD]",
  "assets": { "directory": "./dist" }
}

tsconfig.json — use Astro's strict preset with path alias:

json
{
  "extends": "astro/tsconfigs/strict",
  "include": [".astro/types.d.ts", "**/*"],
  "exclude": ["dist"],
  "compilerOptions": { "paths": { "@/*": ["src/*"] } }
}

Then create CLAUDE.md (read references/claude-md-template.md) and DESIGN.md (read references/design-tokens.md and customize for the project).

Content Processing

Step 1: Read the source material

Scan the project root for content files. Read all of them to understand scope, themes, and structure.

Step 2: Plan information architecture

A typical site has: Home, core content pages (articles/chapters/resources), About, Contact, and a 404 page. For larger content sets, add topic indexes, dynamic [slug].astro routes, resource pages, or case studies. Propose the structure to the user before building.

Step 3: Transform content into TypeScript data

Structure all content as typed TypeScript arrays in src/data/. This is the established pattern — TypeScript data files, not markdown content collections.

typescript
// src/data/articles.ts
export interface Article {
  slug: string;
  title: string;
  date: string;
  excerpt: string;
  content: string;      // Full markdown content as string
  image?: string;
  imageCredit?: string;
  tags?: string[];
  categories?: string[];
  section?: string;
}
export const articles: Article[] = [ /* populated from source content */ ];

For markdown files: extract title from first heading, generate slug, create excerpt from first paragraph, store full content as markdown string.

For PDFs: extract text, identify chapters/sections, split into logical articles.

Step 4: Build pages

Read references/component-patterns.md before building components. Key architecture:

BaseLayout.astro wraps every page with: HTML document setup, SEO meta tags (title, description, Open Graph, Twitter Cards), canonical URLs, theme initialization (inline script in <head> to prevent flash), font loading, global CSS import, skip-to-main-content link, and Header + <main> slot + Footer.

Dynamic routes for collections:

astro
---
// src/pages/articles/[slug].astro
import { articles } from '../../data/articles';
export function getStaticPaths() {
  return articles.map(a => ({ params: { slug: a.slug }, props: { article: a } }));
}
const { article } = Astro.props;
---

Markdown rendering uses marked + sanitize-html for security. See references/component-patterns.md for the sanitization config.

Styling Approach

Read references/design-tokens.md before writing any CSS. Key principles:

  • No Tailwind — custom CSS with CSS custom properties
  • "Barely-there UI" — minimal chrome, let content breathe
  • Fluid typography — clamp() for responsive headings
  • Glass border effect — conic gradient + mask compositing on cards
  • Cursor-following image zoom on card images
  • Smooth easing — cubic-bezier(0.16, 1, 0.3, 1) everywhere
  • Accessibility — skip links, focus-visible, prefers-reduced-motion

Theme toggle (if applicable): data-theme attribute on <html>, localStorage persistence, inline <script> in <head> to set before render.

SEO

Every site includes: meta tags in BaseLayout, Open Graph + Twitter Card tags, canonical URLs, JSON-LD structured data on article pages, sitemap via @astrojs/sitemap, robots.txt, and semantic HTML throughout.

Deployment

Build: npm run build. Production deployment is GitHub → Cloudflare Pages auto-deploy on push to main.

Cloudflare setup: push repo to GitHub → Cloudflare Pages → Create → Connect to Git → build command npm run build, output dist → add custom domain in settings.

Stability Checklist

Before considering complete: all pages render, build succeeds, no TS errors, images lazy-loaded, SEO meta on all pages, sitemap works, 404 page exists, mobile responsive (375/768/1024/1440px), keyboard nav works, no console errors, theme toggle works (if applicable), all source content included.

Reference Files

Read these before building:

  • references/design-tokens.md — Full design system: colors, typography, spacing, glass borders, animation, responsive breakpoints
  • references/component-patterns.md — Established component patterns: Header, Footer, cards, layouts, prose styling, modals
  • references/claude-md-template.md — Template for the project's CLAUDE.md file

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Astro Website làm được gì?

Build multi-page Astro websites from provided content (markdown articles, PDFs, eBooks). Use this skill when asked to build a website, create a new site, set up a web project, or turn content into a website. Triggers on phrases like "build a website", "new site", "create a website", "set up a site", "turn this into a website", "make a site from these". Always deployed to GitHub + Cloudflare Pages with a custom domain. This skill should be used in an empty project folder where the user has already placed their source content.

Vì sao nên dùng Astro Website trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Astro Website là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Astro Website trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/lfurze/claude-skills/tree/main/astro-website. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Astro Website?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Astro Website với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Astro Website với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Astro Website có miễn phí không?

Có. Kỹ năng này được lfurze phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇