Agent skill
new-component
Creates a new Astro component with typed props, Tailwind styling, and dark mode support following project conventions. Use when building a new UI component.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/new-component-bluewaves-creations-website-foundation
SKILL.md
Create a new Astro component in the src/components/ directory.
Steps
- Take the component name from the user's argument. If not provided, ask for one.
- Ensure the name is PascalCase (e.g.,
FeatureCard,PricingTable). Convert if needed. - Ask the user what the component should do and what props it needs.
- Create
src/components/<ComponentName>.astro:
---
interface Props {
// Add typed props based on user requirements
title: string;
variant?: "default" | "highlighted";
}
const { title, variant = "default" } = Astro.props;
---
<div class:list={[
"rounded-2xl p-6 shadow-sm ring-1",
variant === "highlighted"
? "bg-gray-900 text-white ring-gray-700 dark:bg-gray-100 dark:text-gray-900 dark:ring-gray-300"
: "bg-white ring-gray-200 dark:bg-gray-900 dark:ring-gray-800",
]}>
<h3 class="text-lg font-semibold">{title}</h3>
<slot />
</div>
-
Follow these project conventions:
- Use
interface Propsfor type safety - Destructure props with defaults in the frontmatter
- Use Tailwind utility classes — no custom CSS
- Always include
dark:variants for colors and backgrounds - Use the standard card pattern:
rounded-2xl bg-white shadow-sm ring-1 ring-gray-200 dark:bg-gray-900 dark:ring-gray-800 - Use
<slot />for child content where appropriate - Use
class:listfor conditional classes
- Use
-
Tell the user:
- The component was created at
src/components/<ComponentName>.astro - How to import and use it:
import ComponentName from "../components/ComponentName.astro";
- The component was created at
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?