bilig-workpaper
Skill35 starsChanged 5 months agoMITView on GitHub
Use @bilig/workpaper WorkPaper state for workbook formulas, MCP editing, and tool integrations without driving spreadsheet UI.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/bilig-workpaper.mdcCursor rule
- docs/llms.txtllms.txt
- bilig-workpaperSkill
- bilig-workpaperSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use this skill when an agent needs spreadsheet-style formulas but the work should run through files, terminal commands, TypeScript, HTTP …
- Very specific: line 29
Do not trigger it for manual spreadsheet editing, Office macros, VBA, pivots, charts, COM automation, or exact Excel desktop behavior …
- Distinctive: line 37
Before wiring a client or opening a spreadsheet UI, print the compact decision card:
- Very specific: line 49
Before wiring a client, prove the published agent door with the package-owned evaluator.
- Distinctive: line 60
Use the lower-level challenge commands only when debugging the direct API loop or file-backed MCP JSON-RPC transcript:
- Distinctive: line 71
Use MCP when the host can run a stdio server or call a Streamable HTTP server.
- Distinctive: line 74
If the host supports installable skills, first check that the public skill package is discoverable:
- Very specific: line 99
Run bilig-evaluate --door agent-mcp --json first.
- Very specific: line 114
When the server is started through @bilig/workpaper@latest with --from-xlsx ./pricing.xlsx, tools/list also includes analyze_workbook_risk.
- Very specific: line 128
After a write, always read the dependent output cell and export the WorkPaper document.
- Very specific: line 148
Use @bilig/workpaper directly when workbook logic belongs in a service, queue worker, test, or route:
- Distinctive: line 182
When the user has a reduced workbook formula/import bug, generate a local report through an argument array:
- Distinctive: line 207
before values for relevant inputs and dependent outputs.
- Distinctive: line 208
after values read from the recalculated workbook.
- Distinctive: line 213
If any readback step fails, report the blocker instead of claiming the workbook was updated.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Bilig WorkPaper Agent Skill
Use this skill when an agent needs spreadsheet-style formulas but the work should run through files, terminal commands, TypeScript, HTTP routes, or MCP tools instead of Excel UI automation.
When To Trigger
Trigger this skill for tasks involving:
- workbook-shaped business logic in Node.js services;
- formula readback after writing cells;
- quote, budget, payout, pricing, import-validation, or forecast models;
- agent spreadsheet tools that need deterministic cell addresses;
- MCP clients that can run a stdio server or call a Streamable HTTP endpoint;
- reduced formula/import bugs that need a local report.
Do not trigger it for manual spreadsheet editing, Office macros, VBA, pivots, charts, COM automation, or exact Excel desktop behavior unless the user explicitly asks to compare Bilig against an Excel oracle.
Command Safety
Do not build shell commands by concatenating user text. Treat the commands below as literal templates, validate workbook paths before use, and reject values containing newlines, backticks, $(, ;, &, |, <, or >. Prefer MCP client command plus args arrays or direct TypeScript calls when inserting user-provided paths or cell references.
First Check: Agent Triage
Before wiring a client or opening a spreadsheet UI, print the compact decision card:
{
"command": "npm",
"args": ["exec", "--yes", "--package", "@bilig/workpaper@latest", "--", "bilig-agent-start", "--json"]
}First Check: Agent Evaluator
Before wiring a client, prove the published agent door with the package-owned evaluator.
It exercises MCP discovery, cell mutation, formula readback, JSON export, restart restore, and returns verified: true:
{
"command": "npm",
"args": ["exec", "--yes", "--package", "@bilig/workpaper@latest", "--", "bilig-evaluate", "--door", "agent-mcp", "--json"]
}For service-owned WorkPaper logic without MCP, run bilig-evaluate --door workpaper-service --json.
Use the lower-level challenge commands only when debugging the direct API loop or file-backed MCP JSON-RPC transcript:
[
{ "command": "npm", "args": ["exec", "--package", "@bilig/workpaper@latest", "--", "bilig-agent-challenge", "--json"] },
{ "command": "npm", "args": ["exec", "--package", "@bilig/workpaper@latest", "--", "bilig-mcp-challenge", "--json"] }
]First Choice: MCP
Use MCP when the host can run a stdio server or call a Streamable HTTP server. Configure stdio as an argument array, not a shell-concatenated string:
If the host supports installable skills, first check that the public skill package is discoverable:
npx --yes skills@latest add https://bilig.proompteng.ai --list
npx --yes skills@latest add proompteng/bilig --skill bilig-workpaper --list{
"command": "npm",
"args": [
"exec",
"--package",
"@bilig/workpaper@latest",
"--",
"bilig-workpaper-mcp",
"--workpaper",
"./pricing.workpaper.json",
"--init-demo-workpaper",
"--writable"
]
}Run bilig-evaluate --door agent-mcp --json first. If the workbook contains
provider-backed formulas such as IMPORTRANGE, run
bilig-evaluate --door agent-mcp --scenario provider-backed --json to confirm
the adapter boundary. If the evaluator fails, run bilig-mcp-challenge and
treat its returned tools array as the source of truth for the currently published package. The core file-backed tools are:
list_sheetsread_rangeread_cellset_cell_contentsset_cell_contents_and_readbackget_cell_display_valueexport_workpaper_documentvalidate_formula
When the server is started through @bilig/workpaper@latest with
--from-xlsx ./pricing.xlsx, tools/list also includes
analyze_workbook_risk. That tool is fixed to the source XLSX passed at
startup and reports workbook risk indicators before a workflow trusts the imported
WorkPaper. Without --workpaper --writable, edits stay in memory; add a
WorkPaper JSON path only when the task needs persisted file state. It does not
certify Excel compatibility.
For a maintained XLSX preflight transcript, run
pnpm --dir examples/headless-workpaper run agent:mcp-xlsx-risk-preflight.
It requires analyze_workbook_risk, set_cell_contents_and_readback,
export_workpaper_document, Inputs!B3, Summary!B3, 60000 -> 96000,
and verified: true.
After a write, always read the dependent output cell and export the WorkPaper
document. If the listed tool set includes set_cell_contents_and_readback,
prefer it for stateless clients because the edit and dependent readback happen
in one tool call. If it is absent, call set_cell_contents, then read_cell
or read_range, then export_workpaper_document.
For remote MCP clients, use the stateless demo endpoint when the client supports Streamable HTTP:
https://bilig.proompteng.ai/mcp
https://bilig.proompteng.ai/mcp/workpaperThe remote endpoint is request-local and does not write user files. Use it for connector smoke tests, tool discovery, and agent onboarding; use the file-backed stdio command when the workflow must persist a project WorkPaper JSON file.
Second Choice: Direct TypeScript
Use @bilig/workpaper directly when workbook logic belongs in a service, queue worker, test, or route:
import { buildA1WorkPaper } from '@bilig/workpaper'
const book = buildA1WorkPaper({
Inputs: [
['Metric', 'Value'],
['Customers', 20],
['Average revenue', 1200],
],
Summary: [
['Metric', 'Value'],
['Revenue', '=Inputs!B2*Inputs!B3'],
],
})
const proof = book.editAndReadback('Inputs!B2', 32, {
readbackRange: 'Summary!B2',
})
console.log({
editedCell: proof.editedCell,
after: proof.afterReadback.displayValues,
afterRestore: proof.restoredReadback.displayValues,
persistedDocumentBytes: proof.persistedDocumentBytes,
verified: proof.verified,
})
book.dispose()Formula Clinic
When the user has a reduced workbook formula/import bug, generate a local report through an argument array:
{
"command": "npm",
"args": [
"exec",
"--package",
"@bilig/workpaper@latest",
"--",
"bilig-formula-clinic",
"./reduced.xlsx",
"--cells",
"Summary!B7,Inputs!B2"
]
}The report is local. It does not upload workbook contents. Ask for a reduced public fixture rather than private customer spreadsheets.
Required Verification
Return readback, not a write-only claim. A successful agent response should include:
- the exact edited sheet and A1 cell;
- before values for relevant inputs and dependent outputs;
- after values read from the recalculated workbook;
- persistence evidence from serialized or exported WorkPaper state;
- restore or reimport checks when file boundaries matter;
- limitations for unsupported formulas or Excel-only features.
If any readback step fails, report the blocker instead of claiming the workbook was updated.
Reference URLs
- Compact docs map: https://proompteng.github.io/bilig/llms.txt
- Full host context: https://proompteng.github.io/bilig/llms-full.txt
- Host handbook: https://proompteng.github.io/bilig/headless-workpaper-agent-handbook.html
- Agent workbook challenge: https://proompteng.github.io/bilig/agent-workbook-challenge.html
- MCP server guide: https://proompteng.github.io/bilig/mcp-workpaper-tool-server.html
- OpenHands MCP setup: https://proompteng.github.io/bilig/openhands-workpaper-mcp.html
- OpenCode MCP setup: https://proompteng.github.io/bilig/opencode-workpaper-mcp.html
- Open WebUI tool setup: https://proompteng.github.io/bilig/open-webui-workpaper-mcp.html
- LobeHub MCP setup: https://proompteng.github.io/bilig/lobehub-workpaper-mcp.html
- AnythingLLM MCP setup: https://proompteng.github.io/bilig/anythingllm-workpaper-mcp.html
- Sim MCP setup: https://proompteng.github.io/bilig/sim-workpaper-mcp.html
- Formula clinic: https://proompteng.github.io/bilig/formula-bug-clinic.html
- Compatibility limits: https://proompteng.github.io/bilig/where-bilig-is-not-excel-compatible-yet.html
- Repository: https://github.com/proompteng/bilig
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.

