lemmaly
하는 일
Lemmaly는 코드를 작성하기 전에 효율성을 생각하도록 돕는 도구입니다. 프로그래밍을 시작하기 전에 복잡도(코드가 얼마나 빨리 실행되는지), 데이터 구조(데이터를 어떻게 정리하는지), 알고리즘 유형(사용하는 전략)을 정하도록 합니다.
사용하는 경우
- ✓목록, 검색, 반복이 포함된 새 코드를 작성할 때.
- ✓느리거나 비효율적으로 보이는 코드를 검토할 때.
- ✓데이터와 알고리즘을 정리하는 가장 좋은 방법을 모를 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/lemmaly/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“백만 개의 숫자 목록에서 가장 많이 나온 항목을 찾는 함수를 만들려고 합니다. 시작하기 전에 어떤 복잡도, 데이터 구조, 알고리즘을 써야 할지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
Lemmaly는 시간 및 공간 복잡도, 선택한 데이터 구조와 그 이유, 알고리즘 계열을 말하도록 요구합니다. 이렇게 미리 분석하면 비효율적인 해결책을 피할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
forinside afor,.find/.includes/.indexOfinside a loop,awaitinsidefor/map/forEachover independent items, or one query per item in a collection. - Auditing a codebase / PR for known anti-patterns (await-in-loop,
.includesinside.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:
time = O(?),space = O(?), with the dominant input dimension named.- The data structure you will use, with a one-phrase reason.
- 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
- 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.
…
자주 묻는 질문
‘Big-O’란 무엇인가요?
입력 데이터 크기가 커질 때 알고리즘이 얼마나 빨리 실행되는지를 설명하는 방법입니다(복잡도라고도 합니다). 예를 들어 O(n)은 실행 시간이 데이터 크기에 비례해 늘어난다는 뜻입니다.
왜 데이터 구조를 먼저 정해야 하나요?
데이터 구조(목록, 맵, 집합 등)의 선택은 효율에 직접 영향을 줍니다. 미리 정하면 일에 맞는 도구를 쓰는 데 도움이 됩니다. 예를 들어 빠른 조회에는 맵이 좋습니다.
‘알고리즘 계열’이란 무엇인가요?
이진 탐색, 정렬, 동적 계획법처럼 문제를 해결하는 전략의 일반적인 분류입니다. 계열을 파악하면 알려진 효율적인 해결책을 떠올리는 데 도움이 됩니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 48k
- 순위
- #5047
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.