Zum Inhalt springen
Skillpedia
Allgemeines Programmieren48k · #5047

lemmaly

Was er macht

Lemmaly ist ein Tool, das dir hilft, über die Effizienz deines Codes nachzudenken, bevor du ihn schreibst. Es sorgt dafür, dass du vor dem Programmieren die Komplexität (wie schnell der Code läuft), die Datenstruktur (wie Daten organisiert sind) und den Algorithmus-Typ (die verwendete Strategie) festlegst.

Wann du ihn nutzt

  • ✓Wenn du neuen Code schreibst, der Listen, Suchen oder Wiederholungen enthält.
  • ✓Wenn du Code überprüfst, der langsam oder ineffizient wirkt.
  • ✓Wenn du dir nicht sicher bist, wie du deine Daten und Algorithmen am besten organisierst.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/lemmaly/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/lemmaly/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Ich muss eine Funktion schreiben, die das häufigste Element in einer Liste mit 1 Million Zahlen findet. Welche Komplexität, Datenstruktur und welchen Algorithmus sollte ich verwenden, bevor ich anfange?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Lemmaly funktioniert, indem es verlangt, dass du die Zeit- und Speicherkomplexität angibst, die gewählte Datenstruktur mit einer Begründung nennst und die Algorithmus-Familie benennst. So wird eine gründliche Analyse im Voraus erzwungen, damit keine ineffizienten Lösungen entstehen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

lemmaly — Algorithm-First Proof

The model already knows Big-O, hash tables, divide-and-conquer, dynamic programming, sorting, graph algorithms, and amortized analysis. It just does not apply them spontaneously. lemmaly fixes the behavior, not the knowledge.

This skill is the gateway for an algorithm-discipline suite of four skills (lemmaly, mathguard, invariant-guard, complexity-cuts). It enforces the hard rules that every other guard in the suite assumes.

Violating the letter of these rules is violating the spirit of the skill. "Just this once" is how O(n²) ships to production.

When to Use This Skill

Use lemmaly when:

  • Writing, editing, or reviewing code that involves loops, collections, lookups, searches, joins, recursion, graphs, queries, or any computation over more than a handful of items.
  • About to write a for inside a for, .find / .includes / .indexOf inside a loop, await inside for / map / forEach over independent items, or one query per item in a collection.
  • Auditing a codebase / PR for known anti-patterns (await-in-loop, .includes inside .filter, string-concat in loop, SELECT *, N+1, etc.).
  • Reviewing AI-generated code that "looks idiomatic" but might hide O(n²) or N+1.

When in doubt, start at lemmaly — it is the gateway and will tell you when to escalate to its three sibling skills.

If you are about to… Use Why
Write new code that loops, queries, joins, recurses, or processes a collection lemmaly Forces complexity + data structure + algorithm family before code is written.
Refactor existing code that is already slow, OOMs, times out, or has nested loops / N+1 / repeated work complexity-cuts Corrective playbook for code that already shipped with bad Big-O.
Implement an algorithm where the obvious version is subtly wrong (binary search variants, in-place dedup, Boyer–Moore, QuickSelect partition, recursion with accumulators, fixed-point / termination concerns) invariant-guard Forces writing the function contract + loop invariant before code. The trap is in the contract, not the loop body.
Work with n ≥ 10⁶, similarity search, dedup at scale, top-K, streaming analytics, cardinality estimation, embeddings, FFT/NTT, dimensionality reduction, computational geometry, randomized algorithms mathguard Classical algorithms have hit their lower bound; an approximate or math-heavy technique (Bloom, HLL, Count-Min, MinHash/LSH, FFT, JL projection, sweep line, kd-tree) gives the asymptotic win.

Routing flow

Are you writing new code?
├── yes → lemmaly (state complexity, structure, family BEFORE coding)
│         ├── classical algorithm at its lower bound AND n is large? → mathguard
│         └── subtle correctness trap (invariant, base case, off-by-one)? → invariant-guard
└── no, refactoring existing slow / OOM / timed-out code → complexity-cuts
          └── still slow after classical fixes? → mathguard

One-line mental model

  • lemmaly = think first (prevention).
  • complexity-cuts = clean up bad Big-O (correction).
  • invariant-guard = prove it's correct (verification).
  • mathguard = beat the classical floor (acceleration).

The Iron Law

NO NON-TRIVIAL CODE WITHOUT STATED COMPLEXITY, DATA STRUCTURE, AND ALGORITHM FAMILY

Before you write a loop, a recursion, a query, or any computation over more than a handful of items, three things must appear in your message — in this order:

  1. time = O(?), space = O(?), with the dominant input dimension named.
  2. The data structure you will use, with a one-phrase reason.
  3. The algorithm family (one of: linear scan, two-pointer, sliding window, binary search, sort+sweep, hash join, BFS/DFS, topo sort, Dijkstra/A*, union-find, DP, greedy, recursion+memo, prefix sum, segment tree, monoid reduction).

If you cannot state all three, you do not understand the problem yet. Ask, or read more code. Do not write code.

Non-negotiable rules

  1. State complexity before writing any non-trivial code. In one line:
    • time = O(?), space = O(?)
    • Dominant input dimension: n = what, with realistic magnitude (e.g. n ~ 10^6 rows)
    • If you cannot state these, you do not yet understand the problem. Ask, or read more code.

…

Häufige Fragen

Was ist 'Big-O'?

Big-O (oder Komplexität) beschreibt, wie schnell ein Algorithmus läuft, wenn die Datenmenge wächst. O(n) bedeutet zum Beispiel, dass die Laufzeit linear mit der Datenmenge steigt.

Warum wird die Datenstruktur zuerst festgelegt?

Die Wahl der Datenstruktur (wie Listen, Maps oder Sets) beeinflusst die Effizienz direkt. Wenn du sie vorher festlegst, stellst du sicher, dass du das richtige Werkzeug für die Aufgabe verwendest, zum Beispiel eine Map für schnelle Zugriffe.

Was sind 'Algorithmus-Familien'?

Das sind allgemeine Kategorien von Strategien zur Problemlösung, etwa binäre Suche, Sortierverfahren oder dynamische Programmierung. Wenn du die Familie erkennst, kannst du an bekannte, effiziente Lösungen denken.

Details

Originalbeschreibung des Autors

Algorithm-first discipline: state Big-O, data structure, and algorithm family BEFORE writing loops, queries, or recursion. Catches O(n^2), N+1, and brute-force defaults.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#5047
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills