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-dependenciesdependencies-and-module-interactions-are-explicit-and-well-shaped.md

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

Dependencies and module interactions are explicit and well-shaped

Collaborators, dependency direction, coupling, cohesion, and interface shape work together so modules depend on the right things, for the right reasons, through narrow and comprehensible contracts.

Maintainable modular design is not created by any one property in isolation. Explicit dependencies, sane dependency direction, low coupling, high cohesion, and narrow interfaces reinforce each other and should be reviewed as one connected lens. A change can look clean locally while still damaging maintainability if it hides collaborators, lets high-level policy depend on low-level detail, spreads a responsibility across many places, or exposes a broad interface that gives other modules too much reach.

Strong signs include collaborators that are visible in constructors, parameters, or clearly declared module boundaries; dependencies that point inward toward stable policy rather than outward toward incidental framework or storage detail; modules whose internal elements change for related reasons; and interfaces that expose only the capabilities another module actually needs. Weak signs include service locator style lookups, broad context objects passed everywhere, reach-through access into another module's internals, helpers that know too much about distant subsystems, and interfaces that exist only to mirror implementation detail.

The point of this lens is to ask whether the codebase preserves separable responsibilities. When these properties hold together, change stays local, tests are easier to write, and readers can understand why one part of the system depends on another. When they fail, modules become sticky, edits spread unpredictably, and architecture degrades into a mesh of hidden assumptions. A reviewer using this symptom should judge whether the change makes dependencies and module interactions easier to see, safer to change, and harder to misuse.

Examples

Bad

function ship(order):
  customer = App.services.database.tables.customers.find(order.customerId)
  transport = App.services.email.transport
  transport.send(customer.email, "Your order shipped")

Good

module Shipping:
  interface ShipmentNotifier: shipped(customerId)
  function ship(order, notifier: ShipmentNotifier):
    notifier.shipped(order.customerId)
module Email:
  class EmailShipmentNotifier implements Shipping.ShipmentNotifier

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