officeimo-website-wasm
Skill713 starsChanged yesterdayMITView on GitHub
Use when adding or changing OfficeIMO.com browser tools (/browser/<tool>/ pages and the /convert/ directory), the browser-local OfficeIMO engine (Website/Apps/OfficeIMO.Web.Converter), its WebAssembly publishing, or static-site integration for drag/drop document tools.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- officeimo-build-releaseSkill
- officeimo-conversion-operatorSkill
- officeimo-studio-translationsSkill
- pswritepdf-retirementSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for OfficeIMO.com browser tool work.
- Distinctive: line 29
Do not require server processes, native binaries, Office, LibreOffice, queues, or a database for the GitHub Pages path.
- Distinctive: line 30
Keep local automation, batch conversion, and agent workflows in the CLI or an MCP server, not in the public browser app.
- Distinctive: line 34
Keep reflection out of the engine: it is fully trimmed with trim analysis on.
- Very specific: line 38
Add an entry to Website/data/browser_tools.json: id (URL slug), group, title, summary, seoTitle, input (kind: file, files, pair, or text.
- Very specific: line 42
If the engine can already run it (a new conversion route or PDF operation), no C# is needed.
- Very specific: line 46
Run pwsh Website/scripts/Sync-BrowserToolPages.ps1 to create the page front matter.
- Very specific: line 47
Run dotnet test Website/Apps/OfficeIMO.Web.Converter.Tests.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
OfficeIMO Website browser tools
Use this skill for OfficeIMO.com browser tool work.
Architecture
- Tool pages are static HTML.
Website/themes/officeimo/layouts/browser-tool.htmlrenders/browser/<tool>/fromWebsite/data/browser_tools.json. The page is usable before any .NET code loads. - One script drives every tool.
Website/static/js/browser-tool.js(ES5 style for the site minifier) reads the page'sdata-*attributes, stages files, runs the engine, and renders the uniform result (verdict, facts, items, preview, downloads, "continue with" hand-off through a randomized, short-lived BroadcastChannel). Files remain in memory; the sender retains them until the receiving page accepts them. The script deletes the retired IndexedDB store. - The engine runs in a Web Worker.
Website/Apps/OfficeIMO.Web.Converteris aMicrosoft.NET.Sdk.WebAssemblyapp with no UI.wwwroot/engine-worker.jsboots it and callsEngine/EngineExports.csthrough[JSExport]. Conversions never block the page. Each tool lists the lazily loaded engine assemblies it needs; the worker prefetches them while the runtime starts. - Every tool returns the same result shape (
Engine/ToolResults.cs): a one-sentence verdict, facts, named items with states (found, removed, kept, warning…), artifacts by role (primary, report, overlay, support), and a preview kind. - The
/convert/directory (partials/shortcodes/browser-tools.html) lists tools from the same data file and forwards old/convert/?route=…and?workspace=…links using each tool'slegacykeys.
Decision rules
- Do not require server processes, native binaries, Office, LibreOffice, queues, or a database for the GitHub Pages path.
- Keep local automation, batch conversion, and agent workflows in the CLI or an MCP server, not in the public browser app.
- Values shown on pages come from catalogs (
office_conversion_routes.json, the engine catalogs); write plain-language copy for visitors, not engine terms. Name findings, don't just count them. - One primary action at a time. Read-only checks (inspect, clean before sharing, compare) run as soon as files are added.
- Keep reflection out of the engine: it is fully trimmed with trim analysis on. Use source-generated JSON contexts.
Add a browser tool
- Add an entry to
Website/data/browser_tools.json:id(URL slug),group,title,summary,seoTitle,input(kind: file, files, pair, or text;accept; optionalsample,sampleSecond,sampleOptions,auto,live),options(choice, flag, number, text, password, pages),engine(kind,target,action, optionalcommit,find,confirm, and the lazyassemblies),runlabels,expect,next,legacy,guide,package. - If the engine can already run it (a new conversion route or PDF operation), no C# is needed. Otherwise add a handler
beside
Engine/ConvertTool.cs/PdfTool.cs/ShareTool.cs/TextTool.csand dispatch it inEngineExports.Run. Return aToolResultDocumentwith a plain verdict. - Mark any new engine assembly with
BlazorWebAssemblyLazyLoadin the project file. - Run
pwsh Website/scripts/Sync-BrowserToolPages.ps1to create the page front matter. - Run
dotnet test Website/Apps/OfficeIMO.Web.Converter.Tests.BrowserToolCatalogTestschecks the data against the engine catalogs, lazy-load list, generated pages, samples, and legacy links.
Validation
# Native relink needs the wasm-tools workload. On machines with a very long PATH, run publish with the machine PATH only.
dotnet publish Website/Apps/OfficeIMO.Web.Converter/OfficeIMO.Web.Converter.csproj -c Release
dotnet test Website/Apps/OfficeIMO.Web.Converter.Tests/OfficeIMO.Web.Converter.Tests.csproj -c Release
pwsh Website/build.ps1 -Dev -Only 'build-site,deploy-theme-css' # then overlay the engine wwwroot into _site/apps/officeimo-converter
pwsh Website/scripts/Test-ConverterPublish.ps1 -SiteRoot <absolute path to Website/_site>
pwsh Website/scripts/Test-ConverterPerformance.ps1 -SiteRoot <absolute path to Website/_site>Then check in a real browser that each changed tool runs end to end from its sample: verdict, preview, primary download,
and that the page shows nothing until asked except the tool itself (no runtime download on /convert/).
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.

