npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-skills-vue

v0.1.6

Published

AI-Native Vue 3 Toolkit: Standardized prompt engineering rules for Cursor, Trae, and Copilot to generate high-quality Vue 3 code.

Downloads

748

Readme

AI-Native Vue Toolkit (ai-skills-vue3)

ai-skills-vue3 是一个专为 AI 辅助编程时代设计的 Vue 3 项目规范库。它通过标准化的 Prompt Engineering(提示工程)规则,指导 Cursor、Trae 等 AI 编辑器生成符合团队标准的高质量代码。


🚀 快速开始 (Quick Start)

在项目根目录下运行以下命令,即可一键注入 AI 编程规范:

npm i ai-skills-vue

npx ai-skills

运行后,工具会自动识别您的编辑器环境(Cursor、Trae、VS Code Antigravity等),并生成对应的配置文件(如 .cursorrules.clinerules),让 AI 立即掌握您的团队开发规范。


手动指定目标编辑器 (Manual Target Selection)

默认情况下,工具会自动检测您的编辑器环境。如果自动检测不准确,或者您想为特定编辑器生成规则,可以使用 --target 参数:

| 命令 | 描述 | 生成文件 | | :--- | :--- | :--- | | npx ai-skills --target=cursor | 仅为 Cursor 生成规则 | .cursorrules | | npx ai-skills --target=trae | 仅为 Trae 生成规则 | .traerules | | npx ai-skills --target=windsurf | 仅为 Windsurf 生成规则 | .windsurfrules | | npx ai-skills --target=antigravity | 仅为 Antigravity 生成规则 | .antigravityrules | | npx ai-skills --target=codex | 仅为 Codex AI 插件生成规则 | .codexrules | | npx ai-skills --target=vscode | 为 VS Code (Copilot/Cline) 生成规则 | .clinerules, .github/copilot-instructions.md | | npx ai-skills --target=all | 生成所有支持的规则文件 | 以上所有文件 |

例如,如果您使用的是 Trae 但未被自动识别,可以运行:

npx ai-skills --target=trae

核心痛点与解决方案 (Core Pain Points & Solutions)

在 AI 辅助编程普及的今天,团队往往面临以下核心痛点,本库通过标准化规则一一解决:

| 核心痛点 (Pain Points) | 本库解决方案 (Solutions) | | :--- | :--- | | ❌ 代码风格割裂不同成员使用 AI 生成的代码风格迥异(如混用 Vue 2/3 写法、Options/Composition API)。 | ✅ 强制统一规范强制 AI 仅使用 Vue 3 Composition API (<script setup>) + TypeScript,统一组件结构和命名约定。 | | ❌ 缺乏工程化思维AI 往往只生成"能跑"的代码,忽略错误处理、性能优化和安全性。 | ✅ 注入专家知识内置性能优化(懒加载、虚拟滚动)、安全规范(XSS 防护)、错误监控(Sentry)等专家级指令。 | | ❌ 重复 Prompt 劳动每次对话都需要重复强调 "使用 Pinia"、"使用 AntD"、"不要用 any"。 | ✅ 零配置上下文自动注入 .cursorrules / .traerules,AI 默认即懂你的技术栈,无需重复 Prompt。 | | ❌ 难以维护大型项目AI 生成的代码往往缺乏架构感,导致项目随着迭代变得难以维护。 | ✅ 模块化架构指导内置 DDD(领域驱动设计)模块化目录结构规范,指导 AI 生成高内聚、低耦合的业务模块。 |


支持环境 (Supported Environments)

本库旨在成为 Model-Agnostic (模型无关) 和 Editor-Agnostic (编辑器无关) 的规范层。

1. 支持的 AI 编辑器 (Editors)

目前完美支持以下通过配置文件注入 System Prompt 的编辑器:

  • Cursor: 自动生成/更新 .cursorrules 文件。
  • Trae: 自动生成/更新 .traerules 文件。
  • Windsurf: 自动生成/更新 .windsurfrules 文件。
  • Antigravity: 自动生成/更新 .antigravityrules 文件。
  • Codex CLI: 自动生成/更新 .codexrules 文件。
  • VS Code (需配合插件):
    • GitHub Copilot: 自动生成/更新 .github/copilot-instructions.md 文件。
    • Roo Code / Cline: 自动生成/更新 .clinerules 文件。

2. 推荐的大语言模型 (LLMs)

本库的规则采用标准 Markdown 编写,任何具备强逻辑推理和代码生成能力的 LLM 均可理解。

🌍 国际主流模型

  • Claude (推荐): 目前在编程领域表现最佳,对复杂规范的遵循度最高。
  • GPT: 综合能力强,适合通用场景。
  • Gemini: Google 旗舰模型,拥有超长上下文窗口,适合读取大量规范。

🇨🇳 国内主流模型

  • DeepSeek: 性价比极高,对中文规范理解能力出色,编程能力媲美顶尖闭源模型。
  • Qwen(通义千问): 阿里出品,代码生成与数学逻辑能力在开源界领先。
  • GLM (智谱AI): 中文理解与长文本能力出色,生态完善。
  • MiniMax (海螺AI): 拟人化交互体验好,逻辑推理能力强。

核心架构 (Architecture)

本库采用 "Markdown as Rules" 的设计理念:

  1. 规范源 (skills/*.md): 我们将各类开发规范(组件、状态管理、HTTP 请求等)编写为 AI 易读的 Markdown 文档。这些文档既是人类开发者的阅读材料,也是 AI 的指令集。

  2. 注入引擎 (bin/cli.mjs): 提供一个 CLI 工具,自动读取 skills/ 目录下的所有规范文件,将其合并并注入到 AI 编辑器的配置文件中(如 .cursorrules.traerules)。

  3. AI 上下文 (Context): 当你在编辑器中提问时,AI 会自动读取这些规则,从而生成符合规范的代码。

graph LR
    A[skills/*.md] -->|CLI Tool| B(bin/cli.mjs)
    B -->|Inject| C[.cursorrules / .traerules]
    C -->|Guide| D[AI Assistant (Cursor/Trae)]
    D -->|Generate| E[Standardized Vue 3 Code]

包含的规范 (Included Skills)

| 规范文件 | 描述 | | :--- | :--- | | code-style.md | 代码格式化、命名约定、Import 顺序 | | component-standards.md | Vue 3 组件结构、Props/Emits 定义、Setup 语法 | | core-libraries.md | 技术栈选型 (Vue 3, Vite, Pinia, AntD, Tailwind) | | directory-structure.md | 项目目录结构,含大型项目的模块化 (DDD) 方案 | | http-requests.md | Axios 封装、SSE、WebSocket、文件上传规范 | | state-management.md | Pinia Store 结构、持久化、重置模式 | | testing-standards.md | 单元测试 (Vitest)、组件测试、E2E 测试规范 | | performance-optimization.md | 路由懒加载、虚拟滚动、分包策略 | | security-standards.md | XSS/CSRF 防护、敏感数据处理 | | git-workflow.md | 分支管理、Commit 规范、Code Review 标准 | | error-handling.md | 全局错误捕获、Sentry 监控集成 |


❓ 常见问题 (Troubleshooting)

AI 没有遵循生成的规则?

  1. 重启编辑器:生成规则文件后,某些编辑器需要重启才能加载新的上下文。
  2. 检查文件位置:确保 .cursorrules.traerules 文件位于项目根目录。
  3. 手动引用:在对话中,您可以尝试显式告诉 AI:“请遵循 .cursorrules 中的规范”。
  4. Trae 用户:Trae 目前对规则文件的支持可能还在演进中。本工具会自动为您生成 .traerules.cursorrules 以确保最大兼容性。如果仍有问题,请尝试在对话开始时输入 @.cursorrules 来手动引用规则。

许可证

MIT

作者

[email protected]