agentleFS
TheSethRoseTheSethRose/blocks/SKILL.md

blocks

Skill1 starsChanged 5 days agoMITView on GitHub

Interactive data visuals for `show_widget` in the Claude desktop app. One set of rows feeds linked parts (filter chips, stats, tables, bars, line charts, cards, what-if sliders, step lists, send-back buttons), so a filter, a pick or a slider changes every part at once. Use before drawing a visual in chat, or when an answer holds status, numbers, findings, a comparison, a plan, a what-if or a decision the reader can explore or hand back. Not for pages meant for other people (use Artifact) or sites and apps in a repo.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. SELISEdigitalplatforms/blocks-skills★ 42same name
    2. crissmoldovan/agent-skills★ 2same name
    3. dkadts/landing-kit-building★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write the spec to a file in your scratchpad, for example findings.js.

    line 14
  2. Distinctive:

    Run the builder from this skill's folder.

    line 15
  3. Very specific:

    Use only numbers you were given or worked out.

    line 54
  4. Very specific:

    Use act only when the next step needs you to think.

    line 58
  5. Distinctive:

    Every control must change something the reader can see.

    line 59
  6. Very specific:

    Keep it small: 4 stats or fewer, 8 chip values or fewer per field, 12 bars or fewer, and a limit on tables past 12 rows.

    line 61

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Blocks

A block is a small data app inside your answer. You give it rows and a list of parts. Every part reads the same rows, so when the reader filters, picks, opens or drags something, all parts change together. The point is to let the reader ask the data their own questions, which text can't do.

You write a short spec. A tested runtime draws it. You never hand-write the widget's HTML, CSS or event code.

Build one

  1. Write the spec to a file in your scratchpad, for example findings.js. It holds one call: Blocks({ summary, rows, parts }).
  2. Run the builder from this skill's folder. It checks the spec, then prints the widget code.
node <this skill's folder>/bin/blocks.mjs findings.js
  1. Fix every error line and run it again. Read each warn line and act on it or accept it.
  2. Pass the printed code, unchanged, as widget_code to show_widget. Call read_me once per session first if you haven't; where it differs from Blocks on look or layout, Blocks wins.

The printed code is your spec plus one script tag that loads the runtime from jsDelivr, pinned to a version. If the block shows "The Blocks runtime did not load", build again with --inline, which puts the runtime inside the widget instead.

Read spec.md for every part and option. Copy from the closest file in examples/: triage.js (filter, open, pick, send back), whatif.js (sliders and a projection), compare.js (weights re-rank options), breakdown.js (click a bar to narrow everything), plan.js (steps with status), trend.js (a chart and table that share rows).

Start from the reader's question

Pick the interaction first, then the parts. An interaction earns its place only when it changes what the reader knows or what they send back to you.

The reader wants to askGive themParts
Which of these matter to me?Narrowfacets, or bars with by
What's behind this one?Openbody on a table or list
Where does the total come from?Break downtwo bars with by, stats, table
What if this number changes?What-ifparams, knobs, then derive or a series function
Which option wins for what I care about?Weighknobs as weights, derive a score, bars and cards with best
What happened over time?Read alongline, with a table when single values matter
Where are we in the plan?Walklist with rail and body
Do these, not thoseHand backpick on a table, list or cards, plus act

The runtime does the linking for you:

  • A filter recounts every stat, bar, table and chart. Stats show "of" the full total while filtered.
  • A changed slider shows the change from the start on stats, a "was" value on the control, and a ghost of the first line or bar on charts. Reset brings it back.
  • Hovering a row or chart point marks the same row in every part. Clicking opens it.
  • An act button builds its message from the current picks, filters and sliders.

Rules

  • The text must stand alone. Put the answer and any decision in your message, because a visual may not show everywhere. Never repeat the whole visual in words.
  • Skip the block when one or two sentences say it, or when nothing in it would respond to the reader. A markdown list or table is the right tool for a short static answer.
  • Use only numbers you were given or worked out. Add no currency or unit you weren't given. Put raw numbers in rows and let fmt add the unit.
  • Give the reader a sensible starting state: pre-pick your recommendation with pick, open the row that matters with focus, and set params to the real current values.
  • Say each fact once. Two parts may show the same rows only when each answers a different question, such as a chart for the shape and a table for exact values.
  • A tone is good, warn or bad, and only for a real state. Most rows need none. The runtime pairs every tone with an icon and words.
  • Use act only when the next step needs you to think. Filtering, sorting, sums and what-ifs run in the page.
  • Every control must change something the reader can see. The builder warns about picks nothing reads and sliders nothing uses.
  • Parts hold data, not explanation: no titles or prose inside the block beyond labels. Keep labels to a few words, in sentence case.
  • Keep it small: 4 stats or fewer, 8 chip values or fewer per field, 12 bars or fewer, and a limit on tables past 12 rows. A chart needs enough points to show a shape; two numbers are a sentence.
  • For something the runtime can't draw, add a view part (see spec.md) rather than hand-writing a whole widget. If the reader reports "<part> failed: ..." in the block, that text is the error to fix.

To change the runtime, add a part or run the tests, read maintain.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.