Frontend Code Standards logo

Frontend Code Standards

Organization
91160
frontend-code-standards

编写、修改或审查前端代码时使用,在宣称工作完成或提交代码之前也必须使用

Overview

Publisher91160
Repositoryskills
Skill namefrontend-code-standards
Stars
21
Forks
3
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by 91160 on GitHub. Read the source before you install it.

Installation

Install the Frontend Code Standards AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/91160/skills/tree/master/skills/ny-sdd-workflow/tools/frontend-code-standards
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/91160/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ny-sdd-workflow/tools/frontend-code-standards .claude/skills/frontend-code-standards
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frontend Code Standards in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frontend Code Standards on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frontend Code Standards is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

前端编码规范

概述

通用前端编码规范与代码质量检查流程。自动识别 TS/JS 环境,按需加载规则。项目特有规则定义在项目 CLAUDE.md 或 code_standards.md 中,优先级高于本 skill。

适用场景

dot
digraph flow {
  rankdir=LR;
  "编写新代码" [shape=box];
  "修改现有代码" [shape=box];
  "审查代码 / PR" [shape=box];
  "准备提交 / 宣称完成" [shape=box];
  "编写新代码" -> "加载对应规则" [label="按规则编写"];
  "修改现有代码" -> "加载对应规则" [label="遵守规则"];
  "审查代码 / PR" -> "加载对应规则" [label="逐项检查"];
  "准备提交 / 宣称完成" -> "执行提交前检查清单" [label="必须全部通过"];
}

不适用: 编码问题咨询、项目架构、环境搭建、DevOps 流程。

环境检测

应用规则前,先检测项目环境:

  1. 检查项目根目录是否存在 tsconfig.json
  2. 存在 → TypeScript 项目:加载 references/typescript.md,应用所有 (ts) 标签的规则
  3. 不存在 → JavaScript 项目:跳过所有 (ts) 标签的规则

执行流程

  1. 编写代码时:加载 references/coding.md,按规则编写
  2. 编写 TS 代码时:额外加载 references/typescript.md
  3. 优化代码时:加载 references/performance.md
  4. 审查代码时:将规则作为检查清单逐项核对
  5. 提交代码前:必须执行下方「提交前检查清单」

提交前检查清单

自动化检查

bash
# TypeScript 项目执行类型检查
npx vue-tsc --noEmit 2>&1 | grep "src/views/修改的模块/"
# 或: npx tsc --noEmit

# Lint 检查
pnpm lint
# 或: npm run lint

手动检查

  • 无未使用的导入、变量、函数
  • 无注释掉的代码块
  • 无 console.log / console.warn 调试语句(带模块/作者标识前缀的豁免)
  • 无空函数(除非有 TODO 说明原因)
  • references/coding.md 中所有 (all) 标签规则均已满足
  • 所有 (ts) 标签规则均已满足(仅 TypeScript 项目)

速查表

问题修复方案
未使用的导入/变量直接删除
注释代码块完全删除或恢复使用
console.log删除或使用项目日志工具(带标识前缀的豁免)
空函数实现功能或添加 TODO: 说明
跳转后缺少 return在导航调用后立即 return
数组方法无类型守卫添加 Array.isArray() 检查

红灯警告

以下想法意味着你正在违反规范,应该立即纠正:

借口现实
"这个 console.log 只是临时调试"临时代码不应提交 — 使用项目日志工具或添加标识前缀
"历史代码也用 =="规范仅约束新增代码,历史代码保持不变
"这个 ref([]) 类型以后再加"以后也不会加 — 立即补上泛型类型
"这个组件太小不需要 scoped"通用类名必须加 scoped,与组件大小无关
"遵守规范太慢了"写完再排查问题花的时间更长

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frontend Code Standards AI skill do?

编写、修改或审查前端代码时使用,在宣称工作完成或提交代码之前也必须使用

Why use Frontend Code Standards on TypingMind?

Because you install it once and use it with any model. Frontend Code Standards is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frontend Code Standards in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/91160/skills/tree/master/skills/ny-sdd-workflow/tools/frontend-code-standards. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frontend Code Standards?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frontend Code Standards?

As many as you like. As long as a model supports skills, you can use Frontend Code Standards with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frontend Code Standards AI skill free?

It is published on GitHub by 91160. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇