Agent skill

Convention Audit

by ChenyCHENYU in ChenyCHENYU/Robot_Admin

A skill your agent uses when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report.

MITAuto-check passedDevelopment

Install Convention Audit

skills CLI
$ npx skills add ChenyCHENYU/Robot_Admin --skill convention-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ChenyCHENYU/Robot_Admin convention-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ChenyCHENYU/Robot_Admin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/convention-audit .claude/skills/convention-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
convention-audit
GitHub stars
1k
Token cost
~1.5k tokens
SKILL.md length
316 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report.

  • Works in 10 steps: 文件结构审计 → 命名审计 → SFC 结构审计 → …
  • : reviewing code for compliance with Robot Admin project conventions
  • SKILL.md covers 触发, 审计维度, 输出格式 and 快速审计命令, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Convention Audit is an agent skill from ChenyCHENYU/Robot_Admin. Use when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report. Triggers on: convention check, 规范检查, audit, 代码审查, code review, 命名规范, naming convention, 代码规范.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with TypeScript and Vue.js. The repository describes itself as: 一款专为开发者省时间、提效率的现代化中后台模板,跳过低质造轮子,上手即开工!Vue 3 + TS + Naive UI,更有 Bun+Vite 双引擎,性能直接拉满💥 毫秒级热更新不卡顿,开发丝滑,您试试!还有49 个成熟组件,演示页+文档双重完善,无残缺、无坑点,复制即用无需额外调试;配套 8 个 @robot-admin…. The licence is MIT.

When your agent uses it

  • : reviewing code for compliance with Robot Admin project conventions
  • Generating a compliance report
  • : convention check
  • Naming convention

Example prompts

  • “/convention-audit”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. 文件结构审计
  2. 命名审计
  3. SFC 结构审计
  4. 导入审计
  5. 注释审计
  6. TypeScript 审计
  7. 样式审计
  8. API 层审计
  9. Store 审计
  10. Git 提交审计

What it can do on your machine

Read from SKILL.md and the folder at commit ce6be1d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Convention Audit loads about 1.5k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 316 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ChenyCHENYU/Robot_Admin at commit ce6be1d, republished under its MIT licence (© ChenyCHENYU). 316 words, ~1,511 tokens.

Download SKILL.mdSave it as .claude/skills/convention-audit/SKILL.md (or your agent's skills folder).
name
convention-audit
description
Use when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report. Triggers on: convention check, 规范检查, audit, 代码审查, code review, 命名规范, naming convention, 代码规范.

Skill: 规范审计(convention-audit)

对 Robot Admin 项目中的代码进行规范合规性审查,检测违反编码约定的问题并给出修正建议。


触发

  • 代码审查请求(code review)
  • 新代码提交前的合规性检查
  • 项目级别的规范巡检
  • 手动请求"帮我检查代码规范"

审计维度

1. 文件结构审计

目录命名:

类型约定示例反例
全局组件目录C_ + PascalCaseC_Header/, C_Settings/header/, cHeader/
局部组件目录c_ + camelCasec_detail/, c_role/Detail/, c-detail/
Demo 目录数字编号-功能名01-icon/, 10-table/icon/, table-demo/
Store 目录领域名(kebab-case)user/, theme/userStore/, s_user/

文件三件套:

每个页面/组件目录必须包含:

  • index.vue — 主组件
  • index.scss — 样式(scoped)
  • data.ts — 配置数据(页面级)或 types.ts(组件级)
2. 命名审计

变量/函数:

类型约定示例反例
Store 导出s_ + camelCase + Stores_userStoreuseUserStore, userStore
Composableuse + PascalCaseuseLoginControllerloginController
工具函数文件d_ 前缀d_auth.tsauth.ts, authUtils.ts
组件 namePascalCasedefineOptions({ name: 'UserManage' })缺少 name
API 函数动词 + 资源 + ApigetUserListApigetUsers, userList
类型/接口PascalCaseUserInfo, FormOptionuserInfo, form_option

组件引用:

场景约定示例
模板中组件PascalCase<C_Table />, <NCard />
自有组件库C_ 前缀<C_Form />, <C_ActionBar />
Naive UI 组件N 前缀<NButton />, <NModal />
3. SFC 结构审计

<script setup lang="ts"> 区块顺序(必须按序):

① defineOptions({ name: '...' })
② Props / Emits
③ 外部 Store / Composable
④ 响应式状态 (ref / reactive)
⑤ 计算属性 (computed)
⑥ 方法函数
⑦ 生命周期 (onMounted / onUnmounted)
⑧ Watch
⑨ defineExpose

违规检测项:

  • 缺少 defineOptions({ name: '...' }) → 影响 DevTools 和 KeepAlive
  • Props 使用对象语法 defineProps({ ... }) → 应使用 interface + withDefaults
  • 样式未使用 @use './index.scss' → 应使用 @use 而非内联样式或 @import
  • 缺少 lang="ts" → 必须使用 TypeScript
  • 缺少 scoped → 必须使用 scoped 样式
4. 导入审计

自动导入违规:

以下 API 应不出现在 import 语句中(已配置自动导入):

// Vue 核心
ref, computed, watch, onMounted, nextTick, reactive, readonly, h, ...

// Vue Router
useRoute, useRouter

// Pinia
defineStore, storeToRefs

// VueUse
useLocalStorage, useClipboard, useDebounceFn, ...

// Naive UI 组件
NCard, NButton, NSpace, NInput, NSelect, NTag, NModal, ...

// Naive UI Composables
useMessage, useDialog, useNotification, useLoadingBar

// 仅自动扫描 src/composables/ 中导出的函数
// 领域 Store 与页面控制器显式导入,不把 hooks 或页面目录视为自动导入源

导入顺序违规:

正确顺序:

1. 外部样式
2. Vue 核心
3. 路由/状态
4. UI 库
5. @robot-admin/* 自有包
6. 项目内部 @/ 别名
7. 相对路径 ./

路径别名违规:

  • 使用 ../../stores/user → 应使用 @/stores/user
  • 使用 ../../../api/auth → 应使用 @/api/auth
5. 注释审计

文件头注释(必须存在):

typescript
/*
 * @Author: ChenYu ycyplus@gmail.com
 * @Date: YYYY-MM-DD
 * @LastEditors: ChenYu ycyplus@gmail.com
 * @LastEditTime: YYYY-MM-DD
 * @FilePath: \Robot_Admin\src\xxx\xxx.ts
 * @Description: 文件描述
 * Copyright (c) YYYY by CHENY, All Rights Reserved 😎.
 */

JSDoc 注释(所有导出函数/类/方法必须有):

typescript
/**
 * * @description: 功能描述
 * ? @param {Type} name 参数说明
 * ! @return {ReturnType} 返回值说明
 */
6. TypeScript 审计
  • 使用 any → 应使用具体类型或 unknown
  • 缺少函数返回类型 → 复杂函数应标注返回类型
  • Props 未定义 interface → 应使用 interface + withDefaults
  • API 响应未标注泛型 → getData<T>() 必须指定 T
7. 样式审计

优先级规则:

1. UnoCSS 原子类(间距、布局、颜色)
2. 组件 SCSS(复杂样式)
3. CSS 变量(主题适应)

违规检测:

  • 硬编码颜色值 color: #333 → 应使用 CSS 变量 var(--c-text-1)
  • 使用 @import 导入样式 → 应使用 @use
  • 缺少 scoped 属性
  • 行内 style 过多 → 应抽离到 SCSS 文件
8. API 层审计
  • 直接使用 axios → 应使用 @robot-admin/request-core
  • API 函数缺少 JSDoc
  • 响应类型缺少明确契约 → 使用对应资源的 *.contract.ts 或已有 generated/index.ts
  • 缺少泛型标注 getData<T>(...)
9. Store 审计
  • Store 命名缺少 s_ 前缀
  • 缺少区块注释分隔 // ============ 状态 ============
  • State 中复杂对象未定义 interface
  • 使用 useXxxStore 命名(应为 s_xxxStore)
10. Git 提交审计

提交信息格式:

<type>(<scope>): <subject>
  • 缺少 type → 必须有 feat/fix/docs/style/refactor/perf/test/chore 等
  • 缺少 scope → 强制填写(如 components/views/stores/router 等)
  • subject 不是中文 → 本项目使用中文提交描述
  • type 首字母大写 → 必须小写

输出格式

审计结果以表格呈现:

markdown
## 审计报告:{{文件路径}}

| #   | 维度 | 级别     | 问题描述                 | 建议修正                        |
| --- | ---- | -------- | ------------------------ | ------------------------------- |
| 1   | 命名 | 🔴 Error | Store 命名缺少 s\_ 前缀  | `useUserStore` → `s_userStore`  |
| 2   | 注释 | 🟡 Warn  | 缺少文件头注释           | 添加 @Author/@Date/@Description |
| 3   | 导入 | 🟡 Warn  | 手动导入了 ref           | 删除 import,已自动导入         |
| 4   | 样式 | 🔵 Info  | 可使用 UnoCSS 原子类替代 | `p-4` 替代 `padding: 16px`      |

### 等级说明

- 🔴 Error: 必须修正,违反强制规则
- 🟡 Warn: 建议修正,违反推荐规则
- 🔵 Info: 可选优化,提升代码质量

快速审计命令

当用户说"帮我检查下这个文件的规范"时,按以下流程执行:

  1. 读取目标文件
  2. 逐项检查上述 10 个维度
  3. 输出审计报告表格
  4. 提供一键修正建议(可直接应用的代码修改)

注意事项

  1. 不要过度审计:仅报告违反项目明确约定的问题,不作主观美学判断
  2. 自动导入白名单很长:确认某个 API 确实在自动导入范围内再报告违规
  3. CSS 变量不强制:仅在涉及主题色时建议使用 CSS 变量
  4. 区分 Error/Warn/Info:只有影响运行时或违反 ESLint 强制规则的才标为 Error

© ChenyCHENYU, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/convention-audit of ChenyCHENYU/Robot_Admin.

Open the folder on GitHubat commit ce6be1d

Compare with similar skills

Convention Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Convention Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Convention Audit this skillChenyCHENYU/Robot_Admin1k—~1.5kAutomated safety check: PassMIT
Generate Release Notesteambit/bit18k—~2.2kAutomated safety check: PassCustom licence
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Pnpm Engineteambit/bit18k—~1.9kAutomated safety check: PassCustom licence
Vueoyjt/uniapp-vue3-template6271 repos~783Automated safety check: PassMIT
Vue Best Practicesoyjt/uniapp-vue3-template6273 repos~667Automated safety check: PassMIT

Similar skills

  • Generate comprehensive release notes for Bit from git commits and pull requests.

    18k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Vue

    oyjt/uniapp-vue3-template

    Vue.js progressive JavaScript framework. An agent skill from oyjt/uniapp-vue3-template.

    627 GitHub starsUsed in 1 repo~783 tokens
    DevelopmentAuto-check passed
  • Vue Best Practices

    oyjt/uniapp-vue3-template

    Vue 3 and Vue.js best practices for TypeScript, vue-tsc, and Volar.

    627 GitHub starsUsed in 3 repos~667 tokens
    DevelopmentAuto-check passed
  • Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices.

    158 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from ChenyCHENYU/Robot_Admin

  • API Contract

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: generating TypeScript API layer (type definitions + request functions) from page-spec JSON or Swagger/OpenAPI docs.

    1k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Branch Sync

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: upgrading dependencies, adding common features, or when the user explicitly requests branch sync check.

    1k GitHub stars~883 tokensUpdated yesterday
    Auto-check passed
  • Mock Codegen

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: generating mock data for development without a backend.

    1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Page Codegen

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: generating Vue 3 page code from either a page-spec JSON or a natural language description.

    1k GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Prototype Scan

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: analyzing Axure exported HTML prototype files or detailed design documents to extract page inventory, classify interaction patterns, and produce a structured page-spec…

    1k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Route Sync

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: registering new pages into the dynamic router system.

    1k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Convention Audit

What does Convention Audit do?

A skill your agent uses when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report. Convention Audit is an agent skill from ChenyCHENYU/Robot_Admin. Use when: reviewing code for compliance with Robot Admin project conventions, or when generating a compliance report.

When should I use Convention Audit?

Convention Audit fits situations like: : reviewing code for compliance with Robot Admin project conventions; generating a compliance report; : convention check; naming convention.

How do I install Convention Audit in Claude Code?

Run `npx skills add ChenyCHENYU/Robot_Admin --skill convention-audit -a claude-code`. Or copy the skill folder (.github/skills/convention-audit in ChenyCHENYU/Robot_Admin) into .claude/skills/convention-audit in your project. Claude Code loads it when a task matches its description.

How do I install Convention Audit in Codex?

Run `npx skills add ChenyCHENYU/Robot_Admin --skill convention-audit -a codex`. Or copy the skill folder (.github/skills/convention-audit in ChenyCHENYU/Robot_Admin) into .agents/skills/convention-audit in your project. Codex loads it when a task matches its description.

Can I use Convention Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ChenyCHENYU/Robot_Admin --skill convention-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/convention-audit, .gemini/skills/convention-audit, .github/skills/convention-audit and .opencode/skills/convention-audit in your project.

What does Convention Audit need to run?

SKILL.md names no scripts, command-line tools or credentials: Convention Audit is instructions for the agent only.

Does Convention Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Convention Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Convention Audit use?

Convention Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Convention Audit use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Convention Audit?

Skills that share tags, products or a category with Convention Audit: Generate Release Notes (teambit/bit, 18k stars), Wagmi Feature Development (wevm/wagmi, 6.8k stars), Pnpm Engine (teambit/bit, 18k stars) and Vue (oyjt/uniapp-vue3-template, 627 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Convention Audit?

ChenyCHENYU (a GitHub user) maintains it in ChenyCHENYU/Robot_Admin, which has 1,022 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: ChenyCHENYU/Robot_Admin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.