vue-application-structure by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill vue-application-structure使用 Composition API、合理的文件组织和 TypeScript 来构建结构良好的 Vue 3 应用,以获得类型安全和可维护性。
最小工作示例:
// useCounter.ts (Composable)
import { ref, computed } from 'vue';
export function useCounter(initialValue = 0) {
const count = ref(initialValue);
const doubled = computed(() => count.value * 2);
const increment = () => count.value++;
const decrement = () => count.value--;
const reset = () => count.value = initialValue;
return {
count,
doubled,
increment,
decrement,
reset
};
}
// Counter.vue
<template>
<div class="counter">
<p>Count: {{ count }}</p>
<p>Doubled: {{ doubled }}</p>
// ... (完整实现请参阅参考指南)
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| Vue 3 Composition API 组件 | Vue 3 Composition API Component |
| 异步数据获取组合式函数 | Async Data Fetching Composable |
| 组件组织结构 | Component Organization Structure |
| 表单处理组合式函数 | Form Handling Composable |
| Pinia 存储(状态管理) | Pinia Store (State Management) |
每周安装量
113
代码仓库
GitHub 星标数
121
首次出现
2026年1月21日
安全审计
安装于
opencode91
gemini-cli89
claude-code87
codex85
cursor83
github-copilot73
Build well-organized Vue 3 applications using Composition API, proper file organization, and TypeScript for type safety and maintainability.
Minimal working example:
// useCounter.ts (Composable)
import { ref, computed } from 'vue';
export function useCounter(initialValue = 0) {
const count = ref(initialValue);
const doubled = computed(() => count.value * 2);
const increment = () => count.value++;
const decrement = () => count.value--;
const reset = () => count.value = initialValue;
return {
count,
doubled,
increment,
decrement,
reset
};
}
// Counter.vue
<template>
<div class="counter">
<p>Count: {{ count }}</p>
<p>Doubled: {{ doubled }}</p>
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Vue 3 Composition API Component | Vue 3 Composition API Component |
| Async Data Fetching Composable | Async Data Fetching Composable |
| Component Organization Structure | Component Organization Structure |
| Form Handling Composable | Form Handling Composable |
| Pinia Store (State Management) | Pinia Store (State Management) |
Weekly Installs
113
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode91
gemini-cli89
claude-code87
codex85
cursor83
github-copilot73
Vue Pinia单元测试指南:组件、组合函数与状态管理测试最佳实践
779 周安装