Skip to content
Agentmart
Submit a tool

mdk

Build on the MDK (Mining Device Kit) platform.

Skill by tetherto

IndexedApache-2.0★ 11
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tetherto-mdk

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Build on the MDK (Mining Device Kit) platform. Use whenever a task mentions MDK, the Kernel, a Worker, a Worker Plugin, mdk-contract.json, @tetherto/mdk-* packages, a miner / power meter / sensor / container integration, a cross-worker aggregation endpoint, a UI component for Worker/plugin data, or deploying an MDK stack.

Use cases: documents, design, frontend, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mdk

What's inside

Skill name
mdk
Description
Build on the MDK (Mining Device Kit) platform. Use whenever a task mentions MDK, the Kernel, a Worker, a Worker Plugin, mdk-contract.json, @tetherto/mdk-* packages, a miner / power meter / sensor / container integration, a cross-worker aggregation endpoint, a UI component for Worker/plugin data, or deploying an MDK stack.
License
Apache-2.0
Metadata
suite: mdk-developer-skill · mdk_version: 0.5.0
Instructions
102 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • files: referenced but missing: references/mdk-contract.schema.json

Files (5)

  • SKILL.md
  • architecture.md · references/
  • glossary.md · references/
  • package-index.md · references/
  • protocol.md · references/

SKILL.md (first lines)

# Building on MDK

MDK is a P2P mining device management platform layered as:
**Consumers → Gateway (or the standalone MCP server) → Kernel → Workers → Devices**.

The Kernel ([`backend/core/kernel`](../../../../../backend/core/kernel/README.md)) discovers Workers over the Hyperswarm DHT,
pulls telemetry, dispatches commands, and monitors health. Workers
([`backend/workers/`](../../../../../backend/workers/README.md)) are device-protocol adapters: a **Worker Plugin**, either
a directory-loaded package (`mdk-contract.json` + `src/` handlers, hosted on
`WorkerRuntimeV2` — the shape `mdk create worker` scaffolds) or the older
`{ contract, dir, connect }` + handler-module shape hosted on the generic
`WorkerRuntime` ([`backend/core/mdk-worker`](../../../../../backend/core/mdk-worker/index.js); both shapes are documented in
[`../mdk-worker-plugin/references/worker-base-api.md`](../mdk-worker-plugin/references/worker-base-api.md)).
All Kernel ↔ Worker communication is MDK Protocol envelopes over
`@hyperswarm/rpc` — never direct method calls.

Load [`references/architecture.md`](./references/architecture.md) when you need the module-level picture, and
[`references/protocol.md`](./references/protocol.md) before touching anything that sends or receives
envelopes. [`references/package-index.md`](./references/package-index.md) maps every package name to its actual
folder. [`references/glossary.md`](./references/glossary.md) decodes the terminology.

## Route to the right skill

Skills are installed as flat siblings — each row names a skill directory next
to this one. **Read this table first** on every MDK task; many user prompts
need more than one skill in order.

### Single-skill tasks

| Task purpose                     | Use skill                            | Read first              |
| -------------------------------- | ------------------------------------ | ----------------------- |
| Integrate a new device (miner, power meter, sensor, container) | `mdk-worker-plugin` | [`references/protocol.md`](./references/protocol.md) |
| Add / change a Gateway aggregation HTTP endpoint only | `mdk-gateway-plugin` | Worker `mdk-contract.json` |
| Scaffold a new MDK App package ready to publish | `mdk-create-app` | [`mdk-create-app/SKILL.md`](../mdk-create-app/SKILL.md) |
| Give an app the Kernel access its code needs (`permissions`, its role in `spec.rbac`), or fix an app's 403 | `mdk-app-rbac` | [`mdk-app-rbac/references/kernel-access.md`](../mdk-app-rbac/references/kernel-access.md) |
| Build a UI page, panel or widget (an MDK App's `ui-src/` or a dashboard) for an **existing** route | `mdk-ui-component` | [`mdk-ui-component/SKILL.md`](../mdk-ui-component/SKILL.md) |
| Deploy / run / register apps in `mdk.yaml` | `mdk-deployment` | project `mdk.yaml` |
| Size a site from a description (Workers, host tier, envelope) | `mdk-site-sizing` | [`mdk-site-sizing/references/envelope.json`](../mdk-site-sizing/references/envelope.json) |
| Security-audit packages before an npm publish | `mdk-publish-security` | [`mdk-publish-security/references/vuln-classes.md`](../mdk-publish-security/references/vuln-classes.md) |

### Composite prompts (use multiple skills, in order)

Prompts like **"create a UI to show \<metric\> for a \<device\>"** are
**not** UI-only. Follow this chain:

| Step | Skill                            | What you do                           |
| ---- | -------------------------------- | ------------------------------------- |
| 1    | *(discovery)* | Resolve each `mdk.yaml` → `spec.workers[].package` to its `mdk-contract.json` at the package root (or legacy `plugin/mdk-contract.json`); confirm the telemetry channel, unit, and brand/fingerprint exist |
| 2    | `mdk-gateway-plugin` | If no Gateway route returns that shaped metric, `mdk create app <name>` (scaffolds + registers under `mdk.yaml` → `spec.apps`; manifest rules in `mdk-create-app`) then write the controller + `plugin/mdk-plugin.json` |
| 3    | `mdk-deployment`                 | Restart with `mdk run` (or `mdk run app <name>`) as needed |
| 4    | `mdk-ui-component` | Data (`mdkFetch`) → hook (`toQueryView` view) → presentational component → thin page, registered in the app's `defineMdkApp` (or a dashboard's `routes.ts`); props from [`ui-registry.json`](../mdk-ui-component/references/ui-registry.json) only |
| 5    | `mdk-deployment`                 | Verify with `curl` + running dashboard |

Skip step 2–3 when the route already exists and returns the right JSON.
Skip step 1's device work — if the Worker/channel is missing, insert
`mdk-worker-plugin` **before** step 2.

```
User: "show / UI / dashboard for <metric> on <device family>"
        │
        ▼
  Contract exists? ──no──► mdk-worker-plugin ──┐
        │ yes                                  │
        ▼                                      ▼
  /api route exists? ──no──► mdk-gateway-plugin ──► mdk-deployment
        │ yes                                  │
        ▼                                      ▼
  mdk-ui-component  ◄──────────────────────────┘
        │
        ▼
  mdk-deployment (smoke: curl + UI)
```

### Quick examples

| User says                                              | Skills (ordered)                         |
| ------------------------------------------------------ | ---------------------------------------- |
| "Create a UI to show \<metric\> for \<device family\>" | discover contract → `mdk-gateway-plugin` → `mdk-deployment` → `mdk-ui-component` |
| "Add a fleet-wide rollup API"                          | `mdk-gateway-plugin` → `mdk-deployment`  |
| "Chart the existing `/api/...` in the dashboard"       | `mdk-ui-component`                       |
| "Integrate a new Modbus meter"                         | `mdk-worker-plugin`                      |
| "Start Kernel + Worker + Gateway"                      | `mdk-deployment`                         |
| "Size this site / how many Workers for N miners"       | `mdk-site-sizing`                        |
| "Audit the packages before we publish"                 | `mdk-publish-security`                   |
| "What permissions does this app need?" / "the app gets 403 from the Kernel" | `mdk-app-rbac`      |

## Non-negotiable invariants

- **Workers never call the Kernel.** The protocol is unidirectional: the
  Kernel pulls (`telemetry.pull`, `state.pull`, `health.ping`) and pushes
  commands (`command.request`). A Worker only ever answers `handleRequest`.
- **`mdk-contract.json` is the single source of truth** for a Worker's
  telemetry, commands, health states and error codes. Validate it against
  `references/mdk-contract.schema.json` (the Kernel terminates Workers whose
  capability payload is malformed, and rejects commands not declared in it).
- **Never add transport-level envelope fields.** The envelope is exactly
  `{ id, version, type, action, sender, target, deviceId, timestamp, payload }`
  — extend `payload` instead.
- **Use canonical `@tetherto/mdk-*` names only** — the full list lives in
  [`references/package-index.md`](./references/package-index.md).
- **Never invent UI prop names or telemetry fields** — registry + contracts
  only (`mdk-ui-component` / `mdk-gateway-plugin`).

From tetherto/mdk, Apache-2.0.

More from tetherto/mdk

Signals

Stars
11
Forks
13
Open issues
0
Last commit (this folder)
Oct 22, 2026 (7 days ago)
Last release
Oct 19, 2026 (10 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from tetherto

Cite this page

mdk skill. Agent Mart. https://agentmart.dev/skills/tetherto-mdk (last updated 2026-10-24)