{"id":"9db7e47d-ced9-4f5f-9f3e-d8554f7030b6","shortId":"YLwbVF","kind":"skill","title":"correctness-traps","tagline":"Use when writing or reviewing error handling, floating-point math, concurrent code, remote calls, singletons/globals, hot-path data structures, or high-volume log statements","description":"# Error and Correctness Traps\n\n## Overview\n\nCommon bugs grouped by domain: floats that won't compare equal, retries that hammer a downed service, singletons that wreck testability, and others. **When you write code in one of these domains, stop and run the matching checks before you commit.**\n\nThis is a **rigid** skill. Jump to the sub-section that matches what you're writing and run that sub-section's checks.\n\nThese checks matter most when code will reach real users in production. In MVPs, prototypes, internal dev tools, and one-off scripts where the architecture is still in flux, prefer the simplest thing that works.\n\n## When to invoke\n\nInvoke when you're about to:\n\n- Add or change error-handling around a call that can fail\n- Compare, sum, or accumulate floating-point numbers\n- Write concurrent, parallel, or threaded code, or share mutable state between threads\n- Call a remote process, web service, database, or another machine\n- Introduce a singleton or any globally-shared mutable state\n- Choose a data structure or algorithm on a path that runs often or on large inputs\n- Add or change log statements that may fire at high volume\n- Review code that handles errors, floats, concurrency, remote calls, singletons, or hot-path data structures\n\n### Non-triggers — do NOT invoke for\n\n- Renaming a local variable inside one function\n- Adding a docstring to an existing function\n- Fixing a typo in a comment\n- Formatting-only changes handled by a formatter\n- Adjusting a config value in a config file with no logic change\n- Skimming code for context without producing findings or edits\n- An early-stage MVP or prototype where the architecture is still in flux\n- An internal dev tool, debugging endpoint, or one-off script\n- Throwaway code expected to be replaced before reaching users\n\nIf the change touches one of these domains even slightly, **invoke anyway** — the per-domain check is short and the bugs are not.\n\n## Checks by domain\n\n### Errors (97/21, 97/26, 97/29)\n\n1. **Distinguish business exceptions from technical ones.** A *technical* exception means the system can't proceed — bad arguments, broken DB connection, programming error. Let it bubble to a top-level handler that puts the system in a safe state (rollback, log, alert, friendly user message); the caller can't fix it. A *business* exception is part of the contract — withdrawing from an empty account, booking an unavailable slot — and is an alternative return path the caller is expected to handle. Give them separate types or hierarchies; mixing them blurs the contract. *(Bergh Johnsson, 97/21.)*\n2. **Never write the empty `catch`.** `try { ... } catch (...) {}` silently swallows everything. Same for ignoring return codes (`printf`'s return value, `write()`'s short-write count) and pretending `errno` doesn't exist. Example: a service-call wrapper swallows every exception and returns `null`, so every downstream caller has to invent their own theory of what `null` means. Expose erroneous conditions in your interfaces; if handling errors feels onerous, the interface is wrong. *(Goodliffe, 97/26.)*\n3. **Don't rely on unexplained magic.** If your change depends on behavior nobody can explain (build picks a DLL by load order, deployment reads an undocumented env var, a job runs because of a side effect in a config file), surface it in your summary to the user before shipping — don't bury the dependency. *(Griffiths, 97/29.)*\n\n### Numerics (97/33)\n\n4. **Never compare floats with `==`.** `0.1 + 0.2 != 0.3` in IEEE 754 — the canonical demonstration. Compare with a tolerance appropriate to the magnitude of the values involved (≈ ε|x|, where ε is machine epsilon — ~1e-7 for `float`, ~1e-16 for `double`).\n5. **Watch for catastrophic cancellation.** Subtracting nearly-equal floats promotes roundoff to the most significant digits. Example: solving `x² - 100000x + 1 = 0` directly via the quadratic formula gives a wildly wrong small root because `-b + sqrt(b² - 4)` cancels; compute one root and derive the other from `r1 * r2 = c/a`. Same shape of error appears in any series with alternating signs of similar magnitude.\n6. **Don't use float for money.** Use a fixed-point or decimal type. Floats are for scientific calculation where you accept ε-level error; financial code does not accept it. *(Allison, 97/33.)*\n\n### Concurrency & IPC (97/41, 97/57)\n\n7. **Default to message passing over shared mutable state.** When you reach for a lock around shared data, ask first whether the data could be owned by one process/actor that others message. CSP-style designs (Erlang, Go channels, actor frameworks in mainstream languages) sidestep most race / deadlock / livelock bugs by construction. Reserve shared-memory + locks for cases you have measured and understood. *(Winder, 97/57.)*\n8. **Count IPCs per user stimulus, not lines of code.** Each remote call is non-trivial latency; sequential calls add. Example: ORM lazy-loading produces 1,000 sequential 10ms DB calls for one page render — minimum 10s response time before any rendering work. Ratios in the thousands appear routinely in slow apps. Apply parsimony (one round-trip carrying the right data), parallelism (overall latency = longest call, not sum), or caching. *(Stafford, 97/41.)*\n9. **Retry with backoff and a cap, never in a tight loop.** Example: `while (!call()) call();` against a downed service hammers it the moment it comes back. Exponential backoff, jitter, and a max-retries ceiling are the minimum; idempotency on the server side is what makes retry safe at all.\n\n### Limits & Performance (97/46, 97/89)\n\n10. **Know the complexity of the data structure you picked.** Linked list vs. hash vs. balanced tree on a million items is the difference between snappy and unusable. Pick by access pattern (lookup-heavy → hash; ordered iteration → tree; tiny + cache-friendly → array), not by what's familiar. *(van Winkel, 97/89.)*\n11. **Don't recompute invariants inside loops.** Example: `for (i = 0; i < strlen(s); ++i)` — `strlen` runs every iteration, scanning the whole string each time, turning O(n) work into O(n²). Hoist the length out. The same shape applies to repeated DB lookups, repeated config parses, and repeated regex compilations inside hot loops. *(van Winkel, 97/89.)*\n12. **Respect the cache hierarchy when it dominates.** Register and L1 are nanoseconds; RAM is ~20ns; disk is ~10ms; network is ~20–100ms — orders of magnitude apart. A \"worse\" big-O algorithm with a predictable access pattern can beat a \"better\" one that thrashes cache. When perf matters, **measure** rather than reason from complexity alone. *(Colvin, 97/46.)*\n\n### Globals & Singletons (97/73)\n\n13. **Resist the singleton.** Most singletons encode a single-instance assumption that turns out to be premature, broadcast across the design as hidden coupling. They wreck unit-test independence (you can't substitute a mock), introduce subtle multi-threading bugs (naive locking slow, double-checked locking famously broken in several languages), and have no defined cleanup order at shutdown. Example: a `Logger.getInstance()` called from every layer means tests can't intercept output, can't run in parallel, and inherit log state from previous tests.\n14. **If you genuinely need one instance, hide it behind an interface.** Restrict the global access to a few well-defined construction sites; everywhere else, accept the dependency through a parameter typed by interface. Callers don't know whether a singleton or a fresh object satisfies the interface — and tests can substitute either. *(Saariste, 97/73.)*\n\n### Production resilience (`RI/*`)\n\nWhen the call will run under load against a downstream that can fail, the per-call hardening *is* the first write. These checks matter most in production code.\n\n15. **Set an explicit timeout on every remote call.** Library defaults are wrong (`None`, \"infinity\", \"many minutes\"). Pick a per-call budget based on the downstream's realistic latency plus margin, and cap retries inside that budget. *(`RI/Timeout`.)*\n16. **Wrap critical downstreams in a circuit breaker.** Tracked per-downstream failures; once threshold crossed, fail fast locally for a window; probe; close on success. Distinct from retry/backoff: this is \"should we attempt at all right now.\" *(`RI/CircuitBreaker`.)*\n17. **Bulkhead resource pools per downstream.** Separate thread pools, connection pools, or queues per external dependency so one stalled downstream cannot exhaust capacity for healthy ones. *(`RI/Bulkhead`.)*\n18. **Bounded queues only.** An unbounded queue eventually exhausts memory under load. Pick a cap and an explicit reject policy (drop oldest, drop newest, backpressure to caller). *(`RI/Backpressure`.)*\n19. **Fail fast when the request cannot succeed.** Validate at the entry point; check circuit-breaker state and feature flags before expensive setup; return a clear error before holding DB connections, locks, or downstream quota. *(`RI/FailFast`.)*\n\n## Red Flags\n\nThese thoughts mean STOP — apply the domain check before committing:\n\n| Thought | Reality |\n|---|---|\n| \"I'll throw the same exception type for both — caller handles either way.\" | Technical and business exceptions are different contracts. Mixing them means callers can't tell what to guard against beforehand vs. handle after. (97/21) |\n| \"Empty catch is fine, the error can't happen here.\" | \"Can't happen\" is how silent corruption ships. Log, rethrow, or surface the error — never swallow. (97/26) |\n| \"Nobody on the team knows how this build step works, but it works.\" | Magic that no one owns is a fault waiting for the day the magic stops. Find the person who knows or document it now. (97/29) |\n| \"`if (a == b)` for floats is fine, the values are computed the same way.\" | `0.1 + 0.2 != 0.3`. Use a tolerance scaled to magnitude, or use a decimal type. (97/33) |\n| \"I'll use `double` for the price column — it's faster than `Decimal`.\" | Floats accumulate roundoff; money does not forgive roundoff. Use fixed-point or decimal for currency. (97/33) |\n| \"I'll wrap a lock around the shared map — that fixes the race.\" | Locks around shared mutable state are where deadlocks and lost updates hide. Prefer message passing; lock only when measured and understood. (97/57) |\n| \"Failed call → just retry in a loop until it works.\" | A retry loop without backoff and a cap will hammer the service the moment it recovers. Backoff + jitter + ceiling, and require idempotency on the server. (97/41) |\n| \"I'll lazy-load each related row — it's cleaner.\" | One page = thousands of sequential round-trips = visibly broken latency. Count IPCs per stimulus; batch, parallelize, or cache. (97/41) |\n| \"It's just `for (i = 0; i < strlen(s); ++i)` — looks normal.\" | `strlen` runs every iteration; an O(n) loop becomes O(n²). Hoist invariants out of hot loops. (97/89) |\n| \"Linked list is fine, n won't get that big.\" | \"Won't get that big\" is how production timeouts are born. Pick the structure by access pattern and confirm with measurement. (97/89, 97/46) |\n| \"Singleton — there'll only ever be one.\" | Single-instance is an assumption that ages badly, and the global access point destroys testability. Hide behind an interface, inject the dependency. (97/73) |\n| \"I'll let the HTTP client default the timeout — it's fine.\" | Defaults are `None` or hours. Held connections, threads, and queue slots add up under load. Set an explicit per-call timeout. (`RI/Timeout`) |\n| \"The downstream's flaky — I'll just retry.\" | Retry without a circuit breaker piles load on a service that's already failing. Wrap critical downstreams in a breaker; fail fast locally when open. (`RI/CircuitBreaker`) |\n| \"One pool for all downstreams keeps the code simpler.\" | One slow third party fills the pool and the whole service stops. Bulkhead per downstream; isolate failure domains. (`RI/Bulkhead`) |\n| \"I'll buffer events in an in-memory queue — it'll catch up.\" | Unbounded queues exhaust memory under sustained load. Pick a cap and a reject policy; let backpressure inform callers. (`RI/Backpressure`) |\n| \"I'll validate after the DB lookup — saves a branch.\" | Late failure holds DB connections, locks, and quota for a request that can't succeed. Validate at the entry; fail fast. (`RI/FailFast`) |\n\n## What \"done\" looks like\n\nYou are done when **all** of the following are true for every domain below your change touches:\n\n- [ ] **Errors:** technical and business exceptions have distinct types; no empty catches; any \"magic\" the change relies on has a named owner or a documented restart path.\n- [ ] **Numerics:** no `==` between floats; tolerances scaled to magnitude; money uses a decimal type; subtractions of near-equal magnitudes have been audited for cancellation.\n- [ ] **Concurrency & IPC:** shared mutable state is justified or replaced by message passing; remote calls per user stimulus are counted and bounded; retries have backoff, jitter, and a ceiling.\n- [ ] **Limits & Performance:** the data structure matches the access pattern; no invariants recomputed inside hot loops; perf claims are measured, not reasoned.\n- [ ] **Globals & Singletons:** any new singleton is justified, narrowly scoped, and accessed through an interface that can be substituted in tests.\n- [ ] **Production resilience:** every remote call has an explicit timeout; critical downstreams have a circuit breaker; resource pools are bulkheaded per downstream; queues are bounded with an explicit reject policy; the request fails fast when it cannot succeed.\n\nIf any box that applies to your change is unchecked, you are not done. Either finish, or revert and re-plan.\n\n## Principles in this skill\n\n| # | Principle | Author |\n|---|---|---|\n| 97/21 | Distinguish Business Exceptions from Technical | Dan Bergh Johnsson |\n| 97/26 | Don't Ignore That Error! | Pete Goodliffe |\n| 97/29 | Don't Rely on \"Magic Happens Here\" | Alan Griffiths |\n| 97/33 | Floating-Point Numbers Aren't Real | Chuck Allison |\n| 97/41 | Inter-Process Communication Affects Application Response Time | Randy Stafford |\n| 97/46 | Know Your Limits | Greg Colvin |\n| 97/57 | Message Passing Leads to Better Scalability in Parallel Systems | Russel Winder |\n| 97/73 | Resist the Temptation of the Singleton | Sam Saariste |\n| 97/89 | Use the Right Algorithm and Data Structure | Jan Christiaan \"JC\" van Winkel |\n| `RI/Timeout` | Always Set a Timeout | Michael Nygard |\n| `RI/CircuitBreaker` | Circuit Breaker | Michael Nygard |\n| `RI/Bulkhead` | Bulkhead | Michael Nygard |\n| `RI/Backpressure` | Backpressure / Bounded Queues | Michael Nygard |\n| `RI/FailFast` | Fail Fast | Michael Nygard |\n\nSee `principles.md` for the long-form distillations, citations, and source links.","tags":["correctness","traps","oribarilan","agent-skills","ai-agents","best-practices","claude-code","claude-code-plugin","claude-code-skills","coding-agents","copilot-cli","copilot-cli-plugin"],"capabilities":["skill","source-oribarilan","skill-correctness-traps","topic-agent-skills","topic-ai-agents","topic-best-practices","topic-claude-code","topic-claude-code-plugin","topic-claude-code-skills","topic-coding-agents","topic-copilot-cli","topic-copilot-cli-plugin","topic-opencode","topic-opencode-plugin","topic-programming-principles"],"categories":["97"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/oribarilan/97/correctness-traps","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add oribarilan/97","source_repo":"https://github.com/oribarilan/97","install_from":"skills.sh"}},"qualityScore":"0.460","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 21 github stars · SKILL.md body (14,669 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:05:32.730Z","embedding":null,"createdAt":"2026-05-10T19:04:19.986Z","updatedAt":"2026-05-18T19:05:32.730Z","lastSeenAt":"2026-05-18T19:05:32.730Z","tsv":"'0':654,994,1729 '0.1':598,1577 '0.2':599,1578 '0.3':600,1579 '000':830 '1':363,653,829 '10':932 '100000x':652 '100ms':1063 '10ms':832,1059 '10s':840 '11':984 '12':1041 '13':1102 '14':1190 '15':1278 '16':1317 '17':1356 '18':1383 '19':1411 '1e-16':629 '1e-7':626 '2':458 '20':1062 '20ns':1056 '3':533 '4':593,670 '5':632 '6':697 '7':736 '754':603 '8':802 '9':877 '97/21':360,457,1497,2185 '97/26':361,532,1524,2194 '97/29':362,590,1562,2202 '97/33':592,731,1591,1621,2212 '97/41':734,876,1692,1723,2222 '97/46':930,1098,1786,2233 '97/57':735,801,1656,2239 '97/73':1101,1245,1817,2251 '97/89':931,983,1040,1753,1785,2260 'accept':719,728,1216 'access':962,1077,1205,1779,1806,2086,2110 'account':427 'accumul':162,1606 'across':1121 'actor':775 'ad':256 'add':147,215,822,1841 'adjust':277 'affect':2227 'age':1801 'alan':2210 'alert':405 'algorithm':204,1073,2264 'allison':730,2221 'alon':1096 'alreadi':1873 'altern':435,692 'alway':2274 'anoth':187 'anyway':343 'apart':1067 'app':855 'appear':687,851 'appli':856,1023,1454,2161 'applic':2228 'appropri':611 'architectur':127,307 'aren':2217 'argument':380 'around':153,751,1627,1636 'array':975 'ask':754 'assumpt':1113,1799 'attempt':1350 'audit':2048 'author':2184 'b':667,669,1565 'back':903 'backoff':880,905,1671,1683,2074 'backpressur':1407,1944,2290 'bad':379,1802 'balanc':947 'base':1301 'batch':1719 'beat':1080 'becom':1744 'beforehand':1493 'behavior':545 'behind':1199,1811 'bergh':455,2192 'better':1082,2244 'big':1071,1763,1768 'big-o':1070 'blur':452 'book':428 'born':1774 'bound':1384,2071,2143,2291 'box':2159 'branch':1957 'breaker':1324,1427,1865,1880,2134,2282 'broadcast':1120 'broken':381,1153,1713 'bubbl':388 'budget':1300,1315 'buffer':1917 'bug':37,353,785,1144 'build':549,1532 'bulkhead':1357,1908,2138,2286 'buri':586 'busi':365,416,1477,2004,2187 'c/a':682 'cach':874,973,1044,1086,1722 'cache-friend':972 'calcul':716 'call':18,155,179,234,494,814,821,834,870,891,892,1168,1251,1265,1286,1299,1658,1850,2064,2124 'caller':410,439,505,1225,1409,1471,1485,1946 'cancel':636,671,2050 'cannot':1376,1417,2155 'canon':605 'cap':883,1311,1397,1674,1938 'capac':1378 'carri':862 'case':794 'catastroph':635 'catch':463,465,1499,1927,2011 'ceil':912,1685,2078 'chang':149,217,272,288,334,542,1999,2015,2164 'channel':774 'check':73,101,103,348,356,1150,1272,1424,1457 'choos':199 'christiaan':2269 'chuck':2220 'circuit':1323,1426,1864,2133,2281 'circuit-break':1425 'citat':2308 'claim':2095 'cleaner':1703 'cleanup':1161 'clear':1437 'client':1823 'close':1340 'code':16,62,107,172,227,290,324,473,725,811,1277,1894 'column':1599 'colvin':1097,2238 'come':902 'comment':268 'commit':76,1459 'common':36 'communic':2226 'compar':45,159,595,607 'compil':1034 'complex':935,1095 'comput':672,1573 'concurr':15,168,232,732,2051 'condit':518 'config':279,283,572,1029 'confirm':1782 'connect':383,1365,1442,1836,1962 'construct':787,1212 'context':292 'contract':422,454,1481 'correct':2,33 'correctness-trap':1 'corrupt':1514 'could':759 'count':483,803,1715,2069 'coupl':1126 'critic':1319,1876,2129 'cross':1332 'csp':769 'csp-style':768 'currenc':1620 'dan':2191 'data':23,201,240,753,758,865,938,2082,2266 'databas':185 'day':1549 'db':382,833,1026,1441,1953,1961 'deadlock':783,1642 'debug':316 'decim':710,1589,1604,1618,2038 'default':737,1288,1824,1830 'defin':1160,1211 'demonstr':606 'depend':543,588,1218,1371,1816 'deploy':556 'deriv':676 'design':771,1123 'destroy':1808 'dev':118,314 'differ':955,1480 'digit':648 'direct':655 'disk':1057 'distil':2307 'distinct':1343,2007 'distinguish':364,2186 'dll':552 'docstr':258 'document':1559,2024 'doesn':487 'domain':40,67,339,347,358,1456,1913,1996 'domin':1048 'done':1981,1986,2170 'doubl':631,1149,1595 'double-check':1148 'down':51,895 'downstream':504,1258,1304,1320,1328,1361,1375,1445,1854,1877,1891,1910,2130,2140 'drop':1403,1405 'earli':300 'early-stag':299 'edit':297 'effect':569 'either':1243,1473,2171 'els':1215 'empti':426,462,1498,2010 'encod':1108 'endpoint':317 'entri':1422,1976 'env':560 'epsilon':625 'equal':46,640,2044 'erlang':772 'errno':486 'erron':517 'error':9,31,151,230,359,385,524,686,723,1438,1503,1521,2001,2199 'error-handl':150 'even':340 'event':1918 'eventu':1390 'ever':1791 'everi':497,503,1001,1170,1284,1738,1995,2122 'everyth':468 'everywher':1214 'exampl':490,649,823,889,991,1165 'except':366,372,417,498,1467,1478,2005,2188 'exhaust':1377,1391,1931 'exist':261,489 'expect':325,441 'expens':1433 'explain':548 'explicit':1281,1400,1847,2127,2146 'exponenti':904 'expos':516 'extern':1370 'fail':158,1261,1333,1412,1657,1874,1881,1977,2151,2296 'failur':1329,1912,1959 'familiar':980 'famous':1152 'fast':1334,1413,1882,1978,2152,2297 'faster':1602 'fault':1545 'featur':1430 'feel':525 'file':284,573 'fill':1900 'financi':724 'find':295,1553 'fine':1501,1569,1757,1829 'finish':2172 'fire':222 'first':755,1269 'fix':263,413,707,1615,1632 'fixed-point':706,1614 'flag':1431,1449 'flaki':1856 'float':12,41,164,231,596,628,641,701,712,1567,1605,2030,2214 'floating-point':11,163,2213 'flux':131,311 'follow':1991 'forgiv':1611 'form':2306 'format':270 'formatt':276 'formatting-on':269 'formula':659 'framework':776 'fresh':1234 'friend':406,974 'function':255,262 'genuin':1193 'get':1761,1766 'give':444,660 'global':195,1099,1204,1805,2100 'globally-shar':194 'go':773 'goodliff':531,2201 'greg':2237 'griffith':589,2211 'group':38 'guard':1491 'hammer':49,897,1676 'handl':10,152,229,273,443,523,1472,1495 'handler':394 'happen':1506,1510,2208 'harden':1266 'hash':945,967 'healthi':1380 'heavi':966 'held':1835 'hidden':1125 'hide':1197,1646,1810 'hierarchi':449,1045 'high':27,224 'high-volum':26 'hoist':1016,1747 'hold':1440,1960 'hot':21,238,1036,1751,2092 'hot-path':20,237 'hour':1834 'http':1822 'idempot':916,1688 'ieee':602 'ignor':471,2197 'in-memori':1921 'independ':1132 'infin':1292 'inform':1945 'inherit':1184 'inject':1814 'input':214 'insid':253,989,1035,1313,2091 'instanc':1112,1196,1796 'inter':2224 'inter-process':2223 'intercept':1176 'interfac':521,528,1201,1224,1238,1813,2113 'intern':117,313 'introduc':189,1139 'invari':988,1748,2089 'invent':508 'invok':140,141,247,342 'involv':618 'ipc':733,804,1716,2052 'isol':1911 'item':952 'iter':969,1002,1739 'jan':2268 'jc':2270 'jitter':906,1684,2075 'job':563 'johnsson':456,2193 'jump':82 'justifi':2057,2106 'keep':1892 'know':933,1228,1529,1557,2234 'l1':1051 'languag':779,1156 'larg':213 'late':1958 'latenc':819,868,1307,1714 'layer':1171 'lazi':826,1696 'lazy-load':825,1695 'lead':2242 'length':1018 'let':386,1820,1943 'level':393,722 'librari':1287 'like':1983 'limit':928,2079,2236 'line':809 'link':942,1754,2311 'list':943,1755 'livelock':784 'll':1463,1593,1623,1694,1789,1819,1858,1916,1926,1949 'load':554,827,1255,1394,1697,1844,1867,1935 'local':251,1335,1883 'lock':750,792,1146,1151,1443,1626,1635,1650,1963 'log':29,218,404,1185,1516 'logger.getinstance':1167 'logic':287 'long':2305 'long-form':2304 'longest':869 'look':1734,1982 'lookup':965,1027,1954 'lookup-heavi':964 'loop':888,990,1037,1663,1669,1743,1752,2093 'lost':1644 'machin':188,624 'magic':539,1538,1551,2013,2207 'magnitud':614,696,1066,1585,2034,2045 'mainstream':778 'make':923 'mani':1293 'map':1630 'margin':1309 'match':72,89,2084 'math':14 'matter':104,1089,1273 'max':910 'max-retri':909 'may':221 'mean':373,515,1172,1452,1484 'measur':797,1090,1653,1784,2097 'memori':791,1392,1923,1932 'messag':408,739,767,1648,2061,2240 'michael':2278,2283,2287,2293,2298 'million':951 'minimum':839,915 'minut':1294 'mix':450,1482 'mock':1138 'moment':900,1680 'money':703,1608,2035 'multi':1142 'multi-thread':1141 'mutabl':175,197,743,1638,2054 'mvp':302 'mvps':115 'n':1011,1015,1742,1746,1758 'naiv':1145 'name':2020 'nanosecond':1053 'narrowli':2107 'near':639,2043 'near-equ':2042 'nearly-equ':638 'need':1194 'network':1060 'never':459,594,884,1522 'new':2103 'newest':1406 'nobodi':546,1525 'non':243,817 'non-trigg':242 'non-trivi':816 'none':1291,1832 'normal':1735 'null':501,514 'number':166,2216 'numer':591,2027 'nygard':2279,2284,2288,2294,2299 'o':1010,1014,1072,1741,1745 'object':1235 'often':210 'oldest':1404 'one':64,122,254,320,336,369,673,763,836,858,1083,1195,1373,1381,1541,1704,1793,1887,1896 'one-off':121,319 'oner':526 'open':1885 'order':555,968,1064,1162 'orm':824 'other':58,766 'output':1177 'overal':867 'overview':35 'own':761,1542 'owner':2021 'page':837,1705 'parallel':169,866,1182,1720,2247 'paramet':1221 'pars':1030 'parsimoni':857 'part':419 'parti':1899 'pass':740,1649,2062,2241 'path':22,207,239,437,2026 'pattern':963,1078,1780,2087 'per':346,805,1264,1298,1327,1360,1369,1717,1849,1909,2065,2139 'per-cal':1263,1297,1848 'per-domain':345 'per-downstream':1326 'perf':1088,2094 'perform':929,2080 'person':1555 'pete':2200 'pick':550,941,960,1295,1395,1775,1936 'pile':1866 'plan':2178 'plus':1308 'point':13,165,708,1423,1616,1807,2215 'polici':1402,1942,2148 'pool':1359,1364,1366,1888,1902,2136 'predict':1076 'prefer':132,1647 'prematur':1119 'pretend':485 'previous':1188 'price':1598 'principl':2179,2183 'principles.md':2301 'printf':474 'probe':1339 'proceed':378 'process':182,2225 'process/actor':764 'produc':294,828 'product':113,1246,1276,1771,2120 'program':384 'promot':642 'prototyp':116,304 'put':396 'quadrat':658 'queue':1368,1385,1389,1839,1924,1930,2141,2292 'quota':1446,1965 'r1':680 'r2':681 'race':782,1634 'ram':1054 'randi':2231 'rather':1091 'ratio':847 're':92,144,2177 're-plan':2176 'reach':109,330,747 'read':557 'real':110,2219 'realist':1306 'realiti':1461 'reason':1093,2099 'recomput':987,2090 'recov':1682 'red':1448 'regex':1033 'regist':1049 'reject':1401,1941,2147 'relat':1699 'reli':536,2016,2205 'remot':17,181,233,813,1285,2063,2123 'renam':249 'render':838,845 'repeat':1025,1028,1032 'replac':328,2059 'request':1416,1968,2150 'requir':1687 'reserv':788 'resili':1247,2121 'resist':1103,2252 'resourc':1358,2135 'respect':1042 'respons':841,2229 'restart':2025 'restrict':1202 'rethrow':1517 'retri':47,878,911,924,1312,1660,1668,1860,1861,2072 'retry/backoff':1345 'return':436,472,476,500,1435 'revert':2174 'review':8,226 'ri':1248 'ri/backpressure':1410,1947,2289 'ri/bulkhead':1382,1914,2285 'ri/circuitbreaker':1355,1886,2280 'ri/failfast':1447,1979,2295 'ri/timeout':1316,1852,2273 'right':864,1353,2263 'rigid':80 'rollback':403 'root':665,674 'round':860,1710 'round-trip':859,1709 'roundoff':643,1607,1612 'routin':852 'row':1700 'run':70,95,209,564,1000,1180,1253,1737 'russel':2249 'saarist':1244,2259 'safe':401,925 'sam':2258 'satisfi':1236 'save':1955 'scalabl':2245 'scale':1583,2032 'scan':1003 'scientif':715 'scope':2108 'script':124,322 'section':87,99 'see':2300 'separ':446,1362 'sequenti':820,831,1708 'seri':690 'server':919,1691 'servic':52,184,493,896,1678,1870,1906 'service-cal':492 'set':1279,1845,2275 'setup':1434 'sever':1155 'shape':684,1022 'share':174,196,742,752,790,1629,1637,2053 'shared-memori':789 'ship':583,1515 'short':350,481 'short-writ':480 'shutdown':1164 'side':568,920 'sidestep':780 'sign':693 'signific':647 'silent':466,1513 'similar':695 'simpler':1895 'simplest':134 'singl':1111,1795 'single-inst':1110,1794 'singleton':53,191,235,1100,1105,1107,1231,1787,2101,2104,2257 'singletons/globals':19 'site':1213 'skill':81,2182 'skill-correctness-traps' 'skim':289 'slight':341 'slot':431,1840 'slow':854,1147,1897 'small':664 'snappi':957 'solv':650 'sourc':2310 'source-oribarilan' 'sqrt':668 'stafford':875,2232 'stage':301 'stall':1374 'state':176,198,402,744,1186,1428,1639,2055 'statement':30,219 'step':1533 'still':129,309 'stimulus':807,1718,2067 'stop':68,1453,1552,1907 'string':1006 'strlen':996,999,1731,1736 'structur':24,202,241,939,1777,2083,2267 'style':770 'sub':86,98 'sub-sect':85,97 'substitut':1136,1242,2117 'subtl':1140 'subtract':637,2040 'succeed':1418,1972,2156 'success':1342 'sum':160,872 'summari':578 'surfac':574,1519 'sustain':1934 'swallow':467,496,1523 'system':375,398,2248 'team':1528 'technic':368,371,1475,2002,2190 'tell':1488 'temptat':2254 'test':1131,1173,1189,1240,2119 'testabl':56,1809 'theori':511 'thing':135 'third':1898 'thought':1451,1460 'thousand':850,1706 'thrash':1085 'thread':171,178,1143,1363,1837 'threshold':1331 'throw':1464 'throwaway':323 'tight':887 'time':842,1008,2230 'timeout':1282,1772,1826,1851,2128,2277 'tini':971 'toler':610,1582,2031 'tool':119,315 'top':392 'top-level':391 'topic-agent-skills' 'topic-ai-agents' 'topic-best-practices' 'topic-claude-code' 'topic-claude-code-plugin' 'topic-claude-code-skills' 'topic-coding-agents' 'topic-copilot-cli' 'topic-copilot-cli-plugin' 'topic-opencode' 'topic-opencode-plugin' 'topic-programming-principles' 'touch':335,2000 'track':1325 'trap':3,34 'tree':948,970 'tri':464 'trigger':244 'trip':861,1711 'trivial':818 'true':1993 'turn':1009,1115 'type':447,711,1222,1468,1590,2008,2039 'typo':265 'unavail':430 'unbound':1388,1929 'uncheck':2166 'understood':799,1655 'undocu':559 'unexplain':538 'unit':1130 'unit-test':1129 'unus':959 'updat':1645 'use':4,700,704,1580,1587,1594,1613,2036,2261 'user':111,331,407,581,806,2066 'valid':1419,1950,1973 'valu':280,477,617,1571 'van':981,1038,2271 'var':561 'variabl':252 'via':656 'visibl':1712 'volum':28,225 'vs':944,946,1494 'wait':1546 'watch':633 'way':1474,1576 'web':183 'well':1210 'well-defin':1209 'whether':756,1229 'whole':1005,1905 'wild':662 'winder':800,2250 'window':1338 'winkel':982,1039,2272 'withdraw':423 'without':293,1670,1862 'won':43,1759,1764 'work':137,846,1012,1534,1537,1666 'wors':1069 'wrap':1318,1624,1875 'wrapper':495 'wreck':55,1128 'write':6,61,93,167,460,478,482,1270 'wrong':530,663,1290 'x':620,651 'ε':619,622,721 'ε-level':720","prices":[{"id":"0a8fa1ad-74a9-4c71-b586-9a77d3817fc8","listingId":"9db7e47d-ced9-4f5f-9f3e-d8554f7030b6","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"oribarilan","category":"97","install_from":"skills.sh"},"createdAt":"2026-05-10T19:04:19.986Z"}],"sources":[{"listingId":"9db7e47d-ced9-4f5f-9f3e-d8554f7030b6","source":"github","sourceId":"oribarilan/97/correctness-traps","sourceUrl":"https://github.com/oribarilan/97/tree/main/skills/correctness-traps","isPrimary":false,"firstSeenAt":"2026-05-10T19:04:19.986Z","lastSeenAt":"2026-05-18T19:05:32.730Z"}],"details":{"listingId":"9db7e47d-ced9-4f5f-9f3e-d8554f7030b6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"oribarilan","slug":"correctness-traps","github":{"repo":"oribarilan/97","stars":21,"topics":["agent-skills","ai-agents","best-practices","claude-code","claude-code-plugin","claude-code-skills","coding-agents","copilot-cli","copilot-cli-plugin","opencode","opencode-plugin","programming-principles"],"license":"other","html_url":"https://github.com/oribarilan/97","pushed_at":"2026-05-15T21:32:54Z","description":"Agent skills distilled from the hard-won lessons of world-renowned programmers, in the spirit of \"97 Things Every Programmer Should Know\"","skill_md_sha":"e98f857a3fee100be88c969785dc2554aefe7790","skill_md_path":"skills/correctness-traps/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/oribarilan/97/tree/main/skills/correctness-traps"},"layout":"multi","source":"github","category":"97","frontmatter":{"name":"correctness-traps","description":"Use when writing or reviewing error handling, floating-point math, concurrent code, remote calls, singletons/globals, hot-path data structures, or high-volume log statements"},"skills_sh_url":"https://skills.sh/oribarilan/97/correctness-traps"},"updatedAt":"2026-05-18T19:05:32.730Z"}}