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.

referencestest-placement-and-isolationtest-data-is-owned-and-isolated.md

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

Test data is owned and isolated

Tests create, control, and clean up the data and state they depend on rather than relying on accidental shared conditions.

Trustworthy tests own their preconditions. A test should not pass because a developer's machine, a shared staging database, a previous test, or a long-lived account happens to contain the expected state. Strong signs include explicit data creation, isolated schemas or namespaces, disposable containers or fixtures, unique identifiers, rollback or cleanup, and tests that can run repeatedly or in parallel without collision. Weak signs include dependence on magic records, shared mutable accounts, hidden ordering requirements, manual preloading, tests that only work on one machine, and data left behind that changes later outcomes. This symptom matters because uncontrolled test data is one of the fastest ways for useful automation to become flaky noise. Review should ask whether the test can prove the same thing from a clean starting point.

Examples

Bad

test "suspend customer":
  customer = findCustomer("customer-42")
  suspend(customer)
test "suspended customer cannot checkout":
  customer = findCustomer("customer-42")
  assert checkout(customer).error == "suspended"

Good

test "suspended customer cannot checkout":
  customer = createCustomer(id = uniqueId(), status = "active")
  try:
    suspend(customer)
    assert checkout(customer).error == "suspended"
  finally:
    deleteCustomer(customer)

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