agentleFS
musahyderrmusahyderr/mainseat/.claude/skills/reuse-first/SKILL.md

reuse-first

Skill1 starsChanged 14 days agoMITView on GitHub

Check for existing code or a library before creating anything new.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Map: Search CODEMAP.md for the name and 2-3 synonyms (e.g.

    line 12
  2. Very specific:

    Scout: Ask the explorer agent one precise question: "Is there existing code that <does X>?

    line 14
  3. Distinctive:

    Confirm a "no match": Do one direct search yourself (Grep for the key word) before believing it.

    line 17
  4. Very specific:

    Dependencies: Check the project's dependency file (requirements.txt, pyproject.toml, package.json, go.mod, ...) for a library already …

    line 19
  5. Distinctive:

    Never send project code or private details in a web search.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

reuse-first

Duplicate code costs tokens twice: once to write it, again every time someone has to read both copies. Search first; it is far cheaper than building.

Steps (stop at the first step that finds a fit)

  1. Map. Search CODEMAP.md for the name and 2-3 synonyms (e.g. "parse date" → parse, date, time, format). Match whole words.
  2. Scout. Ask the explorer agent one precise question: "Is there existing code that <does X>? Return path:line or no match." For a wide search, run 2 explorer calls at once with different angles (definitions vs. callers).
  3. Confirm a "no match". Do one direct search yourself (Grep for the key word) before believing it. Scouts can miss.
  4. Dependencies. Check the project's dependency file (requirements.txt, pyproject.toml, package.json, go.mod, ...) for a library already installed that does it.
  5. Standard solution. Still nothing and the task is common (dates, CSV, retries, validation)? Ask the researcher agent for the standard-library or well-known way. Never send project code or private details in a web search.

Then decide, in one line

  • reuse: <path:line>: call it as is.
  • extend: <path:line>: small change to existing code (keep its callers working).
  • new: <path>: nothing fits; say why in a few words. After creating it, refresh the map (/map).

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.