large-file-build

large-file-build is a skill for Claude Code, Codex from PrismML-Eng/Bonsai-demo. It costs 18 tokens per session (905 once invoked), scanned A, original, Apache-2.0.

A procedure for building large, self-contained HTML files in smaller writing and editing steps. It calculates and checks data before embedding it in dashboards or other HTML output.

In plain words
What is it for?
It is for creating large HTML dashboards and other files containing their own markup, styles, scripts, and data.
Why use it?
A single large file write can exceed the tool's stream limit and fail. Splitting the file into sections avoids that limit while keeping the final result self-contained.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for creating large HTML dashboards and other files containing their own markup, styles, scripts, and data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prismml-eng/bonsai-demo/large-file-build
About the project

Bonsai Demo is an application for running Bonsai and Ternary-Bonsai language models locally on computers using supported hardware acceleration or CPUs. It lets users chat with the models, send images and documents, and use tool-calling features through its demo interfaces. The catalogue instruction helps coding agents set up and operate the demo.

PrismML-Eng/Bonsai-demo · 3,369 stars · on GitHub · prismml.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PrismML-Eng/Bonsai-demo --skill large-file-build
Clone the repo
git clone --depth 1 https://github.com/PrismML-Eng/Bonsai-demo

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for large-file-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/prismml-eng/bonsai-demo/large-file-build/github.svg)](https://agentmods.dev/skills/prismml-eng/bonsai-demo/large-file-build)
Your own site
<a href="https://agentmods.dev/skills/prismml-eng/bonsai-demo/large-file-build"><img src="https://agentmods.dev/badge/skills/prismml-eng/bonsai-demo/large-file-build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for large-file-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/prismml-eng/bonsai-demo/large-file-build"><img src="https://agentmods.dev/badge/skills/prismml-eng/bonsai-demo/large-file-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00905
Opus 5.5 $0.00007 $0.00362
Sonnet 5.5 $0.00004 $0.00181
Haiku 4.5 $0.00002 $0.00090

Measured 21d ago against content hash 249916b54b23, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

large-file-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

scripts/agent/skills/large-file-build/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Large-File Build (Chunked write_file Strategy)

Build large self-contained files (typically HTML dashboards, > 10KB) by splitting them into sequential write_file + patch operations. Single write calls exceed stream limits and must be avoided.

When to Use

  • Building a single-file dashboard (HTML + CSS + JS + embedded data)
  • Any output > 8KB where the first write_file would fail
  • User explicitly requests a "self-contained HTML file"

Workflow

1. Calculate First, Then Embed

  • Run all data/model calculations in execute_code (Python) to get exact numbers
  • Print verification to stdout — this is your ground truth
  • Only AFTER confirming values are correct, embed them

2. First Write — Skeleton + CSS + First Section

write_file(path=./draft.html)
# Include: <html>, <head>, <style>, <body>, <header>
# First content section (e.g., the bracket/tournament)
# Target: < 8KB payload

3. Subsequent Patches — One Section Each

patch(path=./draft.html)
# Match surrounding context exactly:
# old_string: closing tags from previous section
# new_string: next section's full HTML
# Keep each patch < 4KB

Sections to chunk (example for a World Cup dashboard):

  1. Bracket data (1 section)
  2. Stats tables (1 section)
  3. Model/prediction with embedded data (1 section)
  4. Footer (1 section)

4. Copy to Final Location

cp ./draft.html ./file.html   # the deliverable goes in the working directory

5. Verify with Browser

python3 -m http.server 8765 &
browser_navigate(url=http://localhost:8765/file.html)
browser_snapshot(full=true)  # verify all data rendered
browser_console()           # check for JS errors

If browser_snapshot returns empty elements or — values: the JS didn't execute or data wasn't embedded. Check for:

  • HTML entity encoding issues in CSS (&#964; in style blocks)
  • Script tag placement (must be after the HTML it references)
  • Python execute_code vs HTML literal string encoding

Pitfalls

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago First seen · 89 lines · 18 tokens per session scan A 249916b54b23

Subscribe to this mod's changes

large-file-build is a skill published in the GitHub repository PrismML-Eng/Bonsai-demo (3,369 stars, last pushed today), licensed Apache-2.0. It adds 18 tokens to every session and 905 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.

Related

Other skills, from other repositories

popular-web-designs

54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.

NousResearch/hermes-agent · 23 tokens

extracting-lab-tables

Detects and extracts tabular laboratory panels from PDFs, scans, and images into structured rows ready for OpenMed and FHIR. Use when the user has a CBC, CMP, lipid panel, or other lab report as a scanned image / PDF / spreadsheet and needs the test name, value, unit, reference range, and abnormal flag as clean rows.…

maziyarpanahi/openmed · 210 tokens

ingesting-clinical-documents

Turn scanned faxes, images, and CSV/CDA exports into clean text ready for OpenMed de-identification and NER, fully on-device. Use when the user has clinical documents (image scans, photographed/faxed notes, tabular CSV/TSV exports, C-CDA XML) and needs OCR or structured intake before openmed.deidentify and…

maziyarpanahi/openmed · 151 tokens

parsing-ccda-documents

Parses C-CDA / CCD XML clinical documents to extract human-readable section narrative plus coded entries, keyed by section LOINC codes and templateIds. Use before OpenMed processing when ingesting C-CDA R2.1 documents (CCD, Discharge Summary, H&P, Consultation Note) exported from an EHR and you need the narrative…

maziyarpanahi/openmed · 152 tokens

structuring-radiology-reports

Converts free-text radiology narratives into structured findings and impression — with measurements, laterality, anatomy, and follow-up recommendations — after OpenMed NER. Use when the user has a CT/MRI/X-ray/ultrasound/mammography report and needs the sections split (technique, comparison, findings, impression)…

maziyarpanahi/openmed · 195 tokens

summarizing-clinical-notes

Produces structured, citation-anchored summaries of clinical notes — one-liner, hospital course, and problem-oriented views — where every claim cites a source span so nothing is hallucinated. Use after de-identifying notes when the user wants a discharge summary draft, handoff/SBAR, problem list, or chart-abstraction…

maziyarpanahi/openmed · 129 tokens