ワンクリックで
create-component
Create Astro components, pages, and layouts with accessible markup and minimal client-side JavaScript.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create Astro components, pages, and layouts with accessible markup and minimal client-side JavaScript.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | create-component |
| description | Create Astro components, pages, and layouts with accessible markup and minimal client-side JavaScript. |
Use this skill when scaffolding a new Astro component, page, layout, or route from a feature request, design, or static markup.
If astro-best-practices is available, apply it alongside this skill for project-wide conventions and review criteria.
Choose the simplest primitive that fits the requirement:
src/components/src/pages/src/layouts/Start with .astro unless there is a real need for client-side framework state.
Before scaffolding, determine:
Keep the public surface small. If a prop does not change rendering in a meaningful way, it probably should not exist.
Use typed props and semantic structure:
---
interface Props {
title: string
variant?: 'primary' | 'secondary'
}
const { title, variant = 'primary' } = Astro.props
---
<section class:list={['card', variant]}>
<h2>{title}</h2>
<slot />
</section>
<style>
.card {
padding: 1rem;
}
</style>
Good defaults:
divsclass:list for conditional classes when it keeps markup clearIf the component needs client-side behavior:
Example:
---
import SearchBox from './SearchBox.tsx'
---
<SearchBox client:visible />
Avoid turning large sections of a page into islands when a small interactive leaf component is enough.
Before calling the component done, check:
alt behaviorAlign with the existing codebase:
Add and configure Astro integrations, adapters, and UI framework tooling.
Set up and evolve Astro content collections with typed schemas and reliable querying patterns.
Plan and execute migrations to Astro or between Astro versions with minimal regressions.
Apply performant, accessible, and maintainable defaults when building or reviewing Astro projects.
Look up official Astro documentation and answer version-sensitive Astro questions accurately.