RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/lzyyzznl/all_in_one_search

Cursor rule

.cursor/rules/clean-code.mdc
Cursor rules

Quality

30/100

Scores the file, not the repository.

Length

91 words

11 headings · 0 code blocks

Repository

1

— · pushed 337 days ago

Last changed

3 days ago

First indexed 3 days ago.
lzyyzznl/all_in_one_search/.cursor/rules/clean-code.mdcRawGitHub
1---
2globs: *.ts,*.vue
3alwaysApply: false
4---
5 
6---
7 
8description: 编写整洁、可维护且易于人类阅读的代码指南。在编写或审查代码时遵循这些规则,以确保代码的一致性与质量。
9globs:
10 
11---
12 
13# 整洁代码规范
14 
15## 常量优于魔法数字
16 
17• 用命名常量替代硬编码值
18• 使用描述性强的常量名,明确说明数值的用途
19• 将常量置于文件顶部,或存入专用的常量文件中
20 
21## 有意义的命名
22 
23• 变量、函数与类名应直接体现其用途
24• 名称需阐明其存在的意义及使用方式
25• 避免使用缩写(除非是通用约定俗成的缩写)
26 
27## 智能注释
28 
29• 不要为代码的功能写注释——让代码自身具备文档性
30• 用注释解释「为何这样做」而非「做了什么」
31• 为 API、复杂算法及非直观的副作用添加文档说明
32 
33## 单一职责
34 
35• 每个函数仅负责完成一项具体任务
36• 函数应保持短小精悍,聚焦单一目标
37• 若一个函数需要额外注释解释其功能,则说明它需要拆分
38 
39## DRY(不要重复自己)
40 
41• 将重复代码提取为可复用的函数
42• 通过合理抽象共享通用逻辑
43• 维护单一数据源(避免多位置维护同一数据)
44 
45## 整洁结构
46 
47• 将相关代码集中存放
48• 按逻辑层级组织代码
49• 文件与文件夹命名保持统一规范
50 
51## 封装
52 
53• 隐藏具体实现细节
54• 暴露清晰易懂的接口
55• 将嵌套的条件判断拆分为命名良好的独立函数
56 
57## 代码质量维护
58 
59• 持续进行代码重构
60• 尽早修复技术债务
61• 确保离开时的代码比接手时更整洁
62 
63## 测试
64 
65• 修复 bug 前先编写测试用例
66• 保持测试代码的可读性与可维护性
67• 覆盖边界条件与异常场景的测试
68 
69## 版本控制
70 
71• 编写清晰的提交信息(说明修改内容与目的)
72• 提交小而专注的变更(避免大而全的提交)
73• 使用有业务含义的分支名(如 feature/login、fix/payment-error)
74 

Sections

  • 整洁代码规范
  • 常量优于魔法数字
  • 有意义的命名
  • 智能注释
  • 单一职责
  • DRY(不要重复自己)
  • 整洁结构
  • 封装
  • 代码质量维护
  • 测试
  • 版本控制

Stack — with the evidence

typescript

(1.00)

node

(0.70)

vue

(0.70)

vite

(0.70)

javascript

(0.60)

pnpm

(0.60)

Glob targeting

  • *.ts
  • *.vue

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
lzyyzznl
Language
—
License
—
Archived
no

All configs in this repo

Also in lzyyzznl/all_in_one_search

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
lzyyzznl/all_in_one_search.cursor/rules/common.mdc · 1Cursor rulestypescriptnode+4no sections50/1003 days ago
lzyyzznl/all_in_one_search.cursor/rules/git.mdc · 1Cursor rulestypescriptnode+4typesgit58/1003 days ago
lzyyzznl/all_in_one_search.cursor/rules/quality-rule.mdc · 1Cursor rulestypescriptnode+4no sections30/1003 days ago
lzyyzznl/all_in_one_search.cursor/rules/tailwind.mdc · 1Cursor rulestypescriptnode+4ui44/1003 days ago
lzyyzznl/all_in_one_search.cursor/rules/ts.mdc · 1Cursor rulestypescriptnode+4types44/1003 days ago
lzyyzznl/all_in_one_search.cursor/rules/vue.mdc · 1Cursor rulestypescriptnode+4typesapiui44/1003 days ago
Diff against .cursor/rules/common.mdc Diff against .cursor/rules/git.mdc Diff against .cursor/rules/quality-rule.mdc Diff against .cursor/rules/tailwind.mdc Diff against .cursor/rules/ts.mdc Diff against .cursor/rules/vue.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack