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.

referencesoperability-and-production-behaviorconfiguration-is-explicit-externalized-and-validated.md

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

Configuration is explicit, externalized, and validated

Environment-dependent behavior is configured outside core logic, read in controlled places, and checked early enough that the system does not run on broken assumptions.

Configuration is maintainable when it is both separate from domain logic and disciplined in how it enters the system. Values that vary by environment, deployment, tenant, or operating mode should not be hard-coded into the implementation. At the same time, configuration should not be read casually throughout the codebase. It should enter through controlled edges, be interpreted in a small number of places, and be validated before the system starts doing meaningful work.

Strong signs include configuration defined outside source, a clear composition or startup boundary where config is loaded, explicit mapping from raw settings to typed internal concepts, and early failure when required values are missing, malformed, or contradictory. Weak signs include environment lookups scattered through business code, magic defaults that hide misconfiguration, runtime surprises caused by late config parsing, and systems that continue half-broken because critical assumptions were never checked.

This symptom matters because configuration errors often look like logic errors in production. Externalizing, centralizing, and validating config reduces environmental drift, makes deployments safer, and keeps the trusted core of the system focused on business behavior rather than process state. It also gives reviewers a clear place to inspect how operating assumptions enter the code.

Examples

Bad

function sendReceipt(order):
  endpoint = environment["RECEIPT_API"] ?? "http://receipt.internal"
  timeout = integer(environment["RECEIPT_TIMEOUT"])
  post(endpoint, order, timeout)

Good

function start(environment):
  config = ReceiptConfig(requiredUrl(environment, "RECEIPT_API"),
                         requiredDuration(environment, "RECEIPT_TIMEOUT"))
  require(config.timeout > 0)
  run(ReceiptService(config))

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