Vue组件生成(免费版)
БесплатноБез исполняемых скриптовНе проверенVue组件生成工具免费版为个人开发者提供Vue 3单文件组件模板快速生成能力,覆盖Composition API、Options API与TypeScript支持。核心能力: - 一键生成Vue 3单文件组件(。Use when 需要代码生成、编程辅助、调试测试、开发部署时使用。不适用于无明确技术栈的模糊需求。
от thcjp733 установки в других каталогахОб этом скилле
Vue 组件生成工具(免费版)
概述
vue-component-gen-tool-free 为个人开发者提供 Vue 3 单文件组件模板的快速生成能力。它支持 Composition API、Options API、<script setup> 语法与 TypeScript,帮助你快速搭建标准化组件,适合个人项目、学习实践与小型应用开发.
本工具通过自然语言指令或 CLI 风格命令驱动 Agent 输出组件代码,无需额外安装私有脚本.
核心能力
| 能力 | 说明 |
|---|---|
| 单文件组件生成 | 生成完整的 .vue 文件(template/(请参考skill目录中的脚本文件)) |
| Composition API | 推荐 API,基于 setup 函数 |
| Options API | 传统 API,适合旧项目兼容 |
<script setup> |
Vue 3 推荐语法,更简洁 |
| TypeScript 支持 | 类型化的 Props、Emits、Ref |
| SCSS 支持 | 嵌套样式与变量 |
| Props/Emits 定义 | 类型安全的组件接口 |
技术实现要点:核心能力基于input_params参数与output_format配置实现,支持创建/查询/修改/删除等操作模式,通过config_options进行运行时配置. |
核心功能执行
用input_params参数进行配置.
处理: 解析核心功能执行的输入参数,完成核心逻辑,返回结构化响应. 输出: 返回核心功能执行的响应数据,包含状态码、结果和日志.
- 执行此能力时使用
input_params参数,支持创建/查询/导出操作
参数配置与调用
用config_options参数进行配置.
处理: 解析参数配置与调用的输入参数,完成核心逻辑,返回结构化响应. 输出: 返回参数配置与调用的响应数据,包含状态码、结果和日志.
- 执行此能力时使用
config_options参数,支持修改/重置/导入操作
结果处理与输出
用output_format参数进行配置.
处理: 解析结果处理与输出的输入参数,完成核心逻辑,返回结构化响应. 输出: 返回结果处理与输出的响应数据,包含状态码、结果和日志.
- 执行此能力时使用
output_format参数,支持导出/保存/转换操作 能力覆盖范围:本skill的核心能力覆盖以下场景关键词:面向个人开发者的、组件模板生成工具、组件生成工具免费、版为个人开发者提、单文件组件模板快、速生成能力、一键生成、Use、when、需要代码生成、编程辅助、调试测试、开发部署时使用、不适用于无明确技、术栈的模糊需求等。这些关键词对应description中声明的使用场景,均已在上述能力点中提供对应的操作支持.
使用场景
场景 1:生成基础按钮组件
生成一个 MyButton 组件,用 Composition API 和 TypeScript
<template>
<div class="my-button">
<button @click="handleClick">
{{ label }}
</button>
</div>
</template>
# ...
<script setup lang="ts">
import { ref } from 'vue'
# ...
interface Props {
label?: string
}
# ...
const props = withDefaults(defineProps<Props>(), {
label: 'Click me'
})
# ...
const emit = defineEmits<{
(e: 'click'): void
}>()
# ...
const handleClick = () => {
emit('click')
}
</script>
# ...
<style scoped>
.my-button {
padding: 10px 20px;
}
</style>
场景 2:生成表单输入组件
生成一个 InputField 组件,带 v-model 支持,使用 TypeScript
<template>
<div class="input-field">
<label v-if="label" :for="id">{{ label }}</label>
<input
:id="id"
:type="type"
:value="modelValue"
:placeholder="placeholder"
@input="onInput"
/>
</div>
</template>
# ...
<script setup lang="ts">
interface Props {
modelValue: string
label?: string
type?: string
placeholder?: string
id?: string
}
# ...
const props = withDefaults(defineProps<Props>(), {
type: 'text',
label: '',
placeholder: '',
id: () => `input-${Math.random().toString(36).slice(2, 9)}`
})
# ...
const emit = defineEmits<{
(e: 'update:modelValue', value: string): void
}>()
# ...
const onInput = (event: Event) => {
const target = event.target as HTMLInputElement
emit('update:modelValue', target.value)
}
</script>
# ...
<style scoped>
.input-field {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
input {
padding: 0.5rem 0.75rem;
border: 1px solid #ddd;
border-radius: 4px;
}
</style>
场景 3:生成模态框组件
生成一个 Modal 组件,带 v-model:open 支持,使用 SCSS
<template>
<Teleport to="body">
<Transition name="modal">
<div v-if="open" class="modal-overlay" @click.self="close">
<div class="modal">
<header class="modal-header">
<h3>{{ title }}</h3>
<button class="close-btn" @click="close">×</button>
</header>
<div class="modal-body">
<slot />
</div>
<footer class="modal-footer">
<slot name="footer" :close="close" />
</footer>
</div>
</div>
</Transition>
</Teleport>
</template>
# ...
<script setup lang="ts">
interface Props {
open: boolean
title?: string
}
# ...
const props = withDefaults(defineProps<Props>(), {
title: ''
})
# ...
const emit = defineEmits<{
(e: 'update:open', value: boolean): void
}>()
# ...
const close = () => emit('update:open', false)
</script>
# ...
<style lang="scss" scoped>
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
# ...
.modal {
background: #fff;
border-radius: 8px;
max-width: 480px;
width: 90%;
# ...
.modal-header,
.modal-footer {
padding: 1rem;
}
# ...
.modal-body {
padding: 1rem;
}
}
}
# ...
.modal-enter-active,
.modal-leave-active {
transition: opacity 0.25s;
}
.modal-enter-from,
.modal-leave-to {
opacity: 0;
}
</style>
快速开始
第一步:描述组件需求
直接在对话中描述你需要的组件,例如:
生成一个 UserCard 组件,显示头像、姓名和邮箱,用 Composition API 和 TypeScript.
第二步:获取组件代码
工具会输出完整的 .vue 文件,包含 template、script、style 三部分.
第三步:应用到项目
# 将代码保存为组件文件
# src/components/UserCard.vue
# ...
# 在父组件中使用
# <UserCard :user="currentUser" />
示例
CL
Установить Vue组件生成(免费版) в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
readexecwriteFAQ
Что делает скилл Vue组件生成(免费版)?
Vue组件生成工具免费版为个人开发者提供Vue 3单文件组件模板快速生成能力,覆盖Composition API、Options API与TypeScript支持。核心能力: - 一键生成Vue 3单文件组件(。Use when 需要代码生成、编程辅助、调试测试、开发部署时使用。不适用于无明确技术栈的模糊需求。
Как установить скилл Vue组件生成(免费版)?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Vue组件生成(免费版) запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic