Logo von Dont Repeat Yourself

Dont Repeat Yourself

Community
marekkirejczyk
dont-repeat-yourself

Find every concept implemented more than once in a scope (a repository, a PR, a directory, a concept) and give it one well-tested implementation. Identical copies are extracted automatically; behaviour differences and high-stakes code are brought to you for a decision at the end.

Übersicht

Herausgebermarekkirejczyk
Repositoryskills
Skill-Namedont-repeat-yourself
Sterne
157
Forks
1
Mitgelieferte Dateien
1
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 1

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von marekkirejczyk auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Dont Repeat Yourself in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/marekkirejczyk/skills/tree/main/skills/dont-repeat-yourself
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/marekkirejczyk/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/dont-repeat-yourself .claude/skills/dont-repeat-yourself
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Dont Repeat Yourself in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Dont Repeat Yourself automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Dont Repeat Yourself nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Don't repeat yourself

Find every concept implemented more than once in a scope and give it one well-tested implementation. Arguments: $ARGUMENTS. If your agent does not fill that in, take them from the user's message.

The scope is what the user names: the repository, a PR or branch, a directory, a file, a module, or a concept ("everything about dates"). With no scope given, use the whole repository.

For a PR, compare its new code against the whole repository:

  • A helper already exists: the PR's code reuses it.
  • The PR adds a second copy and no helper exists: extract it and replace both copies, even if the older one is outside the PR.
  • Other copies outside the PR: report them and leave them.

Run phase 1 from start to finish without asking for approval. Phase 2 is the only time you ask the user anything.

Goal

Each concept has one implementation, so a change to it is a change in one place.

You are done when all of these hold:

  1. Every unit in scope is inventoried, and every cluster of copies has been compared.
  2. Every cluster is resolved: extracted, left for a stated reason, or decided by the user.
  3. Every extraction is complete: all its call sites use the shared code, and the old copies are gone.
  4. Helpers live together: the local helpers on a shared module's subject have moved into it.

What counts as a duplicate

A cluster is two or more implementations of one concept. Look for the intention, not matching text: three ways of writing "today / yesterday / a minute ago" are one cluster. Inline blocks count as well as named helpers, and so do route types that describe the same contract.

  • Non-trivial logic: two copies are enough.
  • A one- or two-line expression: three or more copies.
  • A pure pass-through wrapper is a duplicate of what it wraps: remove it and call the wrapped code directly.

Work mainly within one layer. Across layers, extract only pure functions, placed where the project's dependency rules allow. Other cross-layer duplication is report-only, because the fix is moving a rule, which is a different change.

Rules

These hold after every round. A round that breaks one is undone.

  1. Semantics stay the same, except where the user approves unifying a behaviour in phase 2.
  2. Lint, type checks, build and tests pass, using the project's own commands. They must pass before you start: if they fail, stop and report it.
  3. Callers' tests stay as they are, except for shared test helpers and fixtures, and expected values in a unification the user approved. Expected values stay written out in each test.
  4. External contracts keep working: published package exports, public API routes and fields, database tables and columns, serialized keys, event names, environment variables, config keys and CLI flags. A replaced published helper stays as a thin export of the new one.

Identical behaviour

Copies are identical only if you have compared every branch and found the same result for each of:

  • boundaries, rounding and units
  • empty, null and invalid input
  • time zones, locale and text
  • errors thrown or swallowed
  • side effects, their order, and logging

Any difference, however small, means the cluster goes to phase 2.

Extractions

  • A pure function wherever possible, named for its concept.
  • In the nearest existing module for that subject, or a new module named for the subject when none fits. Generic utils or helpers modules are never the destination.
  • With its own test file, using examples taken from every former call site, written before the call sites move. Those examples prove each site's nuances survived.

Moving helpers together

When an extraction creates or extends a module, look through every file that extraction touched. Move local helpers about the module's subject into it, even those with a single caller. A helper bound to its caller's private state stays, and so do helpers on other subjects.

A move is phase 1 work, in its own commit, separate from the extraction. Existing tests move with the helper. Add direct tests for a non-trivial helper that has none.

Phase 1: extract what is safe

  1. Baseline. On a new branch, run lint, type checks, build and tests, and record the results. Done when all pass.
  2. Inventory. Write one line of intent for every function, type and notable inline block in scope, grouped by layer. Use a subagent per layer where your agent has them. Done when every unit in scope has a line.
  3. Cluster. Compare intents within each layer, then pure functions across layers. For each cluster, list its call sites and every behavioural difference. Sort each cluster into one of:
    • Extract now: clearly one concept, behaviour identical, outside high-stakes code.
    • Ask: any behavioural difference; copies that match but may be separate concepts (a request type and a database row type); or anything in high-stakes code, even when identical: money, auth and permissions, data migrations, concurrency or locking.
    • Report only: cross-layer duplication that isn't a shareable pure function.
  4. Extract in rounds. One cluster per round: tests first, then the shared code, then every call site, then delete the old copies. Run the checks and commit. If a check goes red, undo the round and move the cluster to Ask. Leave the branch unpushed. Done when every Extract now cluster is applied.
  5. Move helpers, as above.
  6. Sweep. Search the scope again for each extracted concept. Done when no copy remains and all checks pass.

Phase 2: ask

Present every Ask cluster in one batch, as numbered items, each with:

  • the call sites, as file:line
  • the shared intention
  • every exact difference
  • the proposed function signature
  • your recommendation: unify on one behaviour (say which), keep the differences as options, or leave separate

Recommend leaving separate when keeping the differences would take more than 2–3 options.

Apply the user's answers in the same session, one commit per cluster, under the same rules and test-first order. A cluster the user does not answer stays as it is.

Report

  • Clusters extracted, helpers moved, wrappers removed, and copies deleted.
  • Decisions the user made, and every caller whose behaviour changed because of one.
  • Clusters left, and why.
  • Report-only cross-layer duplication, and copies outside a PR scope.
  • Check results before and after.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Dont Repeat Yourself?

Find every concept implemented more than once in a scope (a repository, a PR, a directory, a concept) and give it one well-tested implementation. Identical copies are extracted automatically; behaviour differences and high-stakes code are brought to you for a decision at the end.

Warum Dont Repeat Yourself in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Dont Repeat Yourself besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Dont Repeat Yourself in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/marekkirejczyk/skills/tree/main/skills/dont-repeat-yourself ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Dont Repeat Yourself nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Dont Repeat Yourself verwenden?

So viele Sie möchten. In TypingMind können Sie Dont Repeat Yourself mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Dont Repeat Yourself kostenlos?

Ja. Der Skill wird von marekkirejczyk auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇