Skip to content
Skillpedia
General coding7.0k · #13696

code-quality

What it does

This skill sets habits for writing and reviewing code, comments, tests, and documentation. It is for developers who want code that is clean, honestly tested, and easy to maintain.

When to use it

  • ✓When you are writing or reviewing code and want consistent standards applied.
  • ✓When you are deciding whether a comment belongs in the code or in a test.
  • ✓When tests pass too easily and you need to check that they can actually fail.

Skill link

https://github.com/superdesigndev/treg/blob/main/.agents/skills/code-quality/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/superdesigndev/treg/blob/main/.agents/skills/code-quality/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you review my code and tell me which comments to remove and which tests might pass even when they should not?”

5 new skills a week. 1 minute to read.

How it works

The agent checks each rule that a machine can enforce and adds a check for it. It keeps comments only where behavior cannot be changed, and asks that tests run through the real entry point and be shown to fail before they pass.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Code quality

  1. Enforce, don't instruct. If a machine can check a rule, add the check. Apply these rules to code you change; fix old code in its own PR.

  2. Comments: none by default. Keep one only for behavior we cannot change (vendor, platform, protocol) or a public contract. A reason worth keeping moves to a test, the docs, or the commit message.

  3. Tests must be able to fail. Test behavior through the real entry point; if a test still passes with every dependency returning None, it is fake. Break the behavior, show the failing run, then land it. Never turn CI green by skipping, retrying, sleeping, or loosening an assertion.

  4. Docs say only what code cannot. Keep a sentence only if, without it, the next person would change the code wrongly. Each fact once, where it belongs; when docs and code disagree, fix the doc.

FAQ

Why are comments discouraged?

The skill says to keep a comment only when the code cannot change, such as for a vendor or protocol limit.

What makes a test fake?

The skill says a test that still passes with every dependency returning nothing is fake.

Can I make CI green by skipping tests?

No. The skill says never to skip, retry, sleep, or loosen assertions to get CI to pass.

Details

Original description by the author

Use when writing or reviewing code, comments, tests, or docs.

repo: superdesigndev/treg

Popularity

GitHub stars
7.0k
Ranking position
#13696
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills