fec-vite-project-standard SKILL.md skillA
fec-vite-project-standard from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-vite-project-standard@git:20260611.9d7f5e4Pins git:20260611.9d7f5e4 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
localized/zh-CN/skills/fec-vite-project-standard/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260611.9d7f5e4, committed Jun 11, 2026
- Size
- 3,901 bytes
- Repository stars
- 22
- License
- MIT
用于创建、配置、审查或调试基于 Vite 的前端项目、vite.config.ts、环境变量、dev server proxy、HMR、插件顺序、library mode、依赖预打包、bundle splitting 或 Vite 构建性能。React/Vue 组件架构请使用框架专项 skill;中文触发词包括 Vite 配置、vite.config、Vite 构建、Vite 性能。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Vite 项目规范
适用于 Vite 应用、组件库、开发服务器和构建配置的设计与审查。
## 用途
规范 Vite 配置、安全边界和构建性能,避免开发环境与生产构建的常见陷阱。
## 流程
1. 识别项目类型
- 应用项目优先检查 `root`、`base`、`server.proxy`、`envPrefix`、`build` 和框架插件。
- 组件库项目优先检查 `build.lib`、类型产物、peer dependencies external 和导出入口。
- Monorepo 额外检查 `server.fs.allow`、路径别名和包依赖边界。
2. 选择插件
- React 默认优先 `@vitejs/plugin-react-swc`;需要 Babel 插件时才用 `@vitejs/plugin-react`。
- Vue 项目使用 `@vitejs/plugin-vue`,路径别名优先交给 `vite-tsconfig-paths`。
- TypeScript 项目必须通过 `tsc --noEmit`、CI 或 `vite-plugin-checker` 补齐类型检查。
3. 管理环境变量
- 客户端只读取明确公开的前缀,如 `VITE_`。
- `loadEnv` 第三个参数使用显式前缀数组,不使用空字符串加载全部变量。
- 密钥、数据库地址、私有 token 必须留在服务端或构建系统,不进入客户端 bundle。
4. 优化开发体验
- 慢启动先用 `vite --profile` 定位插件、解析或预构建瓶颈。
- 对 CJS/UMD 依赖用 `optimizeDeps.include` 处理互操作问题。
- 大项目可用 `server.warmup.clientFiles` 预热核心入口。
5. 优化生产构建
- 发布前运行 `vite build`,并用 `vite preview` 做本地构建烟测。
- 手动分包使用稳定的对象形式优先,避免把每个依赖拆成独立小 chunk。
- 生产 sourcemap 默认关闭;若上传错误追踪平台,上传后不随站点公开。
- 动效、3D、图表、编辑器、地图和音视频处理库优先通过动态导入或路由级拆包隔离。
- 检查静态资源是否进入正确目录、是否被 hash/cache、是否存在占位 URL 或过大的未压缩媒体。
## 最小配置
```ts
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react-swc";
…Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-vite-project-standard@sha256:2d69e8ccc8bae0d3The line at the top of this page pins the label git:20260611.9d7f5e4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_7btgpjjrlog55tp3)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 11, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3901 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_7btgpjjrlog55tp3 GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-vite-project-standard GET https://markdownregistry.com/api/v1/blob/2d69e8ccc8bae0d3ee0c81ac47b61d307694fcf9e69f4ca5732d177a2d5a9d11
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft