render-loop
Skill3 starsChanged 5 months agoMITView on GitHub
Project-local dev feedback loop for the session-export renderer. Use when asked to check, fix, or improve how a Claude Code / Codex session renders in the exported HTML — e.g. "check the rendering of tool call X around Y, see session <uuid>". Exports the session to HTML, screenshots the relevant card with headless Chrome so the result can be viewed, then guides editing skills/session-export and re-validating.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- jocarrd/crux-agentstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jocarrd/crux-agents★ 4same 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.
In this repositoryOne other file it gives its agents.
- session-exportSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
When the user points at a rendering concern and a session (e.g.
- Very specific: line 82
Self-improving: if the loop exposes a gap — shoot.js can't target what you need, a new card type isn't matchable, the diagnosis was slow — …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
render-loop
A self-checking loop for developing this repo's exporter. It lets you see what the HTML actually renders (via a headless-Chrome screenshot you can open with the Read tool), fix the renderer, and re-validate — without leaving the session.
This skill is repo-local (.claude/skills/render-loop/) and not shareable: it
hard-codes this repo's layout (skills/session-export/) and assumes Google
Chrome + Node 18+.
The loop
When the user points at a rendering concern and a session (e.g. "the rendering of TaskGet looks like raw JSON, see session 2e875f45…"):
- Locate & classify the session. A session id is a UUID. Claude sessions
live under
~/.claude/projects/**/<uuid>.jsonl; Codex rollouts under~/.codex/sessions/**/rollout-*<uuid>*.jsonl. If it's a Codex rollout, use--codex. You can pass a full path instead of an id. - Inspect the raw record first. Find the relevant
tool_use/ message in the jsonl to learn the exact input/result shape before changing code:grep -n '"name":"TaskGet"' <session.jsonl> # or node one-liner to dump the block - Export + screenshot the card. From the repo root:
.claude/skills/render-loop/render.sh <uuid-or-path> [--codex] --find "<text near the card>"--findtext should be something visible in that card (a tool name, an arg, a phrase). It printsHTML:andPNG:paths. Read the PNG to view the current rendering. (Omit--findfor a full-page capture, height-capped.) - Diagnose. Compare what you see against what the user wants. The renderer
is
skills/session-export/template.js(shared client renderer — tool cards live in therenderToolCallswitch; entry/role logic inrenderEntry/renderRun). Parsing/normalization isexport.js(Claude) andcodex-export.js(Codex); shared redaction inredact.js. - Fix the JS (usually a
casein therenderToolCallswitch, or a helper). - Re-render & validate. Re-run the same
render.sh …command, Read the new PNG, and confirm it matches the requested outcome. Iterate steps 4–6 until it's right. Also run the cheap sanity check after edits:
Then run the test suite (node -e 'const h=require("./skills/session-export/template.js")();const m=h.match(/<script>([\s\S]*?)<\/script>\s*<\/body>/);new Function(m[1]);console.log("ok")'node --test test/). When a fix covers a new record or block shape, add it to the fixture intest/render.test.js(ortest/payload.test.jsfor exporter-side changes), built with the helpers intest/helpers/fixtures.js— real shapes, synthetic content. - Report the change and offer to commit (template work currently lives on
the
codex-exportbranch).
Tools in this skill
render.sh <session> [--codex] [--find "text"] [--index N]— export then screenshot in one step (most common entry point).shoot.js <file.html> [--find "text" | --selector css] [--index N] [--full] [--span N] [--no-expand] [--out png]— screenshot any already-exported HTML.--span Nstretches the crop over the N siblings after the match (see a card in context, e.g. a compaction divider plus the turns after it). Drives Chrome over the DevTools Protocol with Node's built-in WebSocket (no npm deps); expands all collapsible cards (unless--no-expand, which shows the page as a reader first sees it), then crops to the matched element (or full page, capped at 4000px). Override the browser withCHROME_BIN.
Notes
- Exported HTML lands in the repo root (
claude-session-*/codex-session-*, both gitignored); the PNG goes to$TMPDIR/render-loop.png. Both are scratch. --findmatches the first card (.tool,.askq,.subagent,.context,.command,.entry) containing the text; use--index Nto disambiguate.- Self-improving: if the loop exposes a gap —
shoot.jscan't target what you need, a new card type isn't matchable, the diagnosis was slow — improveshoot.js/ thisSKILL.mdas part of the task so the next loop is sharper.
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
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.

