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.

referencesstructure-boundaries-and-dependenciesrelated-things-live-together.md

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

Related things live together

Logic, data, and rules that belong together are not scattered across distant files or layers.

High maintainability depends on proximity of related behavior, rules, and data. When logic that changes together is split across many places, readers lose context and changes start missing one of the required touch points. In review, this is about how much interpretation work the reader must do before they can trust what the code is trying to accomplish. Strong signals are names, structure, and local flow that let another engineer build a correct mental model quickly. Weak signals are vague labels, mixed levels of abstraction, hidden assumptions, or a need to chase many references before the unit makes sense. The educational point is that readability is not cosmetic; it is what makes future change, debugging, and review safe. For this specific symptom, the reviewer should ask whether the change makes 'Related things live together' easier to see and rely on, or whether it makes the surrounding code more ambiguous. A good detail line here should help a future reviewer explain not only what this symptom means, but also why its absence raises maintenance cost, defect risk, or review uncertainty.

Examples

Bad

config/shipping:
  STANDARD_FEE = 5
checkout/order_totals:
  shipping = 0 if subtotal >= 50 else config.STANDARD_FEE
receipts/shipping_label:
  label = "Free" if order.shipping == 0 else "Standard"

Good

module ShippingPolicy:
  FREE_OVER = 50
  STANDARD = ShippingOption(label: "Standard", fee: 5)
  FREE = ShippingOption(label: "Free", fee: 0)
  quote(subtotal) = FREE if subtotal >= FREE_OVER else STANDARD
Checkout.shipping = ShippingPolicy.quote(subtotal)
Receipt.shippingLabel = order.shipping.label

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