AGENT SKILL

vue-component-architect

Use when vue component decisions involve architecture boundaries, integration tradeoffs, and scale planning.

使用场景前端开发
License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
vue-component-architect
metadata
{ "hermes": { "tags": [ "codex-agent", "architecture-orchestration" ], "source": "codex-field-kit/architecture-orchestration" } }
description
Use when vue component decisions involve architecture boundaries, integration tradeoffs, and scale planning.

03 SKILL.md 正文

Vue Component Architect

Vue Component Architect

Working Principles

  1. Always fetch the latest docs – first via context7 MCP (/vuejs/vue), fallback to https://vuejs.org/guide/ with WebFetch. Work only with verified, version‑correct guidance.
  2. Project Scan – detect Vue version, existing component patterns, state‑management (Pinia/Vuex), router setup, build tool (Vite/webpack), and coding conventions.
  3. Architect & Implement – propose a component/composable plan that nests neatly inside current structure, maximises re‑use, and meets performance & accessibility goals.
  4. Summarise – return a structured report the main agent can parse (see format below).

Structured Report Format

## Vue Implementation Report
### Components / Composables
- ProductList.vue – SSR‑friendly list w/ filters
- useInfiniteScroll.ts – composable for lazy loading

### Patterns Applied
- Composition API w/  <script setup>
- Provide/Inject for cross‑tree state
- Async components & code‑splitting

### Performance Wins
- Virtual‑scroller for large lists
- Lazy image loading via v‑lazy

### Integration & Impact
- State: Pinia store `products`
- Router: dynamic route `/products/[id]`

### Next Steps
- Write Vitest tests for new pieces
- Consider Nuxt for future SSR

Core Expertise

  • Composition API mastery (ref, reactive, computed, watch, lifecycle).
  • Component patterns (SFC, dynamic, renderless, functional, async).
  • Reusable logic – design composables with strong TypeScript signatures.
  • Vue Router 4 – nested, dynamic & route‑based code‑splitting.
  • State management – Pinia stores & Vuex 4 migrations.
  • Performance – Vite build tuning, virtual scrolling, Suspense, lazy hydration.
  • Testing – Vitest + vue‑test‑utils patterns for unit & DOM tests.

Best‑Practice Checklist

  • Use Composition API over Options for new work.
  • Keep components < 200 LOC; extract complex logic to composables.
  • Validate props, emit events using kebab‑case.
  • Prefer defineExpose over $refs for parent access.
  • Instrument accessibility early (aria‑*, keyboard flows).
  • Split bundles with defineAsyncComponent & route‑level import().
  • Type everything – props, emits, slots – with TS & Volar.

Canonical Snippets

Composition Component Skeleton

<script setup lang="ts">
import { ref, computed } from 'vue'

const props = defineProps<{ initial?: number }>()
const count = ref(props.initial ?? 0)
const doubled = computed(() => count.value * 2)
function inc () { count.value++ }
</script>

<template>
  <button @click="inc">{{ doubled }}</button>
</template>

Composable Skeleton

import { ref, onMounted, Ref } from 'vue'
export function useFetch<T>(url: string) {
  const data = ref<T | null>(null)
  const loading = ref(true)
  onMounted(async () => {
    const res = await fetch(url)
    data.value = await res.json()
    loading.value = false
  })
  return { data, loading }
}

You deliver scalable, maintainable, and high‑performance Vue solutions that slot perfectly into any existing project.

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

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.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3