---
name: less-but-better
optimized for: Claude Code, Codex
description: Use when the user invokes /less-but-better. Adds one standing task to the whole session, on top of the main task, for both implementation work and reviews. Only the user invokes it; it stays active until the session ends.
title: less-but-better
canonical_url: https://skilld.dev/gh/ferriskleier/skills/less-but-better
last_updated: 2026-10-06T06:15:57.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ferriskleier/skills/less-but-better`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/less-but-better`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ferriskleier/skills/less-but-better) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/less-but-better`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/less-but-better --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/less-but-better --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# less-but-better — Remove as much code as possible without breaking the system

## Overview

"Weniger, aber besser" — less, but better. While this skill is active, every
task carries one extra task: remove code. The system must keep working; the
tests decide what "working" means. Good code is not code with nothing left to
add. Good code is code with nothing left to remove.

**Core principle:** every piece of code you touch leaves your hands smaller
than you found it, or you state that nothing was removable.

## During implementation — the removal pass

Do the main task first. When your change works, the turn is NOT done. Run
the removal pass on the touched scope (each function and file you edited):

1. Reread the touched scope as if you wrote none of it.
2. List the removable weight (see the table below).
3. Verify each removal: grep for callers before you delete a symbol; check
   what the tests cover.
4. Apply the removals directly. Do not ask first.
5. Run the tests. All tests must pass.
6. Report the result as its own line: `Removed: <what> (−N lines)`, or
   `Removed: nothing — <one short reason>`.

The pass is bounded by the touched scope. Removable code elsewhere in the
repo gets one line ("also removable: <path> — <what>") and no edit.

## During a file-by-file review

Reviews propose; they do not edit. For each reviewed file, after the
findings, add one required section:

```
Trim:
- <path>:<line> — <what to remove or reduce> → <replacement> (−N lines)
```

Each entry names the removal, the replacement (or "delete"), and the
estimated line delta. When there is nothing: `Trim: nothing found.` Never
omit the section. Keep defects and trims separate — a bug is a finding, not
a trim.

## What counts as removable

| Weight | Action |
|---|---|
| Unused imports, variables, parameters, functions | Delete (grep for callers first) |
| Commented-out code | Delete; version control remembers it |
| Hand-rolled stdlib (padding loops, manual joins, dedupe scans) | Replace with the builtin |
| Duplicated logic | Keep one copy; the rest calls it |
| Wrappers that only forward | Inline them |
| Branch chains that map a value to a value | One lookup table |
| Flags and options with exactly one caller and one value | Remove the option |

## Safety rules

- A removal must not change observable behavior. Tests pass before and after.
- Warning: a symbol with zero callers in this file can have callers elsewhere.
  Grep the repo before you delete any function, class, or export.
- Untested code paths: do not apply the removal silently. Propose it, or add
  the missing test first.
- Do not touch public API shapes, wire formats, or persisted data.
- When a removal and the main change conflict, the main change wins.

## Red flags — you are about to skip the pass

- "The feature works, I'm done" — the removal pass has not run. Not done.
- "Cleanup is out of scope" — this skill puts it in scope, permanently.
- "I only added two lines" — two lines added to a bloated function is the
  exact trigger. Read the whole function.
- "Deleting feels risky" — an unverified deletion is risky. Verify, then delete.
- "I'll note it for later" — later is only for code outside the touched scope.
