← ClaudeAtlas

mathguardlisted

Use when working with large-scale data, similarity search, deduplication, top-K / heavy-hitters, streaming analytics, cardinality estimation, embeddings, recommender systems, signal/image processing, polynomial or big-integer arithmetic, convolution, graph distance, computational geometry, randomized algorithms, or any problem with n >= 10^6 where exact computation is wasteful. Recognizes when classical algorithms hit their lower bound and an approximate or math-heavy technique (Bloom filter, HyperLogLog, Count-Min Sketch, MinHash/LSH, FFT/NTT, Johnson-Lindenstrauss projection, sweep line, kd-tree/BVH, fast exponentiation, monoid parallel reduction, amortized potential method) gives an asymptotic win. Load after lemmaly when a classical O(n log n) is the floor but smarter math wins.
morsechimwai/lemmaly · ★ 1 · AI & Automation · score 75
Install: claude install-skill morsechimwai/lemmaly
# mathguard — Math-Heavy Optimization for AI Code lemmaly makes you pick the right classical algorithm. mathguard kicks in when the classical algorithm is already optimal but **mathematics gives a better bound** — usually by accepting bounded approximation, exploiting structure, or moving to a smarter algebraic space. The model knows these techniques. It almost never proposes them spontaneously. mathguard fixes that. **Violating the letter of these rules is violating the spirit of the skill.** A Bloom filter where the caller assumed exact answers is a production incident, not an optimization. ## The Iron Law ```text NO APPROXIMATE STRUCTURE WITHOUT WRITTEN ε/δ AND EXPLICIT CALLER ACCEPTANCE ``` Probabilistic data structures (Bloom, HyperLogLog, Count-Min, MinHash/LSH, t-digest), randomized projections (JL), and lossy transforms (floating FFT) all change the answer's meaning. Before proposing one: 1. Write the error parameter the caller will see (false-positive rate, relative error, distortion bound). 2. Identify the caller and state, in one sentence, that they tolerate this kind of wrong answer. 3. If you cannot identify the caller, or they need exact (auth checks, billing, dedup keys, deduplication for correctness, anything that flows into a primary key), DO NOT propose the approximate structure. Keep classical, or escalate to a sharded/streaming exact design. This rule has saved more incidents than any other in this skill. Do not soften it. ## Non-negotiable rules