Λογότυπο Dont Repeat Yourself

Dont Repeat Yourself

Κοινότητα
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.

Επισκόπηση

Εκδότηςmarekkirejczyk
Αποθετήριοskills
Όνομα δεξιότηταςdont-repeat-yourself
Αστέρια
157
Διακλαδώσεις
1
Συνοδευτικά αρχεία
1
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Συνοδευτικά αρχεία: 1

    Αρχεία script, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό marekkirejczyk. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Dont Repeat Yourself στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/marekkirejczyk/skills/tree/main/skills/dont-repeat-yourself
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

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
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Dont Repeat Yourself σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Dont Repeat Yourself μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Dont Repeat Yourself δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

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.

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI 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.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Dont Repeat Yourself στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Dont Repeat Yourself είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Dont Repeat Yourself στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/marekkirejczyk/skills/tree/main/skills/dont-repeat-yourself. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Dont Repeat Yourself;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Dont Repeat Yourself;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Dont Repeat Yourself με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Dont Repeat Yourself;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό marekkirejczyk με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇