Where your AI agent's intent meets everything physical.
- Size the data, latency and render load of a twin with your own numbers
- Set the rules your agent follows for twins of real equipment
- Keep the twin honest: stale data, drift and simulated values labeled, and no commands without interlocks and a person
- name:
- digitaltwin
- description:
- Work with digital twins of physical things (assets, sensors, robots, sites) and their 3D, AR and holographic views. Define the twin, budget data, latency and rendering, keep it in sync and measure drift, label simulated values, and never send commands to equipment without interlocks and a person's yes. Use when a task builds, sizes, syncs or reads a digital twin.
- license:
- MIT
- metadata:
- version:
- "1.0"
- homepage:
- https://digitaltwin.md
- api:
- https://digitaltwin.md/api/v1 (optional, no key, stores nothing)
- terms:
- https://digitaltwin.md/terms
Provided as is, at your own risk: a twin is an approximation, figures are estimates from the numbers you use and may be wrong, and nothing here is engineering, safety, legal or professional advice or a safety system. Terms: https://digitaltwin.md/terms.
A digital twin is a model of a physical thing kept up to date with data from it. Treat it as a view, not the thing. Define it plainly, budget what it costs to keep fresh, check it against reality, and keep it away from the controls unless the person has set up interlocks and approves each command. Show your math once, in a short block. Skip routine narration.
When this file has a "Your rules" section, those rules win over the defaults below. Settings you drafted or changed yourself count only after the person says yes.
Write down, before building or answering anything:
If something is missing, ask. Default when the person doesn't say: local metric frame (meters, right-handed, Z up) and approximate fidelity.
GET https://digitaltwin.md/api/v1/data_budget?assets=40&sensors_per_asset=12&rate_hz=10&bytes_per_reading=16&max_bandwidth_mbps=10.POST https://digitaltwin.md/api/v1/latency_budget with { "stages": [{ "label": "Network", "ms": 60, "max_ms": 250 }], "target_ms": 250 }.GET https://digitaltwin.md/api/v1/render_budget?objects=1200&triangles_per_object=5000&refresh_hz=72&views=2&device_triangles_per_second=1000000000.Five lines at most: what was checked, the numbers and their units, what is over a target or stale, what the tools can't check, and what needs a person's yes. Label estimates as estimates.
Works offline in any agent. Same file at /digitaltwin.md.
Customize
Your twin's rules, in one file.
10 settings in 5 groups. Start from a preset, change anything, and your settings are written into DIGITALTWIN.md. Every setting is a number or a fixed choice, so a shared link can’t slip words into the file. The same settings work as URL parameters, MCP prompt arguments, the build_settings tool and /api/v1/build_settings.
A cautious start: approximate fidelity in a local metric frame, drift checks every 15 minutes, simulate before changes, version every change.
Sync
How fresh the twin must be, and how often you check it against reality.
Set by the person you work for, and only that person can change them. Rules an agent drafted count only after that person says yes. Where a rule here and the rest of this file differ, the rule wins. If a rule blocks the task, stop and ask; don't work around it.
mkdir -p ~/.claude/skills/digitaltwin && curl -fsSL "https://digitaltwin.md/digitaltwin.md?actuation=never&sim_before_change=required&latency_target_ms=1000&drift_check_min=15&retention_days=90&fidelity=approximate&frame=local_metric&model_versioning=every_change&render_headroom_pct=30" -o ~/.claude/skills/digitaltwin/SKILL.mdhttps://digitaltwin.md/digitaltwin.md?actuation=never&sim_before_change=required&latency_target_ms=1000&drift_check_min=15&retention_days=90&fidelity=approximate&frame=local_metric&model_versioning=every_change&render_headroom_pct=30Copy as JSON
The same settings as one JSON object. It feeds the build_settings tool or POST /api/v1/build_settings.
9 of 10 settings set. Anything not set follows the skill’s own rules.
Tools
Budgets your agent can check before it builds.
Data, latency and render budgets for a twin, from the numbers you send. Each tool states its formula, labels results as estimates and lists what it can't check. Run them here, or call them over HTTP or MCP. They calculate; they never connect to equipment.
{
"assets": 40,
"sensors_per_asset": 12,
"rate_hz": 10,
"bytes_per_reading": 16,
"overhead_pct": 20,
"retention_days": 90,
"compression_ratio": 1,
"storage_copies": 1,
"max_bandwidth_mbps": 10
}curl -s https://digitaltwin.md/api/v1/data_budget -H 'content-type: application/json' -d '{"assets":40,"sensors_per_asset":12,"rate_hz":10,"bytes_per_reading":16,"overhead_pct":20,"retention_days":90,"compression_ratio":1,"storage_copies":1,"max_bandwidth_mbps":10}'A twin that looks right can still be wrong.
Agents are asked to build dashboards, 3D scenes and AR views of real machines, robots and sites. Without a method they guess sensor rates and payloads, mix coordinate frames, show five-minute-old data as live, present simulated values as measured, and promise a headset frame rate that the scene can't hold. Some will offer to send a command to the equipment because the twin has a button for it. One plain file sets the rules, and three calculators give the same answer every time.
- Budgets before building: bandwidth, storage, latency and triangles are checked against your caps first.
- Labeled values: every value is measured, estimated or simulated, and stale data is marked stale.
- Read-only by default: commands to equipment need interlocks and a person's yes, if your rules allow them at all.
- Same answer everywhere: the page, the API and the MCP tools run the same code, and nothing is stored.
Use it in your stack
Paste it, install it, or call it.
The skill alone gives an agent the method. The MCP server and API add the tools and your settings. No key, no account.
Paste the prompt into a system prompt or project instructions. Or keep the file in the repo and point AGENTS.md at it.
curl -fsSL https://digitaltwin.md/digitaltwin.md -o DIGITALTWIN.mdecho "Whenever a task builds, sizes, syncs or reads a digital twin of physical assets, sensors, robots or sites, or a 3D, AR or holographic view of them, follow DIGITALTWIN.md." >> AGENTS.mdFor agents that read a skills folder: install the skill so it loads when the topic comes up, and add the MCP server for the tools.
# The skillmkdir -p ~/.claude/skills/digitaltwincurl -fsSL https://digitaltwin.md/digitaltwin.md -o ~/.claude/skills/digitaltwin/SKILL.md# Tools: data_budget, latency_budget, render_budget, build_settingsclaude mcp add --transport http digitaltwin https://digitaltwin.md/mcpFor editors that read an mcp.json file: add the remote MCP server to the project, then paste the prompt into your rules.
// .cursor/mcp.json{ "mcpServers": { "digitaltwin": { "url": "https://digitaltwin.md/mcp" } } }// .vscode/mcp.json{ "servers": { "digitaltwin": { "type": "http", "url": "https://digitaltwin.md/mcp" } } }Any client that speaks remote MCP over HTTP can add it as a custom connector. Read-only, so there is nothing to authorize.
url: https://digitaltwin.md/mcptransport: streamable-http # stateless, JSON responsestools: data_budget, latency_budget, render_budget, build_settingsprompts: digitaltwin # the skill, with your settingsGET with query parameters or POST a JSON body. CORS open. An OpenAPI document is at /openapi.json.
# Every tool: GET or POST https://digitaltwin.md/api/v1/<tool>curl -s https://digitaltwin.md/api/v1 | jq '.tools[].name'curl -s "https://digitaltwin.md/api/v1/data_budget?assets=40&sensors_per_asset=12&rate_hz=10&bytes_per_reading=16&overhead_pct=20&retention_days=90&max_bandwidth_mbps=10" | jq .summarycurl -s "https://digitaltwin.md/api/v1/settings" | jq '.presets[].id'claude mcp add --transport http digitaltwin https://digitaltwin.md/mcpExample code
Call it from your own code.
Working calls against the API. The full reference is at /api/v1 and /openapi.json.
Check a twin's data, latency and render budgets. No key; nothing is stored.
# Check a twin's data, latency and render budgets. No key; nothing is stored.API=https://digitaltwin.md/api/v1# 40 assets x 12 sensors at 10 Hz, 16-byte readings, against a 10 Mbps capcurl -s "$API/data_budget?assets=40&sensors_per_asset=12&rate_hz=10&bytes_per_reading=16&retention_days=90&max_bandwidth_mbps=10" \ | jq '{summary, wire_mbps, stored_tb_over_retention, within_cap}'# Sensor-to-view latency against a 250 ms targetcurl -s "$API/latency_budget" -H 'content-type: application/json' \ -d '{"stages":[{"label":"Sensor","ms":5,"max_ms":10},{"label":"Network","ms":60,"max_ms":250},{"label":"Render","ms":17,"max_ms":33}],"target_ms":250,"sample_rate_hz":10}' \ | jq '{summary, slack_worst_ms, largest_stage, flags}'# A stereo headset view: 1,200 objects at 72 Hz against your device's triangle budgetcurl -s "$API/render_budget?objects=1200&triangles_per_object=5000&refresh_hz=72&views=2&device_triangles_per_second=1000000000&headroom_target_pct=30" \ | jq '{summary, max_objects_at_target, reduction_needed_pct}'# The skill with your rules written in: read-only twin, 500 ms target, 30 days of raw datacurl -s "https://digitaltwin.md/digitaltwin.md?preset=recommended&actuation=never&latency_target_ms=500&retention_days=30" \ -D - -o SKILL.md | grep -i x-settingsCall a tool over MCP (stateless JSON-RPC over HTTP POST). Run with: npx tsx mcp.mts
// Call a tool over MCP (stateless JSON-RPC over HTTP POST). Run with: npx tsx mcp.mtsconst res = await fetch("https://digitaltwin.md/mcp", { method: "POST", headers: { "content-type": "application/json", accept: "application/json" }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "data_budget", arguments: { streams: [ { label: "Vibration", assets: 20, sensors_per_asset: 3, rate_hz: 1000, bytes_per_reading: 4 }, { label: "Temperature", assets: 20, sensors_per_asset: 4, rate_hz: 1, bytes_per_reading: 8 }, ], overhead_pct: 25, retention_days: 30, compression_ratio: 2, max_bandwidth_mbps: 5, }, }, }),});const { result } = await res.json();console.log(result.structuredContent.summary);console.log(result.structuredContent.flags);FAQ
Can it control my robots or equipment?
Is a twin built with this a safety system?
Does survey-grade mean the model is certified?
Where do the sensor and device numbers come from?
Is this advice?
Does it name brands or show prices?
Can an agent set up its own settings?
build_settings tool. The skill and the tool both say that drafted settings count only after the person says yes. Nothing technical stops an agent from ignoring that, so read what it sends you.