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.
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.
npx skills add PrismML-Eng/Bonsai-demo --skill large-file-buildgit clone --depth 1 https://github.com/PrismML-Eng/Bonsai-demoWrote 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.
[](https://agentmods.dev/skills/prismml-eng/bonsai-demo/large-file-build)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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_filewould 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):
- Bracket data (1 section)
- Stats tables (1 section)
- Model/prediction with embedded data (1 section)
- 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 (
τinstyleblocks) - Script tag placement (must be after the HTML it references)
- Python
execute_codevs HTML literal string encoding
Pitfalls
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.
- 21d ago First seen · 89 lines · 18 tokens per session scan A 249916b54b23
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.
Other skills, from other repositories
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
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.…
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…
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…
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)…
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…