Logo Earn Every Line

Earn Every Line

Cộng đồng
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).

Tổng quan

Nhà phát hànhrandommonicle
Kho mãclaude-skills
Tên kỹ năngearn-every-line
Sao
27
Bản fork
3
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được randommonicle công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Earn Every Line trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/randommonicle/claude-skills/tree/main/earn-every-line
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Earn Every Line trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Earn Every Line ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Earn Every Line với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Earn Every Line làm được gì?

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...

Vì sao nên dùng Earn Every Line trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Earn Every Line là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Earn Every Line trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/randommonicle/claude-skills/tree/main/earn-every-line. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Earn Every Line?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Earn Every Line với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Earn Every Line với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Earn Every Line có miễn phí không?

Có. Kỹ năng này được randommonicle phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇