agentleFS
swyxioswyxio/skills/generalize/SKILL.md

generalize

Skill171 starsChanged 8 months agoMITView on GitHub

Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention. Use when explicitly asked to broaden, systematize, or extract transferable lessons.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add a test, guardrail, monitoring, or safe automation.

    line 17

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

Generalize

Surface meaningful improvements at multiple levels and recommend the option that best fits the user's intent and impact-versus-effort tradeoff.

  1. Establish the user's actual goal, authorized scope, observed examples, and underlying failure mechanism.
  2. Inspect the current conversation, established workflow, and relevant code, data, tests, or logs. Reuse existing parsers, contracts, and resume mechanisms before proposing another path. Search available agent session history only when past decisions or recurrence could change the conclusion; target exact repository names, errors, or phrases, bound the search, and avoid secrets or unrelated private content.
  3. Find sibling cases and counterexamples. Generalize only the verified cause; do not turn a local defect into new policy, requirements, or architecture without supporting evidence. Distinguish a one-off symptom, repeated pattern, missing invariant, unreliable input, and architectural constraint; quantify affected cases when practical.
  4. Offer only useful levels of intervention:
    • Fix the immediate instance.
    • Repair other cases sharing the same verified cause.
    • Correct the shared data, contract, abstraction, or workflow.
    • Add a test, guardrail, monitoring, or safe automation.
    • Capture a reusable process, skill, or architectural improvement.
  5. Compare expected impact, confidence, effort, risk, reversibility, and dependencies. Recommend based on the user's overall intent; favor simplicity when outcomes are comparable, but surface higher-impact options that become worthwhile with broader scope or authorization. Mark speculation and unresolved cases explicitly.
  6. Distinguish ambitious recommendations from authorized implementation. When implementation is authorized, complete the smallest shared repair rather than merely offering options. Verify the original failure, a representative sibling case, and a counterexample or regression; report measured outcomes and stop when the shared fix is sufficiently verified. Do not turn every repair into infrastructure or another skill.

Mention broader scope only when a concrete unresolved risk warrants it. Do not assume permission to expand scope, inspect broad transcript archives, introduce infrastructure, or create permanent artifacts.

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.