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-dependenciesboundaries-and-layers-reflect-real-responsibilities.md

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

Boundaries and layers reflect real responsibilities

Module boundaries, layering, boundary crossings, and separation of policy from mechanism are arranged so the structure of the system matches its real responsibilities instead of incidental technical detail.

A healthy structure makes it obvious where domain policy lives, where mechanism lives, and where important boundaries are crossed. Meaningful module boundaries, consistent layering, visible boundary crossings, and clear separation of policy from mechanism belong together because they all answer the same question: does the shape of the system help a reader understand responsibility, or does it force them to reverse engineer it from mixed concerns.

Strong signs include modules centered on genuine capabilities or lifecycle concerns, layers that are used consistently across similar features, explicit transitions when code crosses persistence, network, trust, or process boundaries, and business rules that are not buried inside transport adapters, ORM models, controllers, or framework plumbing. Weak signs include folder structures that look tidy but do not protect any real responsibility, layers that are followed in some places and ignored in others, hidden boundary crossings that make latency or trust shifts easy to miss, and code where business policy is inseparable from database, web, queue, or framework mechanics.

This symptom matters because structure is how large systems remain intelligible over time. If boundaries and layers reflect real responsibilities, reviewers can predict where new behavior belongs and how changes should travel through the system. If they do not, the codebase becomes harder to navigate, abstractions become ceremonial, and correctness starts depending on tribal memory. Review this lens by asking whether the change clarifies the system's responsibilities and boundary crossings or further entangles policy with implementation detail.

Examples

Bad

function approveOrder(request):
  order = sql.query("SELECT * FROM orders WHERE id = ?", request.orderId)
  if order.total > 10000 and not request.actor.isManager:
    return http.forbidden()
  sql.execute("UPDATE orders SET status = 'approved' WHERE id = ?", order.id)
  queue.publish("order-approved", order.id)
  return http.ok()

Good

function approveOrder(request):
  result = approveOrder.run(request.orderId, request.actor)
  return http.from(result)
class ApproveOrder(orders: OrderRepository, events: EventPublisher):
  function run(orderId, actor):
    order = orders.load(orderId)
    order.approve(actor)
    orders.save(order)
    events.publish(OrderApproved(order.id))
    return Approval.accepted()

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