new-component
Scaffold a new VC-Shell UI component with proper structure, types, barrel exports, and Storybook story
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Scaffold a new VC-Shell UI component with proper structure, types, barrel exports, and Storybook story
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Structured bug fix workflow — diagnose from git history, minimal fix, verify
Verify changed components render correctly in Storybook by running a targeted build check
Time-boxed implementation plan with approval gate before coding
| name | new-component |
| description | Scaffold a new VC-Shell UI component with proper structure, types, barrel exports, and Storybook story |
| disable-model-invocation | true |
Scaffold a new VC-Shell framework UI component following all project conventions.
Parse the user's input for:
VcDatePicker, VcColorInputatom, molecule, or organismExample invocations:
/new-component VcRating atom/new-component VcTimeline organism --with-internalsMap atomic level to directory:
atom → framework/ui/components/atoms/molecule → framework/ui/components/molecules/organism → framework/ui/components/organisms/Convert component name to kebab-case for the directory name (e.g. VcDatePicker → vc-date-picker).
Create these files:
{kebab-name}/{kebab-name}.vue<script setup lang="ts">
export interface Props {
// Define component props here
}
withDefaults(defineProps<Props>(), {
// Default values
});
</script>
<template>
<div class="{kebab-name}">
<slot />
</div>
</template>
<style lang="scss">
.{kebab-name} {
// Component styles - use tw- prefix for Tailwind classes
// Use BEM: .{kebab-name}__element, .{kebab-name}--modifier
}
</style>
{kebab-name}/index.tsexport { default as {PascalName} } from "./{kebab-name}.vue";
{kebab-name}/{kebab-name}.stories.tsimport type { Meta, StoryObj } from "@storybook/vue3";
import {PascalName} from "./{kebab-name}.vue";
const meta = {
title: "{AtomicLevel}/{PascalName}",
component: {PascalName},
args: {},
parameters: {
docs: {
description: {
component: "TODO: Add component description.",
},
},
},
} satisfies Meta<typeof {PascalName}>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
render: (args) => ({
components: { {PascalName} },
setup() {
return { args };
},
template: `
<div class="tw-p-4">
<{PascalName} v-bind="args" />
</div>
`,
}),
};
_internal/ directory (if requested)If the user specified --with-internals, create an empty _internal/ subdirectory.
Add the export to the parent level index.ts barrel file (e.g. molecules/index.ts):
export * from "./{kebab-name}";
Run: yarn typecheck to ensure the new component compiles.
tw- (e.g. tw-flex, tw-px-1).vc-component-name__elementtw-bg-[var(--primary-500)]withDefaults$isMobile.value / $isDesktop.value, mobile variants in mobile/ subdirectorysatisfies Meta<typeof Component> pattern"Atoms/VcButton", "Molecules/VcInput", "Organisms/VcTable"