Repository navigation
Conversation
skills/boron lets any coding agent turn terminal output or code into a Boron image without a person at the keyboard: - link.mjs writes a share link from ANSI on stdin (wire v1, `u` content) - capture.js runs in the page, clicks the real Save button and returns the exported Blob plus a link to the picture as exported - save.mjs drives an installed Chromium-based browser over the DevTools protocol with Node built-ins, so nothing has to be installed
|
@zirkelc is attempting to deploy a commit to the colinhacks Team on Vercel. A member of the Team first needs to authorize it. |
zirkelc
marked this pull request as ready for review
September 28, 2026 16:12
colinhacks
added a commit
that referenced
this pull request
Nov 16, 2026
The wiki still said `highlight` was the one field no link carries and that `fromWire` returns `ansi`. Neither has been true since `syntax` joined the v1 wire format. It travels, it paints nothing, and a link never re-colours on open — which a hand-written link trips on (#3 did), so the reason is written down beside the behaviour.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A skill in
skills/boron/that lets any coding agent (Claude Code, Codex, Cursor, …) make a Boron image from terminal output or code, save it as PNG/SVG/JPEG/WebP, and hand back a link that reopens the picture in the editor.It is agent-agnostic (plain
SKILL.md, no tool-specific calls) and needs no npm install: only Node 22+ and whatever browser tool the agent already has (a Chrome extension or DevTools MCP server, Playwright, Puppeteer, …). It needs no change to the app.How it works
SKILL.mdFORCE_COLOR,script), use the defaults unless the user says otherwise and tell them which were used, make the link, save, report file + linkscripts/link.mjscontent=u<base64url>plus the named params). Moves to the fragment past 8000 chars, likebuildShareUrl. Omitted settings resolve throughV1_DEFAULTS.--columnsdefaults toauto: the longest visible line (escape codes stripped, tabs expanded, one cell per code point likewrapRenderLines), clamped to 80–400scripts/capture.jsrenderBlobhands toURL.createObjectURL, suppresses the anchor click, returns{ dataUrl, link }The agent's browser tool opens the link, evaluates
capture.jsand decodes the data URL into the file. If the agent has no browser tool, the skill hands the user the link and tells them to click Save.One finding:
syntaxin a link does not color the contentA link's
contentis taken literally, andsyntax=typescriptonly decides what the next paste does. So a link made from plain code arrives uncolored.capture.jstakes alanguageoption and drives the Syntax select (autofirst, then the language, so a link that already names it still recolors). The address bar is then rewritten with the colored ANSI, and that is thelinkthe skill reports. Might be worth deciding whether a link naming a language should highlight on open.Why not html-to-image (the ray.so approach)
The ray.so skill injects
html-to-imageand rasterizes the preview DOM. That is correct for ray.so, whose DOM is the image. For Boron it is the wrong source:wiki/architecture.md, the livecontenteditableflows glyphs with the browser instead of placing them at measuredx, and its frame, chrome, traffic lights and shadow are a second description of whatpaint.tsemits. The Save button's output is what users get, so that is what an agent should get.FontFaceAPI, not stylesheet@font-face. html-to-image only embeds fonts it finds in stylesheets, and the foreignObject image cannot see document fonts, so the output would be in a generic mono unless the skill rebuiltfontEmbedCSSitself..framecarriestransform: scale(previewScale), and contains the resize handles, the caret/selection and the box-selection overlay. Each would have to be undone or filtered out, and each is a new coupling to the DOM.foreignObject, not the vector export fromsvg.tswith embedded, subset fonts. WebP/JPEG need an extra canvas pass.Clicking the real button avoids all five: the pixels come from
renderBlob, exactly as a person would get them.Suggestion: a small export hook (would make this robust)
The current capture couples to three UI details: the
Save …button text, thesplit-buttonclass names, and theSyntax highlightingselect label. Scale is fixed at 2×. A tiny, documented hook would remove all of it:capture.jsshrinks toawait window.boron.ready; return window.boron.export({ format }), and falls back to the button click on older builds.renderBlobalready takes it.wiki/og-images.md.Happy to follow up with that as a separate PR if you want it.
Tested
Against live boron.sh, headless Chrome on macOS, with
capture.jsevaluated through Playwright and through agent-browser:git log --graphoutputlanguage: "typescript"and--aspect og(syntax colors present)--backdrop none --title-bar offSKILL.md, produced a correctgit log --graphimage on the first try