Communitygithub.com

anubhavg-icpl/vibe

Astro를 사용하여 콘텐츠 중심 웹사이트를 구축합니다. 기본적으로 JS 없이, 아일랜드 아키텍처, 멀티 프레임워크 컴포넌트, Markdown/MDX를 지원합니다. Astro 관련 도움이 필요할 때 사용하세요.

vibe란 무엇인가요?

이 기술은 Astro 웹 프레임워크를 사용하여 블로그, 문서 사이트, 포트폴리오, 마케팅 페이지 등 콘텐츠 중심 웹사이트를 구축하는 방법을 안내합니다. Astro의 핵심 혁신은 아일랜드 아키텍처(Islands Architecture)로, 기본적으로 브라우저에 JavaScript를 전혀 전송하지 않으며, 필요한 컴포넌트만 선택적으로 하이드레이션(hydration)합니다. React, Vue, Svelte 등 여러 UI 프레임워크를 동일한 프로젝트에서 동시에 사용할 수 있어 컴포넌트별로 최적의 도구를 선택할 수 있습니다. 뛰어난 성능과 Core Web Vitals를 최우선으로 하는 프로젝트에 적합하며, SSG(정적)와 SSR(동적) 모드를 모두 지원합니다. Markdown/MDX 파일을 위한 타입-세이프한 콘텐츠 컬렉션, 파일 기반 라우팅, `client:` 디렉티브를 통한 선택적 하이드레이션 등 강력한 기능을 제공합니다.

지원 대상✓Claude Code~Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/anubhavg-icpl/vibe/tree/HEAD/skills/ag-astro

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Astro 웹 프레임워크

개요

Astro는 블로그, 문서, 포트폴리오, 마케팅 사이트, 전자상거래 등 콘텐츠가 풍부한 웹사이트를 위해 설계된 웹 프레임워크입니다. 핵심 혁신은 **아일랜드 아키텍처(Islands Architecture)**입니다. 기본적으로 Astro는 브라우저에 JavaScript를 전혀 전송하지 않습니다. 대화형 컴포넌트는 분리된 "아일랜드"로 선택적으로 하이드레이션됩니다. Astro는 React, Vue, Svelte, Solid 및 기타 UI 프레임워크를 동일한 프로젝트에서 동시에 지원하므로 컴포넌트별로 적합한 도구를 선택할 수 있습니다.

이 기술을 사용해야 할 때

  • 블로그, 문서 사이트, 마케팅 페이지 또는 포트폴리오를 구축할 때
  • 성능과 Core Web Vitals가 최우선일 때
  • 프로젝트에 Markdown 또는 MDX 파일이 많을 때
  • SSG(정적) 출력을 원하고 동적 라우트를 위한 선택적 SSR을 사용하려 할 때
  • 사용자가 .astro 파일, Astro.props, 콘텐츠 컬렉션 또는 client: 디렉티브에 대해 질문할 때

작동 방식

1단계: 프로젝트 설정

npm create astro@latest my-site
cd my-site
npm install
npm run dev

필요에 따라 통합 기능을 추가합니다:

npx astro add tailwind        # Tailwind CSS
npx astro add react           # React 컴포넌트 지원
npx astro add mdx             # MDX 지원
npx astro add sitemap         # 자동 sitemap.xml
npx astro add vercel          # Vercel SSR 어댑터

프로젝트 구조:

src/
  pages/          ← 파일 기반 라우팅 (.astro, .md, .mdx)
  layouts/        ← 재사용 가능한 페이지 셸
  components/     ← UI 컴포넌트 (.astro, .tsx, .vue 등)
  content/        ← 타입-세이프 콘텐츠 컬렉션 (Markdown/MDX)
  styles/         ← 글로벌 CSS
public/           ← 정적 에셋 (그대로 복사됨)
astro.config.mjs  ← 프레임워크 설정

2단계: Astro 컴포넌트 구문

.astro 파일은 상단에 코드 펜스(서버 전용)가 있고 아래에 템플릿이 있습니다:

---
// src/components/Card.astro
// 이 블록은 서버에서만 실행됩니다 — 브라우저에서는 절대 실행되지 않음
interface Props {
  title: string;
  href: string;
  description: string;
}

const { title, href, description } = Astro.props;
---

<article class="card">
  <h2><a href={href}>{title}</a></h2>
  <p>{description}</p>
</article>

<style>
  /* 이 컴포넌트에 자동으로 스코프가 지정됨 */
  .card { border: 1px solid #eee; padding: 1rem; }
</style>

3단계: 파일 기반 페이지 및 라우팅

src/pages/index.astro          → /
src/pages/about.astro          → /about
src/pages/blog/[slug].astro    → /blog/:slug (동적)
src/pages/blog/[...path].astro → /blog/* (포괄)

getStaticPaths를 사용한 동적 라우트:

---
// src/pages/blog/[slug].astro
export async function getStaticPaths() {
  const posts = await getCollection('blog');
  return posts.map(post => ({
    params: { slug: post.slug },
    props: { post },
  }));
}

const { post } = Astro.props;
const { Content } = await post.render();
---

<h1>{post.data.title}</h1>
<Content />

4단계: 콘텐츠 컬렉션

콘텐츠 컬렉션은 Markdown 및 MDX 파일에 대한 타입-세이프한 접근을 제공합니다:

// src/content/config.ts
import { z, defineCollection } from 'astro:content';

const blog = defineCollection({
  type: 'content',
  schema: z.object({
    title: z.string(),
    date: z.coerce.date(),
    tags: z.array(z.string()).default([]),
    draft: z.boolean().default(false),
  }),
});

export const collections = { blog };
---
// src/pages/blog/index.astro
import { getCollection } from 'astro:content';

const posts = (await getCollection('blog'))
  .filter(p => !p.data.draft)
  .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
---

<ul>
  {posts.map(post => (
    <li>
      <a href={`/blog/${post.slug}`}>{post.data.title}</a>
      <time>{post.data.date.toLocaleDateString()}</time>
    </li>
  ))}
</ul>

5단계: 아일랜드 — 선택적 하이드레이션

기본적으로 UI 프레임워크 컴포넌트는 JS 없이 정적 HTML로 렌더링됩니다. client: 디렉티브를 사용하여 하이드레이션합니다:

---
import Counter from '../components/Counter.tsx';  // React 컴포넌트
import VideoPlayer from '../components/VideoPlayer.svelte';
---

<!-- 정적 HTML — 브라우저로 JavaScript 전송 없음 -->
<Counter initialCount={0} />

<!-- 페이지 로드 시 즉시 하이드레이션 -->
<Counter initialCount={0} client:load />

<!-- 컴포넌트가 화면에 보일 때 하이드레이션 -->
<VideoPlayer src="/demo.mp4" client:visible />

<!-- 브라우저가 유휴 상태일 때만 하이드레이션 -->
<Analytics client:idle />

<!-- 특정 미디어 쿼리에서만 하이드레이션 -->
<MobileMenu client:media="(max-width: 768px)" />

6단계: 레이아웃

---
// src/layouts/BaseLayout.astro
interface Props {
  title: string;
  description?: string;
}
const { title, description = 'My Astro Site' } = Astro.props;
---

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>{title}</title>
    <meta name="description" content={description} />
  </head>
  <body>
    <nav>...</nav>
    <main>
      <slot />  <!-- 페이지 콘텐츠가 여기 렌더링됨 -->
    </main>
    <footer>...</footer>
  </body>
</html>
---
// src/pages/about.astro
import BaseLayout from '../layouts/BaseLayout.astro';
---

<BaseLayout title="About Us">
  <h1>About Us</h1>
  <p>Welcome to our company...</p>
</BaseLayout>

7단계: SSR 모드 (온디맨드 렌더링)

어댑터를 설정하여 동적 페이지에 대해 SSR을 활성화합니다:

// astro.config.mjs
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';

export default defineConfig({
  output: 'hybrid',  // 'static' | 'server' | 'hybrid'
  adapter: vercel(),
});

export const prerender = false를 사용하여 개별 페이지를 SSR에 선택합니다.

예제

예제 1: RSS 피드가 있는 블로그

// src/pages/rss.xml.ts
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';

export async function GET(context) {
  const posts = await getCollection('blog');
  return rss({
    title: 'My Blog',
    description: 'Latest posts',
    site: context.site,
    items: posts.map(post => ({
      title: post.data.title,
      pubDate: post.data.date,
      link: `/blog/${post.slug}/`,
    })),
  });
}

예제 2: API 엔드포인트 (SSR)

// src/pages/api/subscribe.ts
import type { APIRoute } from 'astro';

export const POST: APIRoute = async ({ request }) => {
  const { email } = await request.json();

  if (!email) {
    return new Response(JSON.stringify({ error: 'Email required' }), {
      status: 400,
      headers: { 'Content-Type': 'application/json' },
    });
  }

  await addToNewsletter(email);
  return new Response(JSON.stringify({ success: true }), { status: 200 });
};

예제 3: 아일랜드로 React 컴포넌트 사용

// src/components/SearchBox.tsx
import { useState } from 'react';

export default function SearchBox() {
  const [query, setQuery] = useState('');
  const [results, setResults] = useState([]);

  async function search(e: React.FormEvent) {
    e.preventDefault();
    const data = await fetch(`/api/search?q=${query}`).then(r => r.json());
    setResults(data);
  }

  return (
    <form onSubmit={search}>
      <input value={query} onChange={e => setQuery(e.target.value)} />
      <button type="submit">Search</button>
      <ul>{results.map(r => <li key={r.id}>{r.title}</li>)}</ul>
    </form>
  );
}
---
import SearchBox from '../components/SearchBox.tsx';
---
<!-- 즉시 하이드레이션됨 — 이 아일랜드는 대화형입니다 -->
<SearchBox client:load />

모범 사례

  • ✅ 대부분의 컴포넌트는 정적 .astro 파일로 유지하세요 — 대화형이어야 하는 것만 하이드레이션하세요
  • ✅ 모든 Markdown/MDX 콘텐츠에 콘텐츠 컬렉션을 사용하세요 — 타입 안전성과 자동 유효성 검사가 제공됩니다
  • ✅ 아래쪽 컴포넌트의 경우 client:load보다 client:visible을 선호하세요 — 초기 JS를 줄입니다
  • ✅ 환경 변수에는 import.meta.env를 사용하세요 — 공용 변수는 PUBLIC_으로 접두사를 붙이세요
  • ✅ 전체 SPA 없이 부드러운 페이지 탐색을 위해 astro:transitions의 <ViewTransitions />를 추가하세요
  • ❌ 모든 컴포넌트에 client:load를 사용하지 마세요 — 이는 Astro의 성능 이점을 무효화합니다
  • ❌ 클라이언트 직면 템플릿에서 사용되는 .astro 프론트매터에 비밀 정보를 넣지 마세요
  • ❌ 정적 모드에서 동적 라우트에 getStaticPaths를 생략하지 마세요 — 빌드가 실패합니다

보안 및 안전 참고 사항

  • .astro 파일의 프론트매터 코드는 서버 측에서만 실행되며 브라우저에 절대 노출되지 않습니다.
  • 민감하지 않은 값에만 import.meta.env.PUBLIC_*을 사용하세요. 프라이빗 환경 변수(PUBLIC_ 접두사 없음)는 클라이언트로 전송되지 않습니다.
  • SSR 모드를 사용하는 경우, 데이터베이스 쿼리나 API 호출 전에 모든 Astro.request 입력을 검증하세요.
  • set:html로 렌더링하기 전에 사용자 제공 콘텐츠를 삭제하세요 — 이는 자동 이스케이프를 우회합니다.

일반적인 함정

  • 문제: React/Vue 컴포넌트의 JavaScript가 브라우저에서 실행되지 않습니다 해결책: client: 디렉티브(client:load, client:visible 등)를 추가하세요 — 없으면 컴포넌트가 정적 HTML로만 렌더링됩니다.

  • 문제: 개발 중 콘텐츠 업데이트 후 getStaticPaths 데이터가 오래되었습니다 해결책: Astro의 개발 서버는 콘텐츠 파일을 감시합니다. content/config.ts 변경 사항이 반영되지 않으면 서버를 다시 시작하세요.

  • 문제: Astro.props 타입이 any입니다 — 자동 완성이 되지 않습니다 해결책: 프론트매터에 Props 인터페이스 또는 타입을 정의하면 Astro가 자동으로 추론합니다.

  • 문제: .astro 컴포넌트의 CSS가 다른 컴포넌트로 누출됩니다 해결책: .astro <style> 태그의 스타일은 자동으로 스코프가 지정됩니다. 의도적으로 하위 요소를 대상으로 할 때만 :global()을 사용하세요.

관련 기술

  • @sveltekit — 반응형 UI가 있는 풀스택 프레임워크가 필요할 때 (Astro의 콘텐츠 중심과 대조)
  • @nextjs-app-router-patterns — React 우선 풀스택 프레임워크가 필요할 때
  • @tailwind-patterns — Tailwind CSS로 Astro 사이트 스타일링
  • @progressive-web-app — Astro 사이트에 PWA 기능 추가

제한 사항

  • 이 기술은 작업이 위에 설명된 범위와 명확하게 일치하는 경우에만 사용하세요.
  • 출력물을 환경별 검증, 테스트 또는 전문가 검토의 대체물로 취급하지 마세요.
  • 필요한 입력, 권한, 안전 경계 또는 성공 기준이 누락된 경우 중단하고 명확한 설명을 요청하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

anubhavg-icpl/vibe

|. Use when you need help with 8 bit orbit video template. Hyperframes-based video template for retro pixel deck motion design. Use when users want a high-fidelity, multi-scene HTML-to-video composition with advanced transitions, interactive preview controls, and ready-to-render default style.

anubhavg-icpl/vibe

Reference DESIGN.md for luxury automotive editorial that needs to feel engineered. White slabs, full-bleed performance photography, BMW corporate blue rising into a deeper blue at active states, restrained Helvetica-grade typography. Use when building UI components, applying design tokens, or implementing visual styles for cinematic bmw.

anubhavg-icpl/vibe

Reference DESIGN.md for enterprise-AI brands that need to feel premium, dark, and quietly futuristic. Ink canvas, Unica grotesque type, saturated coral-to-violet brand gradient deployed as backdrop and accent rule, full-pill buttons, gen. Use when building UI components, applying design tokens, or implementing visual styles for cinematic cohere.

anubhavg-icpl/vibe

Reference DESIGN.md for performance brands that need to feel theatrical. High-contrast black-and-white frames cut by Rosso Corsa red, sharp 0-radius components, FerrariSans across the entire page, photography that treats the car as sculp. Use when building UI components, applying design tokens, or implementing visual styles for cinematic ferrari.

anubhavg-icpl/vibe

Reference DESIGN.md for hyper-luxury that needs to feel forged. True-black canvas, oversized LamboType nameplates at 120px+, hexagonal angle motifs, single warm-gold accent for primary actions, photography lit like a vault. Use when building UI components, applying design tokens, or implementing visual styles for cinematic lamborghini.

anubhavg-icpl/vibe

Reference DESIGN.md for AI-lab cinematic: pure black canvas, neon-lime accent on charcoal chrome, geometric DM Sans / Outfit type, pill-shaped CTAs. Use when building UI components, applying design tokens, or implementing visual styles for cinematic minimax.

anubhavg-icpl/vibe

Reference DESIGN.md for GPU-vendor cinematic: chrome-black canvas, signature green action, video-led hero, hard-edged grotesque headlines. Use when building UI components, applying design tokens, or implementing visual styles for cinematic nvidia.

anubhavg-icpl/vibe

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory. Use when you need help with agentfolio.

anubhavg-icpl/vibe

Expert in building portfolios that actually land jobs and clients -. Use when you need help with interactive portfolio. not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

anubhavg-icpl/vibe

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO. Use when you need help with landing page generator.

anubhavg-icpl/vibe

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays. Use when you need help with remotion.

anubhavg-icpl/vibe

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

anubhavg-icpl/vibe

Project scaffolding - generate boilerplate for common project types with best-practice defaults. Use for: scaffold, boilerplate, template, new project, init, create project, starter, setup, project structure, directory structure, monorepo, microservice, API template, web app template, CLI tool template, library template.

anubhavg-icpl/vibe

Automate Klipfolio tasks via Rube MCP (Composio). Always search tools first for current schemas. Use when you need help with klipfolio automation.

anubhavg-icpl/vibe

>. Use when you need help with kami landing. Produce a print-grade single-page kami (紙 / 纸) document — warm parchment canvas, ink-blue accent, serif at one weight, no italic, no cool grays. The output reads like a professional white paper or studio one-pager, not an app UI. Multilingual by design (EN · zh-CN · ja). One self-contained HTML file, zero dependencies.

anubhavg-icpl/vibe

>. Use when you need help with open design landing deck. Produce a single-file slide deck in the Atelier Zero visual language (warm-paper background, italic-serif emphasis spans, coral terminating dots, surreal collage plates) — Open Design's brand deck recipe. The deck uses **horizontal magazine-style swipe pagination** (←/→, wheel, swipe), a per-slide chrome strip with brand mark and slide counter, an ESC overview grid, a coral progress bar, and inherits the canonical stylesheet + 16-slot image library from the sister `open-design-landing` skill.

anubhavg-icpl/vibe

>. Use when you need help with open design landing. Produce a world-class single-page editorial landing site in the Atelier Zero visual language (Monocle / Apartamento / Études editorial collage) — the same aesthetic Open Design uses for its own marketing surface. The agent fills a typed `inputs.json` from a brand brief, optionally generates 16 collage assets via gpt-image-2, then runs a pure-function composer that emits a self-contained HTML file; a separate path can mirror the Astro marketing site in `apps/landing-page/`. Drop-in scroll-reveal motion and a Headroom-style sticky nav are wired automatically.

anubhavg-icpl/vibe

>. Use when building UI with epic design language and visual style. Build immersive, cinematic 2.5D interactive websites using scroll storytelling, parallax depth, text animations, and premium scroll effects — no WebGL required. Use this skill for any web design task: landing pages, product sites, hero sections, scroll animations, parallax, sticky sections, section overlaps, floating products between sections, clip-path reveals, text that flies in from sides, words that light up on scroll, curtain drops, iris opens, card stacks, bleed typography, and any site that should feel cinematic or premium. Trigger on phrases like "make it feel alive", "Apple-style animation", "sections that overlap", "product rises between sections", "immersive", "scrollytelling", or any scroll-driven visual effect. Covers 45+ techniques across 8 categories. Always inspects, judges, and plans assets before coding. Use aggressively for ANY web design task.

anubhavg-icpl/vibe

Generates high-converting landing pages as complete Next.js/React (TSX) components with Tailwind CSS. Creates hero sections, feature grids, pricing tables, FAQ accordions, testimonial blocks, and CTA sections using proven copy frameworks (PAS, AIDA, BAB). Outputs SEO meta tags, structured data, and performance-optimised code targeting Core Web Vitals (LCP < 1s, CLS < 0.1). Use when the user asks to create a landing page, marketing page, homepage, single-page site, lead capture page, campaign page, promo page, or conversion-optimised web page — or when they want to A/B test landing page variants or replace a static page with one designed to convert.

anubhavg-icpl/vibe

Generates a premium single-page HTML landing page with 3D CSS animations, GSAP scroll effects, and mouse-parallax depth. Forcing intake (product + elevator pitch, audience register, brand overrides, tone) locks down positioning before any copy or markup is written, so the page reflects the actual product rather than generic boilerplate. Use whenever the user says 'landing for X', 'create a landing page', 'build a landing page', 'make a landing page for X', 'I need a web page for Y', or provides product/service details and wants a polished website. Also triggers on 'promotional page', 'product page', 'one-pager', 'web presence', 'sales page'. Outputs a single self-contained HTML file (Claude Code) or HTML artifact (Claude.ai). Supports configurable brand colors via CSS custom property overrides.

관련 스킬