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.

referencesstate-effects-and-failure-behaviorrecovery-paths-are-intentional.md

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

Recovery paths are intentional

Restart, retry, replay, rollback, and repair stories exist where the domain requires them.

Recovery paths are part of maintainability because broken systems must be repairable. Review should ask whether replay, rollback, retry, restart, or manual recovery are possible where the domain needs them. In review, this is about whether the system can survive evolution, skew, retries, failures, and operational reality without losing coherence. Strong signals are deliberate recovery stories, compatibility-aware boundaries, reproducible delivery, navigable structure, and interfaces that make correct use easier than misuse. Weak signals are brittle migrations, unexamined version skew, hidden build assumptions, and local shortcuts that quietly increase long-term coupling. The educational point is that maintainability is proven over time, especially when the system is under stress or in transition. For this specific symptom, the reviewer should ask whether the change makes 'Recovery paths are intentional' 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

payment.charge(order.total)
while true:
  try:
    inventory.reserve(order.items)
    return CONFIRMED
  catch failure:
    continue

Good

payment.chargeOnce(order.id, order.total)
for attempt in 1..3:
  try: inventory.reserveOnce(order.id, order.items); break
  catch failure: if failure.transient: wait(backoff(attempt)); else: break
state = inventory.reservation(order.id)
if state == RESERVED: inventory.confirmOnce(order.id); return CONFIRMED
cancelled = inventory.cancelOnce(order.id)
refunded = payment.refundOnce(order.id, order.total)
if cancelled and refunded: return FAILED
markRecoveryPending(order.id); return RECOVERY_PENDING

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