/emem:emem-tokenise-filesfrom emem
Splits files into signed, resolvable tokens using emem. Hashes each unit (markdown sections or byte ranges) under a Merkle root, signs the index, and issues emem:tree tokens for citing parts of large files without sharing the full file.
Ships in emem. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
| Use it when | You must cite one part of a large file and not send the file, or prove later that a part was in it. |
| You need | A BLAKE3 tool that you trust, to hash the units of a file that you hold, or a public https URL for each unit. To publish: an Ed25519 key, as emem-sign-and-attest describes. To read: no key. To check offline: BLAKE3. |
| You get | An emem:tree:<file_cid> token for the file, a #row=<i> token for each unit, and for each row its leaf, its audit path and the root. |
| Calls | POST /v1/tree/path (the root over your rows), emem_memory_create (signed write), GET /v1/tree/<file_cid>?row=<i> (MCP emem_tree). For a unit at a public URL: emem_range_hash. |
Network use. The commands in this skill send JSON to
https://emem.devand receive JSON from it. Where a step says so, they also receive an image or a raster file.https://emem.devis the service that the MCP server of the plugin connects to. The commands do not execute what they download.
Signed in.
emem_filesdoes this for you. To keep a file on your machine, hash it there and send only the index (action: index), or import the note the offline encoder prints (action: import); emem signs the root and never receives the bytes. To let your agents read the text through emem, useaction: add. Thenreadreturns one section with its proof, andsearchfinds sections. For a scanned page or a photo of text,action: ocrreads the text from the image and keeps it as a text file; the image is not kept, and OCR text can be wrong, so check it against the image. The steps below publish a tree in public under your own key, and need the publish scope.
A quoted part of a long file proves nothing about its origin. A tree gives that proof. You hash each unit, and the hashes fold into one root. You write the root into a note and sign the note. A reader then takes one unit, its audit path and your note. The reader checks that the unit was in the file you published. The reader does not see the other units.
| Item | What it is |
|---|---|
| pointer.v1 note | A markdown index. It has one row for each unit (what, url or ·, offset, length, blake3) and a root: line in its front matter. |
emem:tree:<file_cid> | The whole tree. The file_cid is the content address of the note. |
emem:tree:<file_cid>#row=<i> | One unit. |
GET /v1/tree/<file_cid>?row=<i or label> | The leaf, the audit path and the root for that unit. |
The tree has no signature of its own. Your Ed25519 signature over the
whole note binds the root. The responder also checks the note. If the
rows do not fold to the root: that the note states, it serves no
path and returns 409 root_mismatch.
This plugin does not build the index for you. It ships no code. You cut
the file and hash each unit. The tokeniser on the home page at
https://emem.dev does the same work in a browser. It has more
cutters: code by definition, safetensors by tensor, zip and pptx by
entry, and PDF by page. Its key stays in the browser.
Any cut works, because the route reads only the rows. These rules let another agent cut the same file the same way:
| File type | How to cut it |
|---|---|
| Markdown | At its headings. A heading line is 1 to 6 #, a space, then text, outside a fenced code block. Use the highest heading level that occurs two or more times. A unit starts at the first byte of such a heading line and ends where the next one starts. Text before the first such heading is the preamble unit. |
| Other | Into byte ranges of 65536 bytes. The last range can be shorter. |
offset and length count bytes of the file, not characters.| and each
run of white space to one space, and keep at most 80 characters. The
label of a byte range is bytes <offset>. Give each unit a different
label: ?row=<label> returns the first row with that label.Hash each unit: blake3(file[offset : offset + length]), 32 bytes.
Write the 32 bytes, not hex text, as base32 (RFC 4648), lower case,
without = padding. The result has 52 characters. Most BLAKE3 tools
print hex, so convert the bytes.
emem can hash a unit at a public https URL. Call
emem_range_hash with {"url": ..., "offset": ..., "length": ...}. It
returns blake3_b32, leaf_b32 (the leaf with that URL in the row) and
leaf_at_source_b32 (the leaf with ·). One call reads at most 16 MiB
over https. The upstream must answer 206 with that exact range. The
call persists nothing. Its receipt says that the responder read these
bytes. It is the responder's statement, not your own hash.
Send your rows to POST https://emem.dev/v1/tree/path as chunks, in
file order. Use · as the url of a unit in the source that you hold:
{"index": 0, "chunks": [
{"url": "·", "offset": 0, "length": 2448, "hash": "2544j27ktnegws2p47akgqrzu6aghzf7b53pzpnr7gtj3yhozx3a"},
{"url": "·", "offset": 2448, "length": 1112, "hash": "rnlpwijfk24tr3mewrt3pimkux3gtz7nzb7u2au44izhqlyri3fq"}
]}
Read root_b32 and leaves in the answer. leaves must equal your
number of units. The call stores and publishes nothing. It receives the
url, offset, length and hash of each row, never the bytes of a unit. A
hash that is not 52 base32 characters in lower case gets
400 invalid_argument.
On 12 November 2026, the 15 rows of the example note in step 5 went to
this route as chunks with index: 3. The answer had leaves: 15 and
root_b32 fjh3xdiuj63byhevcoemfuslkqy5msuaeyfoizoj4kliwc46qljq, the
root: of that note. Its 4-step path was the same as the one from
GET /v1/tree.
You can also calculate the root yourself with the hash rules.
Write the note in this form. Put the root_b32 of step 2 on the
root: line:
---
emem: pointer.v1
source: report.md, held by its writer (not uploaded)
bytes: <size of the file>
blake3: <base32 BLAKE3 of the whole file>
chunks: <units> of <units> hashed
root: <root_b32 from step 2>
---
# report.md
## Units
| what | url (· is the source) | offset | length | blake3 |
|---|---|---|---|---|
| preamble | · | 0 | <length> | <52-character base32 hash> |
| <heading text> | · | <offset> | <length> | <52-character base32 hash> |
The route reads the table strictly (crates/emem-api-rest/src/tree.rs):
--- line. The emem: and root: keys are
inside that first front matter block. The route reads only these two
keys. The other keys are for readers.| , ends with |, and separates cells with
|. Use one space on each side of every |.what.409 root_mismatch.A published note is permanent. Before you sign, read the rows back out
of your note text and send them to POST /v1/tree/path again. The root
must be the same as the root: line.
This step is a signed write. Write the note to your own namespace with
emem_memory_create. Sign it as
emem-sign-and-attest describes.
Sign before you send. The signer calculates the digest of the write
that you composed, so you do not send the note unsigned.
Call signer_whoami from the optional emem-signer plugin to get
your namespace. Use a path in it, for example
/memories/by_attester/<pubkey8>/trees/site-survey-plot-7.md.
signer_sign_write with verb: "create", the path, the text
of the note as text, and base: "absent".emem_memory_create with
{path, file_text: <the text of the note>, kind: "resource"} and the
attester block that signer_sign_write returned.file_cid
from the create result.If the server refuses the write, the refusal names the digest that it
expected, at details.how_to_sign.sign_this.digest_hex. Give that
digest to signer_sign_write as expected_digest_hex. If the two
digests are different, your text is not the note, and the signer signs
nothing.
Then send a GET to https://emem.dev/v1/tree/<file_cid> without row.
rows must equal your number of units, and root_b32 must equal your
root: line.
Published notes are public and permanent. Do not tokenise a file if
you do not want to publish its labels or hashes. A · row shows the
hash and the size of the unit. It does not show the bytes.
All calls in this step are reads. They need no key. The example uses a
published note: the section index of the emem README, signed on 6
November 2026. It has 15 rows. Use your own path and file_cid in
place of these.
Get the audit path for one row. Give a row number or a label. Send
a GET to https://emem.dev/v1/tree/fucoti2h7r6plhxzd2m2cmtuve?row=3
and save the answer as row.json.
The MCP tool emem_tree with {"file_cid": "...", "row": "3"}
returns the same JSON. It is not in the short tool list of the MCP
server. The server runs it by name through tools/call.
Get the raw bytes of the note. Keep the bytes as the server sends
them, because they must hash to the file_cid. Send a GET to
https://emem.dev/memories/by_attester/k572x7go/readme/tree-20261106.md
and save the answer as note.md.
Compare the answer with the note. These lines need no hash code:
jq -c '{file_cid, rows, row, root_b32, steps: (.path | length)}' row.json
grep '^root:' note.md
root_b32 must equal the root: line. The table row at row.index
must have the row.label of the answer.
Check the path yourself, as the hash rules say. If you hold the source file, also hash the bytes of the unit.
Check who wrote the note. Get the JSON view of the note: send the
same GET with the header accept: application/json. Then check its
authorship as
emem-multi-agent-handoff
describes.
The answer from GET /v1/tree is the responder's own work. It parsed the note
and folded the rows, and note_root_matches: true says that the rows
fold to the stated root. The route signs nothing. A path proves a unit
only after you fold it yourself, against the root: of a note whose
author signature you checked.
On 12 November 2026, GET /v1/tree/fucoti2h7r6plhxzd2m2cmtuve?row=3
returned rows: 15, row: {"index": 3, "label": "Quickstart"}, a
path of 4 steps and root_b32
fjh3xdiuj63byhevcoemfuslkqy5msuaeyfoizoj4kliwc46qljq. That is the
root: line of the note. The table row gives offset 5305 and length
3727. The note bytes hashed to the file_cid, the row rebuilt to
leaf_b32, and the path folded to the root. ?row=Quickstart returned
the same row as ?row=3. The JSON view named the author key
k572x7go72uoih45j2xnvaoznda7jem6mqlrjj2psn4qqlgfosia and the verb
create.
amii4tnpkfoofsyzrbbs2vxsj4 is a published 107-row index of the GPT-2
safetensors file. On 12 November 2026, ?row=1 returned
tensor h.3.attn.c_proj.bias F32[768], a tensor of 3072 bytes, with a
path of 7 steps.
The two 404 rows came back from live calls on 7 November 2026. The
409 and 422 rows come from the code in
crates/emem-api-rest/src/tree.rs. Read the specific code in
details.code. For row_not_found, the top-level code is
invalid_argument.
| Status | details.code | Cause | What to do |
|---|---|---|---|
| 404 | cid_not_found | The responder holds no note with this file_cid. | Check the file_cid. Use the value from the create result. |
| 404 | row_not_found | No row has this number or label. The error gives rows. | Use a number below rows, or an exact label. |
| 409 | root_mismatch | The rows of the note do not fold to its root:. | Write the table again by the rules of step 3. Check its root with POST /v1/tree/path before you publish. |
| 422 | not_a_tree or no_rows | The note is not pointer.v1 or directory.v1, or no table row parsed. | Start the note with the front matter of step 3, with emem: pointer.v1, and write each row as step 3 says. |
Do these checks in code that you trust. This plugin ships no code. The emem repository publishes a reference offline builder and checker at https://github.com/Vortx-AI/emem/tree/main/tools/verifiers/emem-tokenise-files for anyone who wants to read or run it themselves. The rules are also in docs/protocol.md §9.8.
Every hash is BLAKE3 with a 32-byte output. Every hash in a row, a path
or a root is base32 (RFC 4648), lower case, without = padding.
leaf = blake3(url_utf8 || u64_be(offset) || u64_be(length) || blake3(unit))
node = blake3(left || right) an odd node moves up and adds no path step
file_cid = base32(first 16 bytes of blake3(note bytes))
A · url hashes as the empty string. To check one row:
file_cid.row.index. It must equal
leaf_b32.h = leaf. For each step, if side is
left, h = blake3(hash || h). If side is right,
h = blake3(h || hash). The end value must equal root_b32 and the
root: line of the note.blake3(file[offset : offset + length]) must
equal the blake3 cell of the row.The tree has no domain separator between leaf and node, which is different from the transparency log. Thus always check the bytes of a unit against its row. Do not trust a leaf value alone.
GET /v1/log/test_vectors gives known answers for the transparency log
and the receipt tree only, not for this tree. To test your code here,
use the published README note of step 5 as a known answer: its 15 rows
fold to its root:. Then change one character of one path hash and
make sure that your fold gives a different root. A check that cannot
fail proves nothing.
POST /v1/tree/path calculates a path for rows that you send. It
publishes nothing. Send {"index": <i>, "leaves": [...]} with base32
leaf hashes, or {"index": <i>, "chunks": [...]} with
url, offset, length and hash for each row. This command makes a
body with two leaves from row.json of step 5, in the order of row 3's
audit path:
jq -c '{index: 1, leaves: [.path[0].hash_b32, .leaf_b32]}' row.json > path_req.json
Send path_req.json as the body of POST https://emem.dev/v1/tree/path.
On 7 November 2026 it returned leaves: 2, one path step with
side: "left", and a root_b32. That root is the node above row 3 in
the published tree. A hash that is not base32 of 32
bytes gives 400 invalid_argument.
#row= in a token does nothing alone. Give ?row= to the route.· unit. For units
that other agents must get, publish each unit as its own note and
put its URL in the row. You can also point the row at a public URL.
POST /v1/range_hash (MCP emem_range_hash) hashes a byte range of
a public URL. It persists nothing.content.
Get https://emem.dev<path> instead, as step 5 does.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vortx-ai/emem --plugin emem19 skills in this plugin
/emem-device-tracesReads and checks the signed activity records (OS traces) emem holds for devices such as robots, drones, satellites and sensor hosts. Lists enrolled devices and their assurance tier, and resolves an emem:trace token to its signed OS trace. Re-verifies the trace (segment chain, clocks, required layers, output binding, device signature). Reads the platform registry to say which hardware roots of trust emem admits. Use when a fact or claim is said to come from a device. Use when an agent receives an emem:trace or emem:attestation token. Also use when someone asks if a robot or satellite can prove what it ran. Read-only: it sends and receives JSON, runs nothing it receives, and says plainly what is roadmap./emem-document-evidenceTurns a scanned document into signed, checkable evidence with emem. It runs OCR on an image. Then it parses a pesticide-residue lab report: analytes, results in mg/kg, LOQ, printed MRL, exceedances. Or it parses a land record: owners, parcel ids, areas in hectares, places, dates. Each value carries its line and byte offset, and emem signs each step. Use when an agent must extract fields from a lab certificate, a 7/12 extract, a khasra or a CAR record. Use it when the agent must hand them on with proof of the image and text they came from. It states which hashes and signatures to compute again, so that a third party can check the chain with its own tools and no trust in emem./emem-eudr-due-diligenceProduces a signed, Annex II shaped Due Diligence Statement under the EU Deforestation Regulation (EU 2023/1115) for one or more production plots. It says what it proves and what it leaves to the operator. It checks each plot against the JRC GFC2020 forest baseline and the Hansen Global Forest Change loss year at the 2020-12-31 cut-off. It cross-checks JRC TMF and grades how well the inputs support the verdict. Use when someone asks if a cocoa, coffee, soy, palm, rubber, cattle or wood plot is deforestation-free. Also use it for per-cell evidence for an Article 12 record./emem-field-signalsAnswers agronomy questions about one farm field with signed evidence from emem. It gets the boundary polygons of the field. It checks for crop-residue burns over a date window (Sentinel-2 NBR and NDTI plus MODIS burned area). It sums actual evapotranspiration over a season (MODIS MOD16). It fetches a true-colour Sentinel-2 picture of the plot. Use when the user asks whether a field burned or how much water a crop used. Also use it for the look of a plot or its edges, when the user wants per-cell fact ids behind the answer./emem-field-tokensFetches a native-resolution raster field over an area from emem, or the same field over several dates. The result is a signed artifact that anyone can re-derive, not a set of per-cell values. Use when the user needs the grid of values over an area, not one number at one point. Examples are a world-model input, a band or NDVI layer, change over a scene window, or pixels a third party can re-hash. Returns content-addressed grid artifacts, a signed derivation record, and an emem:raster, emem:cube or emem:rasterset token. Calls go through your signed-in emem connection./emem-find-similarReturns the top-K places most similar to a seed place by cosine over a stored 128-D surface-texture embedding (Sentinel-1 plus Sentinel-2, annual). Use when the user asks for analogues or look-alikes ("find places like Bangalore", "where else looks like the Sundarbans"). The embedding band is retired on emem.dev, so the index holds only what was already stored. The skill says how to tell "no analogue" from "this seed has no vector and cannot get one".Other plugins' skills for the same job