
create-component
Create Astro components, pages, and layouts with accessible markup and minimal client-side JavaScript.
- Installs
- 430
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/incluud/astro-agent-skills --skill create-component- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads create-component automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Create Astro Component
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.
Workflow
1. Pick the right file type
Choose the simplest primitive that fits the requirement:
- component: reusable UI in
src/components/ - page: route entry in
src/pages/ - layout: shared shell in
src/layouts/ - framework island: React, Vue, or similar only when interactivity is required
Start with .astro unless there is a real need for client-side framework state.
2. Clarify the contract
Before scaffolding, determine:
- what props the file accepts
- whether it renders children or named slots
- whether it fetches data
- whether any interactivity is required
- which styling approach the project already uses
Keep the public surface small. If a prop does not change rendering in a meaningful way, it probably should not exist.
3. Scaffold with strong defaults
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:
- semantic elements over generic
divs - logical heading structure
- sensible prop defaults
- scoped styles unless the project uses another pattern intentionally
class:listfor conditional classes when it keeps markup clear
4. Add interactivity only when needed
If the component needs client-side behavior:
- keep the interactive part as small as possible
- isolate it in a framework component if that is the project pattern
- choose the lightest hydration directive that works
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.
5. Review accessibility and resilience
Before calling the component done, check:
- semantic HTML is appropriate
- interactive elements are keyboard reachable
- visible labels and accessible names exist
- images have correct
altbehavior - heading levels make sense in context
- focus states remain visible
6. Fit the component into the project
Align with the existing codebase:
- follow naming conventions
- preserve the established layout and styling approach
- keep imports relative and readable
- do not introduce a framework dependency just to mimic static HTML
Use This Skill For
- converting static HTML into Astro components
- scaffolding new routes or layouts
- breaking large Astro files into smaller pieces
- turning a design into accessible Astro markup
FAQ
What does the create-component skill do?
Create Astro components, pages, and layouts with accessible markup and minimal client-side JavaScript.
How do I install create-component?
Run npx skills add https://github.com/incluud/astro-agent-skills --skill create-component in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/create-component/ (personal) or .claude/skills/create-component/ (project).
Which AI agents can use create-component?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is create-component safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains create-component?
It is published by incluud in incluud/astro-agent-skills. It has 430 recorded installs.
More from incluud/astro-agent-skills
astro-best-practices
incluud/astro-agent-skills
Apply performant, accessible, and maintainable defaults when building or reviewing Astro projects.
docs-lookup
incluud/astro-agent-skills
Look up official Astro documentation and answer version-sensitive Astro questions accurately.
content-collection
incluud/astro-agent-skills
Set up and evolve Astro content collections with typed schemas and reliable querying patterns.
add-integration
incluud/astro-agent-skills
Add and configure Astro integrations, adapters, and UI framework tooling.
migrate
incluud/astro-agent-skills
Plan and execute migrations to Astro or between Astro versions with minimal regressions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.