agentleFS
aryehcarmiaryehcarmi/leetcode-interview-coach/skills/salvage/SKILL.md

salvage

Skill0 starsChanged 4 months agoMITView on GitHub

Repair a LeetCode-style or coding-interview attempt with the fewest line and token changes needed for correctness, preserving the attempted approach. Use when explicitly invoked on attached, pictured, or pasted code.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. howells/skills★ 4same name
    2. Jakeintech/waybill★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository12 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the visible problem, constraints, code, line numbers, errors, outputs, and relevant thread context.

    line 12
  2. Distinctive:

    Ask one focused question only when missing information makes a correctness judgment unsafe.

    line 14
  3. Distinctive:

    Do not print the complete corrected attempt unless the user explicitly asks for it.

    line 23
  4. Distinctive:

    If the attempted algorithm cannot satisfy the constraints, say so plainly and show the smallest necessary algorithmic pivot.

    line 24
  5. Very specific:

    Write the marker as a trailing comment in the target language's own comment syntax, and never mix two languages' syntax: // NEW in C, Java, …

    line 34
  6. Distinctive:

    Do not mark code the user has no existing version of.

    line 36
  7. Very specific:

    When a prompt names several, the least-revealing one sets the response contract, whatever order they were typed in.

    line 44
  8. Distinctive:

    Do not edit, run, or submit the user's code without permission.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Salvage

Find the earliest root-cause defect and make the minimum working change.

Inspect the attempt

  1. Read the visible problem, constraints, code, line numbers, errors, outputs, and relevant thread context.
  2. Infer the language, attempted algorithm, and earliest defect that explains the failure.
  3. Ask one focused question only when missing information makes a correctness judgment unsafe. Otherwise state the assumption and proceed.

Repair minimally

  • Preserve the attempted algorithm, control flow, data structures, names, and language whenever they can satisfy the constraints.
  • Fix correctness before style or asymptotic performance.
  • Return the location, the minimal marked snippet, one sentence naming the root cause, and the resulting time and auxiliary-space complexity.
  • Show only one unchanged existing line above and below each contiguous change when available.
  • Mark the changed lines as described below.
  • Do not print the complete corrected attempt unless the user explicitly asks for it.
  • If the attempted algorithm cannot satisfy the constraints, say so plainly and show the smallest necessary algorithmic pivot. Do not disguise a rewrite as a tiny fix.

Mark the changes

A marker tells the user what to edit in a file they already have, so it belongs only on a patch against existing code.

  • A line the user must add → NEW
  • An existing line the user must change → MOD
  • An unchanged line shown for context → no marker

Write the marker as a trailing comment in the target language's own comment syntax, and never mix two languages' syntax: // NEW in C, Java, JavaScript, Go, or Rust; # NEW in Python, Ruby, or shell; -- MOD in SQL or Lua; <!-- NEW --> in HTML.

Do not mark code the user has no existing version of. When every line is new there is nothing to distinguish, and the markers are pure noise.

Compose

Base skills, ordered by how much of the solution they hand over:

follow-up → check → lcd → stuck → salvage → optimize → best

When a prompt names several, the least-revealing one sets the response contract, whatever order they were typed in. Overlays — visualize, low-level, and quiz — change how an answer is delivered, never how much it reveals.

Integrate an overlay without expanding the repair or replacing the approach.

Do not edit, run, or submit the user's code without permission. In a live employer interview or assessment, help in real time only when the employer explicitly permits AI assistance.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.