Logo von Quickdup

Quickdup

Organisation
asynkron
quickdup

Find and reduce code duplication, clean up redundant code, detect code clones, reduce codebase size, DRY violations, copy-paste detection. Use when the user asks about duplicate code, code cleanup, reducing code size, DRY principles, or finding copy-pasted code.

Übersicht

Herausgeberasynkron
Repositoryasynkron-skills
Skill-Namequickdup
Sterne
32
Forks
3
Mitgelieferte Dateien
Nur Anweisungen
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.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

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

Installation

Installieren Sie den KI-Skill Quickdup 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/asynkron/asynkron-skills/tree/main/skills/quickdup
  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/asynkron/asynkron-skills.git /tmp/asynkron-skills
mkdir -p .claude/skills
cp -r /tmp/asynkron-skills/skills/quickdup .claude/skills/quickdup
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Quickdup 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 Quickdup 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 Quickdup 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.

Prerequisites

Before running quickdup, check if it is installed:

which quickdup

If not found, install it:

  • macOS/Linux: curl -sSL https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.sh | bash
  • Windows: iwr -useb https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.ps1 | iex
  • From source: go install github.com/asynkron/Asynkron.QuickDup/cmd/quickdup@latest

About QuickDup

QuickDup is a fast structural code clone detector (~100k lines in 500ms). It uses indent-delta fingerprinting to find duplicate code patterns. It is designed as a candidate generator — it optimizes for speed and recall, surfacing candidates fast for AI-assisted review.

Results are written to .quickdup/results.json and cached in .quickdup/cache.gob for fast incremental re-runs.

Workflow

  1. Run quickdup to find duplication candidates
  2. Review the results with -select to inspect specific patterns
  3. Classify each pattern — determine which type of duplication it is (see below)
  4. Refactor using the right pattern — not all duplication should be removed the same way
  5. Re-run to verify duplication is reduced

Determine File Extension

Before running, determine the primary language/extension of the project. Look at the files in the target path and use the appropriate -ext flag (e.g. .go, .ts, .cs, .py, .java, .rs).

Common Usage

Scan current project:

quickdup -path . -ext .go

Scan with specific extension (adapt to project language):

quickdup -path $ARGUMENTS -ext .ts

Show top 20 patterns:

quickdup -path . -ext .go -top 20

Inspect specific patterns in detail:

quickdup -path . -ext .go -select 0..5

Strict similarity (fewer false positives):

quickdup -path . -ext .go -min-similarity 0.9

Require more occurrences:

quickdup -path . -ext .go -min 5

Exclude generated files:

quickdup -path . -ext .go -exclude "*.pb.go,*_gen.go,*_test.go"

Compare duplication between branches:

quickdup -path . -ext .go -compare origin/main..HEAD

Key Flags

FlagDefaultPurpose
-path.Directory to scan
-ext.goFile extension to match
-min2Minimum occurrences to report
-min-size3Minimum pattern size (lines)
-max-size0Max pattern size (0 = unlimited)
-min-score5Minimum score threshold
-min-similarity0.75Token similarity threshold (0.0-1.0)
-top10Show top N patterns
-select—Detailed view (e.g. 0..5)
-exclude—Exclude file globs (comma-separated)
-no-cachefalseForce full re-parse
-strategynormalized-indentDetection strategy
-compare—Compare between commits (base..head)

Detection Strategies

  • normalized-indent (default) — indent deltas + first word per line
  • word-indent — raw indentation + first word
  • word-only — ignores indentation, first words only
  • inlineable — detects small patterns suitable for inline extraction

Suppressing Known Patterns

If a pattern is intentional duplication, suppress it by adding its hash to .quickdup/ignore.json:

json
{
  "description": "Patterns to ignore",
  "ignored": ["56c2f5f9b27ed5a0"]
}

How to Refactor Duplicated Code

QuickDup finds duplication candidates. The next step is knowing how to fix them. Not all duplication is the same — each type has a different refactoring strategy.

Type 1: Structural Duplication with Contextual Variation

Two blocks share the same control flow and structure, but differ in injected behavior (which function is called, which parameters are passed, whether some context like an index exists).

How to recognize it:

  • Same loops, same branching, same method calls in the same order
  • Only the behavior inside the structure differs

How to refactor:

  1. Ignore the differences — mentally replace the differing lines with placeholders. If the code still "reads the same", you have structural duplication.
  2. Identify the invariant structure — same loops, branching, method calls in the same order. That is the structure to extract.
  3. Identify the varying behavior — what methods differ? What parameters differ? What context exists in one version but not the other? These become delegates, lambdas, or strategy objects.
  4. Extract, do not merge — do NOT write if (variant) { ... } else { ... }. Instead, extract the shared structure and pass behavior in.
  5. Preserve meaning at call sites — the call site should still clearly express intent.

Good:

IterateAndResolve(array, i => CreateResolve(i), ...)

Bad:

IterateAndResolve(array, withIndex: true)

Rule of thumb: If two methods differ only in what they do inside a shared structure, extract the structure. If they differ in structure, keep them separate.

Type 2: Structural Switch Duplication

Repeated switch/pattern match blocks on the same domain structures. Common in AST walkers, serializers, interpreters, and compilers.

How to recognize it:

  • Repeated switch or pattern matching blocks
  • Short, trivial case bodies
  • Each case extracts or forwards structure
  • No real algorithm, just classification

When to leave it alone:

  • Each case is one or two lines
  • The code is stable and unlikely to drift
  • The abstraction would just wrap a switch
  • The switch documents the domain shape — removing it hides meaning

When to refactor:

  • Same switch appears 3+ times
  • Case list starts diverging between copies
  • Case logic grows beyond trivial access

How to refactor:

  • Extract the smallest possible helper
  • Return data, do not hide control flow
  • Use pattern matching, not flags

Good: Statement? TryUnwrapBody(Statement s) Bad: HandleStatement(s, mode)

Rule of thumb: If the switch describes structure, duplication is documentation. If the switch implements behavior, consider extraction.

Type 3: Parameter Bundle Duplication

The same set of context values passed together in multiple places — same parameters, same order, same meaning.

How to recognize it:

  • Same group of 4+ parameters passed together repeatedly
  • Usually forwarded to constructors or methods
  • Reads like a "context snapshot"
  • Adding a new parameter would require editing many call sites

How to refactor:

Extract a value object:

new ExecutionContext(thisValue, realmState, isStrict, homeObject, privateScope)

Then pass the single object instead of 5+ individual arguments.

When to leave it: Appears only once, is highly localized, or has extremely short lifetime.

Rule of thumb: If the same parameter list appears 2-3+ times, it wants to become a named type.

Type 4: Argument Unpacking Duplication

Duplicated defensive parsing of callback arguments — same local variables, same guards, same positional decoding.

How to recognize it:

  • Same argument index checks (args.Count >= 1, args[0])
  • Same type unwrapping logic
  • Same local variable names
  • Appears inside lambdas, which amplifies the noise

How to refactor:

Extract a small helper whose only job is to unpack the arguments:

UnwrapResolveReject(args, out var resolve, out var reject);

This is purely mechanical code — the intent is obscured by boilerplate, and any bug fix would need to be applied to every copy.

Rule of thumb: If you copy the same argument decoding logic twice, extract it. If the extraction reads like English, you picked the right abstraction.


Guidelines

  • Always determine the correct -ext for the project before running
  • Start with defaults, then tighten -min-similarity if too many false positives
  • Use -select 0..5 to inspect the top candidates before refactoring
  • After identifying duplicates, classify them by type before refactoring
  • Not all duplication should be removed — structural switch duplication is often intentional documentation
  • After refactoring, re-run to confirm duplication is reduced
  • For large projects, quickdup caches results — subsequent runs are near-instant
  • When the user wants to clean up or reduce code size, run quickdup first to identify targets, then refactor the highest-scoring patterns using the appropriate strategy for each type

Häufig gestellte Fragen

Was macht der KI-Skill Quickdup?

Find and reduce code duplication, clean up redundant code, detect code clones, reduce codebase size, DRY violations, copy-paste detection. Use when the user asks about duplicate code, code cleanup, reducing code size, DRY principles, or finding copy-pasted code.

Warum Quickdup in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Quickdup 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 Quickdup in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/asynkron/asynkron-skills/tree/main/skills/quickdup ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Quickdup 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 Quickdup verwenden?

So viele Sie möchten. In TypingMind können Sie Quickdup 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 Quickdup kostenlos?

Der Skill wird von asynkron auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. 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 👇