agentleFS
ContextLabContextLab/claude-skill-compounder/skills/reuse/SKILL.md

reuse

Skill1 starsChanged 38 days agoMITView on GitHub

Use when starting a substantial task (building a script, tool, skill, pipeline or procedure), or when a "[compound] Reuse before building" message appears. Checks for existing lessons, skills, scripts and earlier requests to reuse or broaden before writing anything new.

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. raphaelsalaja/skills★ 62same name
    2. sanmidable/skills★ 2same 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 repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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:

    Before building something, find out whether it, or most of it, already exists.

    line 8
  2. Distinctive:

    Do all four. Each one finds things the others miss.

    line 17
  3. Distinctive:

    The skills this session already has: Read the list of available skills in your context.

    line 36
  4. Very specific:

    If a [compound] Reuse before building message listed items, start with those: open each one it names before deciding anything.

    line 48
  5. Distinctive:

    It exists and fits: Use it. Say which one you used.

    line 53
  6. Distinctive:

    When it is not clear whether an existing thing may be changed (it belongs to another project, or another use depends on it), ask the user …

    line 62
  7. Very specific:

    If the work taught something a later session would otherwise have to work out again, record it with the compound:learn skill.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Reuse before building

Before building something, find out whether it, or most of it, already exists. Work that exists is used. Work that nearly fits is broadened. Only what nothing covers is built new.

Which compound to run. A [compound] message ends with a line compound CLI: <absolute path>. Run that path. If there is no such message, run compound from PATH. Below, compound stands for whichever applies.

1. Look in four places

Do all four. Each one finds things the others miss.

  1. Recorded lessons, skills and scripts, ranked by how well they match:

    compound find "<keywords from the request>"

    It also prints earlier requests like this one from the prompt log.

  2. Everything recorded, and the project's scripts, when the keywords may not match the words the thing was described with:

    compound list --scripts

    compound show <name> prints one lesson or skill in full, with its path and attached files.

  3. The skills this session already has. Read the list of available skills in your context. A skill that covers the task is invoked with the Skill tool, not rebuilt.
  4. The user's earlier requests, across projects, when surfer (history-surfer) is installed:

    surfer search "<keywords>" --all

    An earlier request like this one means the work may already exist in that project, and it shows what the user asked for last time in their own words.

If a [compound] Reuse before building message listed items, start with those: open each one it names before deciding anything.

2. Decide, in this order

  1. It exists and fits. Use it. Say which one you used.
  2. It exists and nearly fits. Broaden it so that it keeps its old use and gains the new one: add a flag, a parameter or a case to the existing script or skill. Do not copy it and change the copy; two near-copies drift apart. Check that the old use still works after the change.
  3. Parts exist. Build only the missing part, and call the existing parts from it.
  4. Nothing covers it. Build it new. Put a script under the project's scripts/ with a first-line comment saying what it does, so the next search finds it.

When it is not clear whether an existing thing may be changed (it belongs to another project, or another use depends on it), ask the user before changing it.

3. Say what you found

Tell the user in one or two lines what you reused, what you broadened, and what you built new and why nothing existing covered it.

4. Afterwards

If the work taught something a later session would otherwise have to work out again, record it with the compound:learn skill.

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.