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-isolationtests-sit-at-the-right-level.md

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

Tests sit at the right level

Behavior is verified at the cheapest test layer that can provide trustworthy evidence, rather than pushed unnecessarily into broad slow tests.

Good test suites use each layer for the kind of risk it is best suited to reduce. Unit tests should carry small deterministic behavior checks, integration tests should prove real boundaries and wiring, end-to-end tests should protect critical journeys, and smoke tests should decide whether a build or environment is healthy enough to continue. Strong signs include business rules covered close to the logic, infrastructure assumptions covered at integration boundaries, only high-value journeys covered end to end, and smoke checks that stay broad and shallow. Weak signs include exhaustive UI tests for logic that could be covered cheaply, unit tests that fake away the boundary they claim to verify, broad tests used because lower-level seams are missing, and test suites whose cost grows faster than the confidence they provide. This symptom matters because misplaced tests create either false confidence or excessive maintenance cost. Review should ask whether the test proves the intended risk at the narrowest reliable layer.

Examples

Bad

E2E "orders of 50 qualify for free shipping":
  deploy the application and launch a browser
  add products totalling 50 to the cart
  complete every checkout step
  assert the shipping charge is 0

Good

unit "orders of 50 qualify for free shipping":
  assert shippingFee(subtotal = 50) == 0

boundary "checkout returns the calculated shipping charge":
  response = postCheckout(realHandler, subtotal = 50)
  assert response.shippingCharge == 0

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