{"data":{"slug":"discovered-ddef6eef4935db377cc30e8113a47c12ba1cec4e9240b9bf","title":"Principle Laziness Protocol","summary":"Apply the Principle Laziness Protocol to implement the smallest change that fully accomplishes the task, avoiding unnecessary complexity.","url":"https:\/\/skillshunter.net\/skills\/discovered-ddef6eef4935db377cc30e8113a47c12ba1cec4e9240b9bf","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-ddef6eef4935db377cc30e8113a47c12ba1cec4e9240b9bf","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-ddef6eef4935db377cc30e8113a47c12ba1cec4e9240b9bf.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-ddef6eef4935db377cc30e8113a47c12ba1cec4e9240b9bf\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before writing new code, check if an existing helper, standard library feature, or installed dependency can fulfill the requirement. If not, write the least code that works, ensuring validation, error handling, and security are not omitted.","instructions":"---\nname: principle-laziness-protocol\ndescription: When tempted to add layers, make the smallest change instead.\ndisable-model-invocation: true\n---\n\n# Laziness Protocol\n\nBe lazy about the solution, never about finishing it.\n\nBefore you write new code, go down this list and stop at the first rung that fully does the job.\n\n1. **Skip it.** Drop the option, flag, or generality nobody asked for, and name what you dropped in one line of the reply. A loose request gets the smallest version that does its core job.\n2. **Reuse it.** Take the helper, component, or pattern this codebase already has, and call it the way its neighbors do.\n3. **Take it from the platform.** Use the standard library or a built-in feature, unless the project already wraps it.\n4. **Take it from an installed dependency.** A few lines never justify adding one.\n5. **Write one plain line.** It counts only if a reader gets it at a glance.\n6. **Write the least code that works.**\n\n- **Reach every place the change breaks.** Find its callers, tests, fixtures, and config before you edit, and update them all. A small diff that leaves a caller broken is unfinished.\n- **Minimize the diff.** Make the smallest change that solves the problem. Fewer lines beat \"elegant\" boilerplate.\n- **Consolidate decisions.** Do not repeat the same choice in several places. Put it behind one source of truth and pass the result as a simple flag.\n- **Keep the codebase's shape.** Add no layer, wrapper, or type conversion it does not already use. Deleting beats adding.\n- **Break ties on correctness.** Between two changes of the same size, take the one that handles the edge cases.\n\nNever cut these to save lines: validation where untrusted input enters, error handling that prevents data loss, security checks, accessibility, and anything the user asked for.\n\nThe list sizes the option you build. While the design is still open, the **exhaust-the-design-space** principle skill decides how many options to try.\n","use_cases":["Refactoring a feature to use an existing helper function","Replacing custom logic with a standard library function","Avoiding the addition of new dependencies for simple tasks"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jueyi6\/empstack\/blob\/74181e31d2f00313f8683ba157966efcabbe109e\/skills\/principle-laziness-protocol\/SKILL.md","source_commit":"74181e31d2f00313f8683ba157966efcabbe109e","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:56:15.000000Z","updated_at":"2026-12-02T09:15:14.000000Z","seo_title":"Principle Laziness Protocol for Efficient Code Implementation","seo_description":"Implement the Principle Laziness Protocol to ensure minimal, effective code changes that avoid unnecessary complexity and maintain quality.","seo_keywords":["principle laziness protocol","minimal code implementation","code reuse","software development best practices","efficient coding"]}}