Explainer examples

An agent wrote each page with the explainer skill to answer the question in quotes. Every page is one HTML file that opens offline.

Install: npx skills add barisgit/explainer-skill

“Explain how a database B-tree index works: why a lookup in a million rows takes a handful of page reads, what happens on insert when a page fills up and splits, and why a range scan is cheap. I know SQL but not storage internals.”

How a B-tree index finds a row

502035512182027333541476580505862657174808593502035512182027333541476580505862657174808593
  1. Read the root: 71 is at least 50, so take the right branch.
  2. Read the right branch: 71 is at least 65 and under 80, so take the middle leaf.
  3. Read the leaf and find 71. Three pages read; the other five leaves were never touched.
  4. A leaf holds the key and a pointer to the table row: one more read fetches the row itself.

“Why are electricity prices in Germany sometimes negative, and how often does it happen? Use real public data (e.g. Energy-Charts / Fraunhofer ISE, SMARD or ENTSO-E day-ahead prices; download it, cite it) and show me what drives it: solar, wind, demand, hours of the day, seasons.”

Why German electricity prices go negative

    “What did npm install actually put on my disk?”

    What npm install put on disk

    “Build me a comprehensive explainer of Litestream (github.com/benbjohnson/litestream): in about 15 minutes I want to understand how it works, top level then each part. I'm an engineer who has never seen it.”

    How Litestream works

    Litestream processYour serverwritesrunsone per DBwrites L0queuedWALuploadsmergesYour appSQLite DB+ WAL CLI and control6 Store: compact4 Capture1 LTX files2 Replicate3Objectstorage Restoreto a new DB5 VFSread-only apps7Litestream processYour serverwritesrunsone per DBwrites L0queuedWALuploadsmergesYour appSQLite DB+ WAL CLI and control6 Store: compact4 Capture1 LTX files2 Replicate3Objectstorage Restoreto a new DB5 VFSread-only apps7

    “We're a 4-person team starting a B2B SaaS (multi-tenant, maybe 200 customers in year one, mostly CRUD plus some reporting). Help me decide the database: Postgres, SQLite (with Litestream or Turso), or MySQL. Lay out the trade-offs with evidence and let me pick.”

    The database for a multi-tenant SaaS

    Meets all of them: Postgres.
    OptionIsolation enforced by the databaseFailover without a restoreReporting on live dataTransactional migrationsLeast to operate
    PostgresYesrow-level securityYesmanaged standbyYesmaterialized views, replicasYesDDL inside a transactionPartialmanaged service
    MySQLNotenant filter in app codeYesmanaged standbyPartialno materialized viewsNoDDL commits implicitlyPartialmanaged service
    SQLite + LitestreamPartialone file per tenantNorestore on a new hostPartialshares the app's hostYesDDL inside a transactionYesruns inside the app
    SQLite on TursoPartialdatabase per tenantPartialhosted, read the SLAPartialremote, thin toolingYesDDL inside a transactionYeshosted

    “Three quotes for a home battery: 5, 10 or 15 kWh. Which one?”

    Home battery payback by size

      “The sensor works at 100 kHz and drops bytes at 400 kHz. Why?”

      I²C pull-up resistors at 400 kHz

      10 kΩ: 847 ns

      “Why does my square wave still ring after I add more terms?”

      The Gibbs overshoot of a square wave

      peak 1.182

      “Explain the change that ships ECharts compressed, so I can approve it.”

      Shipping ECharts compressed

        “Is wind and solar actually replacing coal?”

        Change in world electricity generation, by source

        “When does Dijkstra give the wrong answer?”

        Dijkstra's algorithm with a negative edge

        Dijkstra is off by 1

        “Why does a pulse come back from the end of a cable, and what decides how big it is? Let me drag the load and watch it happen, and show where Z₀ comes from.”

        Reflections on a transmission line