跪拜 Guibai
← All articles
Frontend · Vue.js · AI Programming

V3 Admin Vite Adds Project Conventions and Skills to Stop AI Coding Drift

By pany ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI coding tools still produce unreliable output on real projects because they lack project-specific context. Baking conventions and task workflows directly into a repo gives teams a repeatable way to get consistent AI-generated code across different editors, without repeating instructions in every prompt.

Summary

V3 Admin Vite, an open-source Vue3 admin template, has added a layer of AI harness engineering to improve code quality from AI coding tools. The update introduces project-level convention files (AGENTS.md and CLAUDE.md) that define commands, architecture, and coding rules, kept under 200 lines to stay focused. These files are linked via symlinks so a single source of truth works across Claude Code, Cursor, Trae, and other tools.

A set of five project-specific Skills now covers the most repetitive admin-system tasks: creating CRUD pages, updating global stores, modifying routing tables, and using built-in utilities and composables. Each Skill is capped at 500 lines and stored in a shared `.agents/skills/` directory, again symlinked to tool-specific locations. Community Skills from Anthony Fu's collection — covering Pinia, Vite, Vue Router best practices, and testing — are also integrated and installable on demand via a lockfile and a single npx command.

The result is a template that gives AI agents explicit, scoped instructions rather than leaving them to guess project conventions. Early practice shows this layered approach — always-on conventions, file-scoped rules, and on-demand skills — produces more reliable AI-generated code across multiple editors.

Takeaways
— AGENTS.md and CLAUDE.md files define project commands, architecture, and coding conventions that AI tools load every session.
— Rules with path frontmatter load only when matching files are opened, keeping the main convention file lean.
— Skills are on-demand, task-specific workflows — triggered by slash commands or context — for repeatable jobs like creating a CRUD page.
— Five built-in Skills cover CRUD generation, global state updates, route table changes, and usage guides for utilities and composables.
— Community Skills from antfu/skills (Pinia, Vite, Vue Router best practices, testing) are recorded in a lockfile and installed with `npx skills experimental_install`.
— Symlinks keep a single copy of conventions and Skills usable across Claude Code, Cursor, Trae, Antigravity, and CodeX.
— Each convention file stays under 200 lines; each Skill stays under 500 lines to avoid context bloat.
Conclusions

Treating AI coding instructions as project source code — versioned, symlinked, and scoped — is a practical shift from ad-hoc prompting to engineered reliability.

The distinction between always-on conventions, file-scoped rules, and on-demand skills mirrors how human developers actually consume project documentation, which likely explains why this structure works across multiple AI tools.

Abstracting repetitive admin-system tasks into Skills turns AI agents from general-purpose coders into domain-aware tools that respect existing patterns instead of inventing new ones.

Concepts & terms
CLAUDE.md / AGENTS.md
Root-level project files that define always-on conventions — build commands, architecture, coding rules — which AI coding tools load at the start of every session. CLAUDE.md targets Claude Code; AGENTS.md targets Cursor, Trae, Antigravity, and CodeX.
Skills (AI Coding)
On-demand, task-specific instruction files that AI agents load only when a relevant task is triggered. They contain reusable workflows or reference material, such as step-by-step instructions for creating a CRUD page or a complete API style guide.
Rules with paths frontmatter
Configuration files that include file-path metadata so an AI tool loads them only when editing matching files, reducing context-window consumption compared to always-on conventions.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗