Index of every page on this site: llms.txt
All skills
meza avatar

/clean-code

@982e21e
by mezameza/skills2 stars
Run it yourself

Use when designing, writing, refactoring, reviewing, or explaining code, tests, APIs, modules, or architecture. Provides a progressive catalog of clean-code qualities covering comprehension, domain modeling, state and failure behavior, boundaries, evolvability, operability, safety, and test design.

Use this Skill: https://skilld.dev/gh/meza/skills/clean-code

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescomprehension-and-intentcomplexity-and-control-flow-are-justified.md

≈423 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Complexity and control flow are justified

The solution has no more abstraction, branching, indirection, or special-case handling than the problem actually requires.

Good design resists both needless cleverness and uncontrolled branching. A solution is maintainable when its complexity is proportional to the real problem, its abstractions are earned by repeated need, and its control flow is not dominated by one-off cases or cascades of conditions. These concerns belong together because each is a different way complexity grows faster than the requirement has earned.

Strong signs include a small number of moving parts, abstractions that remove real repetition or protect stable concepts, a main path that is easy to identify, and conditional logic that is structurally contained rather than scattered. Weak signs include speculative wrappers or interfaces, ceremony added for imagined future use, proliferating edge-case branches, deeply nested logic, interacting flags, and designs where understanding behavior means reconstructing a hidden exception model.

This symptom matters because excessive complexity compounds. It raises review cost, hides defects, makes tests harder to trust, and turns later changes into archaeology. Review should ask whether the structure is carrying real domain load or whether the code has accumulated indirection and branching that mostly serves itself.

Examples

Bad

function shippingFee(order):
  if order.total >= 50:
    if order.isMember:
      return 0
    else:
      return 10
  else:
    return 10

Good

function shippingFee(order):
  if order.total >= 50 and order.isMember:
    return 0
  return 10

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts28d3 checks · Risk SAFE
  • Gen Agent Trust Hub28d

    The skill 'clean-code' is a comprehensive educational catalog of software engineering principles and clean-code qualities. It provides structured guidance and pseudocode examples to help AI agents reason about code quality, security, and maintainability. No malicious code, hidden instructions, or security risks were identified during the analysis.

  • Socket28d

    No alerts

  • Snyk28d

    Risk: LOW · No issues

Signed by skilld at 982e21e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Activeupdated 3 months ago

README badge

README badge for meza/skills/clean-code