pisan-labs

Cache Miss Theater — Development skill for Claude Code

Development community

Paste a C loop nest and watch its exact address trace run through a cache you configure, with every miss labelled compulsory, capacity or conflict.

How to install Cache Miss Theater

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pisan-labs/cache-miss-theater and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Cache Miss Theater does

Paste a C loop nest and watch its exact address trace run through a cache you configure, with every miss labelled compulsory, capacity or conflict. Built with Claude Code.

Alternatives in Development

  • Sprint Plan — Plan sprints with capacity, story selection, and risk mapping 7.8k ★
  • Plan Sprint — Plan the upcoming sprint — epic breakdown, user story decomposition, RICE prioritization, dependency check, an 73 ★
  • Alpha Decay — Analyze signal half-life, alpha decay curves, and strategy capacity 13 ★

README

Cache Miss Theater

Students in architecture and systems courses are told that loop order and blocking matter, but rarely see why. Write a small C loop nest and Cache Miss Theater generates its exact address trace, runs it through the cache you configure, and classifies every miss as compulsory, capacity or conflict. Step or play through the trace and watch lines arrive in their sets and get evicted, while a memory map shows which array elements are cached. Compare two kernels side by side, sweep a block size or a cache parameter, and generate exam questions whose answers come straight from the simulator.

Live: [cache-miss-theater.hintwise.org](https://cache-miss-theater.hintwise.org/)

![Row-order and column-order sums of the same 32x32 array played through a 1 KB 2-way cache: row order hits on three of every four reads, while column order crowds into four of the 16 sets and every read misses, mostly as conflict misses](demo.gif)

Built from idea 2026-10-10 n2 in [`pisanuw/daily-project-ideas`](https://github.com/pisanuw/daily-project-ideas).

![Matrix multiply in ijk order, 187 accesses in: B[14][2] just evicted B[6] from set 8 in a conflict miss](desktop.png)

What it does

  1. Kernel language. A hand-written lexer and recursive-descent parser for the C you find in loop-nest exercises: array declarations of char, short, int, float, long, double and the intN_t types with any number of dimensions, #define constants, scalars, for, while, if, blocks, C's operators, casts, and min/max/abs. A void kernel(void) { … } wrapper and #include lines are accepted, so textbook snippets paste in unchanged.
  2. Exact trace. Arrays are laid out row-major from 0x10000, each at the next 64-byte boundary after the previous one (or wherever double A[64] @ 0x8000; puts it). Scalars live in registers. For x = e the reads in e happen left to right, then the write; for x += e and x++ the read of x come