bad-smell SKILL.md skillA
bad-smell from john-walks-slow/rabbit-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add john-walks-slow/rabbit-skills/bad-smell@git:20261030.60282cfPins git:20261030.60282cf in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- john-walks-slow/rabbit-skills
- Path
.apm/skills/bad-smell/SKILL.md- Versions recorded
- 2
- Latest version
- git:20261030.60282cf, committed Oct 30, 2026
- First version recorded
- Jul 18, 2026
- Size
- 2,192 bytes
- Repository stars
- 27
- License
- none declared
识别到代码坏味道时,阅读本技能并及时重构。例:重复代码,过长函数,过大的类,过长参数列,数据泥团,依恋情结,基本类型偏执,重复的 Switch,拒绝遗赠,发散式变化,霰弹式修改。.
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
# bad-smell
检查代码是否有以下坏味道:
- 代码臃肿
- 重复代码(Duplicated Code):多个地方有结构相似的代码,复制粘贴导致修改时容易遗漏。
- 过长函数 / 方法(Long Method):一个函数写了成百上行,逻辑复杂,难以理解。
- 过大的类(Large Class):一个类承担了太多职责,内聚性差。
- 过长参数列(Long Parameter List):函数参数过多(通常超过5个),调用和阅读都很吃力。
- 数据泥团(Data Clumps):总是一起出现的几个数据项(如一些字段总是结伴出现在不同的类或方法中),应封装成对象。
- 面向对象滥用
- 依恋情结(Feature Envy):某个函数对另一个类的兴趣远高于自己所处的类,频繁调用别人的数据。
- 基本类型偏执(Primitive Obsession):过度使用基本数据类型(如用字符串或整型表示复杂的业务概念,而不是封装成对象)。
- 重复的 Switch(Repeated Switches):到处是相同的 switch-case 或 if-else 条件分支,扩展新类型时需要修改多处。
- 拒绝遗赠(Refused Bequest):子类继承了父类,却不实现或不需要父类的方法和数据。
- 变更时的阻碍
- 发散式变化(Divergent Change):一个类经常因为不同的原因在不同的方向上发生修改(说明职责太杂)。
- 霰弹式修改(Shotgun Surgery):每遇到一个微小变化,就得到处修改许多个不同的类。
项目当前处于早期开发阶段。**架构债务越早处理越好。**
若你能“嗅到”明显更优的设计,且范围可控无风险,请立刻随手优化、重构。
如果重构范围较大、风险较高或需要进一步规划,请在 `{project_root}/docs/freeform/yymmdd-{summary}.smell.md` 简单记录你发现的坏味道,然后回到原有任务。Read the whole file at its exact version.
How to install
mdr add john-walks-slow/rabbit-skills/bad-smell@sha256:cee3b06649c4f57aThe line at the top of this page pins the label git:20261030.60282cf, 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_5rnajss7zltx2vz5)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Jul 18, 2026 and Oct 30, 2026, about one every 104 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261030.60282cf latest | 2026-10-30 | 60282cf | 2,192 B | A | view · diff |
| git:20260718.f90f3b5 | 2026-07-18 | f90f3b5 | 640 B | A | view |
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 (2192 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
john-walks-slow/rabbit-skills · 27 stars · license none declared · pushed 2026-11-02 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_5rnajss7zltx2vz5 GET https://markdownregistry.com/api/v1/resolve?ref=john-walks-slow/rabbit-skills/bad-smell GET https://markdownregistry.com/api/v1/blob/cee3b06649c4f57a7432867c8e6954b7a6929b8edffd9307512be32231f58ec0
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.