Logo di Earn Every Line

Earn Every Line

Community
randommonicle
earn-every-line

Nothing enters a file without a present need. Code earns its place by a caller that exists, a comment by saying what the code cannot, flexibility by a stated requirement. Triggers on over-engineered, over-commented, YAGNI, speculative, gold-plating, "just in case", "future-proofing", "flexibility", and on "simplify" / "keep it simple" (both over-correction ditches are fenced); more generally when writing or refactoring code. Does not fire on recognising AI-written code (unslop-code owns the audit), failure-message wording (honest-failure-surfacing), or client-supplied data rules (server-side-authority).

Panoramica

Pubblicato darandommonicle
Repositoryclaude-skills
Nome della skillearn-every-line
Stelle
27
Fork
3
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da randommonicle su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Earn Every Line in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/randommonicle/claude-skills/tree/main/earn-every-line
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/earn-every-line .claude/skills/earn-every-line
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Earn Every Line in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Earn Every Line non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Earn Every Line non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Earn every line

The model's default is to add: the helper the function did not need, the option nobody passes, the try/except around code that cannot fail, a comment per line saying what the line says. Anthropic's own docs admit the tendency of its models (the "Overeagerness" section, written for Opus 4.5/4.6: they "overengineer by creating extra files, adding unnecessary abstractions, or building in flexibility that wasn't requested"), and this library's unslop-code catalog corroborates it from complaint data (over-engineering verified at 7.8% of tell-naming complaints, narrating comments 8.5%). This skill is the write-time gate those numbers point at. Layer: leaf. Admitted by commission plus external evidence rather than the misses log — see Provenance — so candidate-tier until fires accumulate.

The rule

Every line serves someone who exists. Code serves a caller that exists; a comment serves a reader who learns something the code cannot tell them; flexibility serves a requirement someone actually stated. Name the caller, the reader, or the requirement — by name, not by category ("a future maintainer" is a category; "the retry loop in sync.ts" is a name). Cannot name one → it does not go in. The test is positional, so it travels: the check that is rigour at a system edge is noise three calls deep, a public API owes the docstring a module-private helper does not, and a report section or plan phase answers the same question — who needs this now?

Deletion gets the mirror test, and it outranks every licence below: name what is lost if this line goes — the caller, the reader, or the requirement it serves. Can name one → it stays. Concretely banned as "fixes": stripping validation at a trust boundary, deleting a comment that carries a why, golfing for line count, and citing YAGNI to skip tests or refactoring — Fowler's own exclusion: yagni "does not apply to effort to make the software easier to modify" and "is not a justification for neglecting the health of your code base."

At diff level, the same rule: make the change that was asked or is clearly necessary to it. Reformatting neighbours, renaming things you passed, upgrading patterns you dislike — unrequested improvements are speculation in the change dimension, and they turn a 50-line reviewable diff into a 500-line unreviewable one.

The structure half

The phrase YAGNI came out of a Beck–Hendrickson exchange on the C3 project (Fowler's account); the canonical sentence is Jeffries', 1998: "Always implement things when you actually need them, never when you just foresee that you need them." The tests:

  • The named-caller test, at write time. A helper, wrapper, interface, base class, or parameter you are about to add for one caller: inline it. For no caller: do not write it. Removing code that already exists is a different act with a different bar: run blast-radius-grep first (a plain grep misses dynamic dispatch, registries, reflection, test-only callers, open branches, and published surface — an export never counts as zero-callers from inside one repo), and where zero users cannot be established, it stays.
  • Abstract on the third occurrence, not the first. Refactoring (1999) records Don Roberts' guideline: the first time, just do it; the second time, wince and duplicate anyway; the third time, refactor. Until then, "duplication is far cheaper than the wrong abstraction" (Metz, 2016) — and the wrong abstraction does not sit still: "existing code exerts a powerful influence. Its very presence argues that it is both correct and necessary." The retrospective is always the same shape: "My code traded the ability to change requirements for reduced duplication, and it was not a good trade" (Abramov, Goodbye, Clean Code, 2020).
  • Flexibility is a cost until a stated requirement redeems it. An option with one call site passing one value, a config nobody sets, a plugin point with no second plugin. Fowler prices the presumptive feature four ways — build, delay, carry, repair — and carry compounds: every later reader parses the flexibility to learn that nothing uses it.
  • Defence belongs at trust boundaries, and the boundary list is never exhaustive. The vendor's counter-prompt: "Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs)" — and read those two examples as a floor, not the list. Anything that crossed a process, network, storage, tenant, or privilege line, or came out of a model, is external no matter which repo wrote it (server-side-authority and ai-surface-discipline own those surfaces). Inside the boundary, "cannot occur" must be named: point at the constraint, type, or invariant that makes the state unreachable, or the check stays. And a fallback that manufactures a value when code you control fails does not handle the failure, it hides it (no-silent-data-drop owns that rule).
  • Edit in place. No _v2 / _new / enhanced_ forks; git owns history. No backwards-compatibility shim when every caller is in the same diff — and a caller outside this repo means it is not the same diff.

The comment half

One test per comment: does the reader learn something here that the code below cannot tell them? No → do not write it. Yes → it is almost always a why: the constraint that forced this shape, the unit or invariant, the external gotcha, the source of a magic value. The doctrine is institutional, not AI-era: "It is often better for comments to explain why something is done, not what the code is doing" (Google's Go style guide).

On the lines you are writing or changing, do not write: the restatement (// increment i); the narration (# First, we..., // Step 3:) — chat voice serialised into the file; the changelog (// changed to fix bug) — a commit message in the wrong place, stale on arrival; the reviewer-directed justification (// this ensures correctness) — noise to every reader after merge; the essay docstring on a function whose signature says everything. Sweeping comments out of code you were not asked to touch is an unrequested improvement under the diff rule: a de-slop pass over a file is a job someone asks for, not a standing licence.

And the counterweight, which is half the point: this is not a no-comments doctrine. Ousterhout's A Philosophy of Software Design argues comments exist to carry what the code cannot express — intent, units, the semantics a signature cannot hold (nothing in substring(start, end) says whether end is inclusive) — and that self-documenting code is, on inspection, a myth. The failure is reported in both directions: models bury code in restatements, and one HN reviewer describes the reverse, the agent replacing a reasoned why-comment with "Add one to index". A why-comment is load-bearing; deleting one to look terse is narrating in reverse. The test is information delta, never length — and the target is volume and placement, not accuracy: the one study on AI comment accuracy (GPT-3.5, 415 Java elements) rated them equal or better than the human original most of the time.

The other ditch

Told to simplify, the model does not become judicious; it swings: stripped validation, deleted why-comments, four behaviours in one clever expression. The swing has a measured analogue — Giskard's Phare benchmark found "be concise" system prompts degrade factual reliability, with hallucination resistance dropping up to ~20% in the worst case (chat factuality, not coding; an analogue, not a proof) — and nobody posts the coding war story, because a stripped check does not fail at the demo; it fails silently, later, to someone else. The thin incident record is the failure mode working, not evidence of safety. When the instruction is "simplify", the deletion mirror test in The rule is the whole job.

What this skill does not do

It does not audit whether code reads as AI-written — unslop-code owns recognition, and its over-engineering tell (catalog entry 10) routes here for the write-time fix. Where surrounding code exists, unslop-code's fitting-the-codebase method anchors relative (match the neighbours' level; on greenfield, make one deliberate convention and write it down); this skill supplies the absolute test those decisions use — the present need. It does not design failure messages (honest-failure-surfacing), govern what fallbacks may do to content (no-silent-data-drop), judge tests (prove-it-can-fail), or own plan-level scope lists (plan-first) and deferred-work anchors (flag-deferred-items) — it is the deletion pressure inside them. It does not forbid abstraction, comments, or defence; it prices each against a present need. And it ships no scanner, deliberately: these tells need a call graph and judgment, and the one regex-able form (narrating comments) is already in unslop-code's scanner. A second scanner would be a helper with one caller.

Why

A speculative line is never neutral: it is read on every pass, carried through every refactor, and it is surface for bugs to hide in ("every extra layer is more surface for a bug to hide in" — the unslop-code catalog). Generation amplified the old failure, and the ecosystem numbers moved: GitClear's Jan-2026 report measures duplicated blocks up 81% since 2023, refactoring down to under 4% of changed lines, and error-masking constructs up 47% — vendor-published, but the only longitudinal series anyone has. Restraint is no longer a senior taste; it is the explicit counterweight to the tool's default, and its cheapest form is one word: "best weapon against complexity spirit demon is magic word: 'no'" (grugbrain.dev).

Provenance

Commissioned by the operator, 2026-08-17, against over-engineering and diary-comments in AI-assisted work; no in-house lessons entry yet, so admitted by commission plus external evidence, following rerun-before-verdict's precedent. Quoted sources were verified by direct fetch on 2026-08-17, in-session or by the commissioned research agents, statuses per the committed packs: Anthropic's prompting best-practices (platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices, "Overeagerness"), Fowler's Yagni bliki (2015), Jeffries' You're NOT Gonna Need It (1998), Metz's The Wrong Abstraction (2016), Abramov's Goodbye, Clean Code (2020), Google's Go style guide, grugbrain.dev, Giskard's Phare study. Paraphrased with attribution and deliberately never quoted, because the relevant primary text stayed unopened: Don Roberts' rule of three as recorded in Refactoring (1999); Ousterhout (2018) — his free extract was read first-hand on 2026-08-17 but carries chapters 6 and 21 only, not the comment chapters (research doc, Part 3). Figures: GitClear's Jan-2026 maintainability report (its separate 2025 report is not the source of any figure here); Guelman et al., arXiv:2408.14007 (comment accuracy); Gloaguen et al., arXiv:2602.11988 — the one controlled test of repository instruction files: LLM-authored files cut task success 2–3%, human-written gained ~4%, both raised cost 20%+, mechanism named as over-instruction and over-reliance. This skill is itself LLM-drafted — the population in that study's negative arm — which is why it was operator-commissioned, adversarially reviewed against its own evidence packs, and kept deliberately small. Both research packs are preserved verbatim as Part 1 and Part 2 of docs/RESEARCH_2026-08-17_earn-every-line.md, committed alongside this skill; the in-house shares (7.8% / 8.5%) are unslop-code/references/tells.md entries 10 and 1. Fowler, Metz, and the Anthropic defensive-coding bullet were re-verified first-hand by the lead.

Domande frequenti

Cosa fa la skill IA Earn Every Line?

Nothing enters a file without a present need. Code earns its place by a caller that exists, a comment by saying what the code cannot, flexibility by a stated requirement. Triggers on over-engineered, over-commented, YAGNI, speculative, gold-plating, "just in case", "future-proofing", "flexibility", and on "simplify" / "keep it simple" (both over-correction ditches are fenced); more generally when writing or refactoring code. Does not fire on recognising AI-written code (unslop-code owns the audit), failure-message wording (honest-failure-surfacing), or client-supplied data rules (server-sid...

Perché usare Earn Every Line su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Earn Every Line è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Earn Every Line in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/randommonicle/claude-skills/tree/main/earn-every-line. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Earn Every Line?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Earn Every Line?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Earn Every Line: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Earn Every Line è gratuita?

Sì. È pubblicata su GitHub da randommonicle con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇