Agent skill

Subspace Clients

by dallison in dallison/subspace

Write Subspace clients in C++, Python, Rust, or Java. An agent skill from dallison/subspace.

Apache-2.0Auto-check passedBackend & APIs

Install Subspace Clients

skills CLI
$ npx skills add dallison/subspace --skill subspace-clients -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dallison/subspace subspace-clients --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dallison/subspace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/subspace-clients .claude/skills/subspace-clients && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
subspace-clients
GitHub stars
104
Token cost
~2.4k tokens
SKILL.md length
262 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write Subspace clients in C++, Python, Rust, or Java. An agent skill from dallison/subspace.

  • The user asks how to connect to Subspace
  • SKILL.md covers Core Model, C++ Client, Python Client and Rust Client, plus 3 more sections
  • Calls cmake, bazel and cargo
  • Create publishers

What it does

Subspace Clients is an agent skill from dallison/subspace. Write Subspace clients in C++, Python, Rust, or Java. Use when the user asks how to connect to Subspace, create publishers or subscribers, publish messages, read messages, or build language client libraries with Bazel, CMake, or Android Soong/Blueprint.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. It works with C++, Python, Rust and Java. The licence is Apache-2.0.

When your agent uses it

  • The user asks how to connect to Subspace
  • Create publishers
  • Publish messages
  • Build language client libraries with Bazel

Example prompts

  • “/subspace-clients”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 0998ce5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cmake
    • bazel
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Subspace Clients loads about 2.4k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 262 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dallison/subspace at commit 0998ce5, republished under its Apache-2.0 licence (© dallison). 262 words, ~2,402 tokens.

Download SKILL.mdSave it as .claude/skills/subspace-clients/SKILL.md (or your agent's skills folder).
name
subspace-clients
description
Write Subspace clients in C++, Python, Rust, or Java. Use when the user asks how to connect to Subspace, create publishers or subscribers, publish messages, read messages, or build language client libraries with Bazel, CMake, or Android Soong/Blueprint.

Subspace Clients

Core Model

  • A subspace_server process must be running before clients connect.
  • Non-Android default socket: /tmp/subspace.
  • Android default socket: /data/local/tmp/subspace.
  • A publisher creates a channel with a slot size and slot count, writes into a shared-memory message buffer, then publishes the written byte count.
  • A subscriber attaches to a channel, waits or polls for data, then reads until the API reports no more messages.
  • User-facing build examples use bazel; bazelisk is a drop-in replacement when bazel is not available.

C++ Client

Include client/client.h and link //client:subspace_client or the CMake subspace_client target.

Use a subspace::Client when one process needs to create multiple publishers or subscribers that share one server connection. If the publisher or subscriber can own its own connection, use the convenience free functions:

cpp
auto pub_or = subspace::CreatePublisher(
    "example", subspace::PublisherOptions().SetSlotSize(256).SetNumSlots(8),
    "/tmp/subspace", "cpp-publisher");

auto sub_or = subspace::CreateSubscriber(
    "example", subspace::SubscriberOptions(), "/tmp/subspace",
    "cpp-subscriber");

Publish:

cpp
#include "client/client.h"
#include <cstring>

subspace::Client client;
auto status = client.Init("/tmp/subspace", "cpp-publisher");
if (!status.ok()) throw std::runtime_error(status.ToString());

auto pub_or = client.CreatePublisher("example", 256, 8);
if (!pub_or.ok()) throw std::runtime_error(pub_or.status().ToString());
subspace::Publisher pub = *std::move(pub_or);

auto buffer_or = pub.GetMessageBuffer();
if (!buffer_or.ok() || *buffer_or == nullptr) {
  throw std::runtime_error("no publisher buffer available");
}

const char payload[] = "hello from cpp";
std::memcpy(*buffer_or, payload, sizeof(payload) - 1);
auto msg_or = pub.PublishMessage(sizeof(payload) - 1);
if (!msg_or.ok()) throw std::runtime_error(msg_or.status().ToString());

Subscribe:

cpp
subspace::Client client;
auto status = client.Init("/tmp/subspace", "cpp-subscriber");
if (!status.ok()) throw std::runtime_error(status.ToString());

auto sub_or = client.CreateSubscriber("example");
if (!sub_or.ok()) throw std::runtime_error(sub_or.status().ToString());
subspace::Subscriber sub = *std::move(sub_or);

status = sub.Wait();
if (!status.ok()) throw std::runtime_error(status.ToString());

for (;;) {
  auto msg_or = sub.ReadMessage();
  if (!msg_or.ok()) throw std::runtime_error(msg_or.status().ToString());
  if (msg_or->length == 0) break;
  auto bytes = static_cast<const char *>(msg_or->buffer);
  // Process bytes[0..msg_or->length).
}

// Leave the subscriber trigger fd unread:
// sub.ReadMessage(subspace::ReadMode::kReadNext,
//                 subspace::ClearTrigger::kNoClearTrigger);

Python Client

The Python binding is client.python.subspace. The server binding used by tests is server.python.subspace_server.

python
import client.python.subspace as subspace

client = subspace.Client()
client.init(server_socket="/tmp/subspace", client_name="python-client")

publisher = client.create_publisher(
    channel_name="example", slot_size=256, num_slots=8
)
subscriber = client.create_subscriber(channel_name="example")

publisher.publish_message(b"hello from python")
subscriber.wait()

while True:
    data = subscriber.read_message()
    if len(data) == 0:
        break
    # Process data as bytes.

# Leave the subscriber trigger fd unread:
# subscriber.read_message(clear_trigger=subspace.ClearTrigger.NO_CLEAR_TRIGGER)

For message metadata and ordinals, use read_message_object():

python
with subscriber.read_message_object() as msg:
    print(msg.ordinal, msg.timestamp, msg.buffer)

For multiple in-flight unpublished slots, configure and use explicit leases:

python
options = subspace.PublisherOptions()
options.set_slot_size(4096)
options.set_num_slots(16)
options.set_max_outstanding_slot_leases(3)
publisher = client.create_publisher("camera", options=options)

lease = publisher.acquire_buffer_lease()
if lease is not None:
    lease.buffer[:len(payload)] = payload
    publisher.publish_buffer_lease(lease, len(payload))

release_buffer_lease(lease) discards an unpublished lease, while reclaim_buffer_lease(slot_id) reacquires a retired slot. Use SubscriberOptions.set_max_subscribers(n) to establish a server-enforced channel subscriber limit.

Rust Client

The Rust crate name is subspace_client.

rust
use subspace_client::{ClearTrigger, Client, PublisherOptions, ReadMode, SubscriberOptions};

let client = Client::new("/tmp/subspace", "rust-client").unwrap();

let pub_opts = PublisherOptions::new()
    .set_slot_size(256)
    .set_num_slots(8);
let publisher = client.create_publisher("example", &pub_opts).unwrap();

let payload = b"hello from rust";
let (buf_ptr, _capacity) = publisher
    .get_message_buffer(payload.len() as i64)
    .unwrap()
    .unwrap();
unsafe {
    std::ptr::copy_nonoverlapping(payload.as_ptr(), buf_ptr, payload.len());
}
publisher.publish_message(payload.len() as i64).unwrap();

let sub_opts = SubscriberOptions::new();
let subscriber = client.create_subscriber("example", &sub_opts).unwrap();
subscriber.wait(Some(5000)).unwrap();

loop {
    let msg = subscriber.read_message(ReadMode::ReadNext).unwrap();
    if msg.is_empty() {
        break;
    }
    let data = unsafe { msg.as_slice() };
    // Process data.
}

// Leave the subscriber trigger fd unread:
// subscriber.read_message_with_trigger(ReadMode::ReadNext, ClearTrigger::NoClearTrigger);

For multiple in-flight unpublished slots:

rust
let options = PublisherOptions::new()
    .set_slot_size(4096)
    .set_num_slots(16)
    .set_max_outstanding_slot_leases(3);
let publisher = client.create_publisher("camera", &options).unwrap();

if let Some(mut lease) = publisher.acquire_buffer_lease().unwrap() {
    unsafe {
        lease.as_mut_slice()[..payload.len()].copy_from_slice(payload);
    }
    publisher
        .publish_buffer_lease(&lease, payload.len() as i64)
        .unwrap();
}

Rust also exposes release_buffer_lease, reclaim_buffer_lease, lease-scoped metadata, set_notify_retirement_on_forced_reuse, and SubscriberOptions::set_max_subscribers.

Java Client

The Java client is Android-focused and uses JNI. Load libsubspace_jni.so normally via System.loadLibrary("subspace_jni"); device-side tests may preload native libraries with absolute paths when using /data/local/tmp.

java
import com.subspace.SubspaceClient;
import com.subspace.SubspaceMessage;
import com.subspace.SubspacePublisher;
import com.subspace.SubspaceSubscriber;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;

byte[] payload = "hello from java".getBytes(StandardCharsets.UTF_8);

try (SubspaceClient client =
             new SubspaceClient("/data/local/tmp/subspace", "java-client");
     SubspacePublisher publisher =
             client.createPublisher("/example", 256, 8);
     SubspaceSubscriber subscriber =
             client.createSubscriber("/example")) {

    ByteBuffer buffer = publisher.getMessageBuffer(payload.length);
    if (buffer == null) {
        throw new IllegalStateException("no publisher buffer available");
    }
    buffer.put(payload);
    publisher.publishMessage(payload.length);

    SubspaceMessage message = subscriber.readMessage();
    if (message != null) {
        ByteBuffer data = message.getData();
        // Process data[0..message.getLength()).
    }
}

Build The Clients

C++:

bash
bazel build //client:subspace_client
cmake -S . -B build/cmake-Debug -DCMAKE_BUILD_TYPE=Debug
cmake --build build/cmake-Debug --target subspace_client

Python:

bash
bazel build //client/python:subspace
bazel test //client/python:client_test

cmake -S . -B build/cmake-Debug -DCMAKE_BUILD_TYPE=Debug
cmake --build build/cmake-Debug --target subspace

Rust:

bash
bazel build //rust_client:subspace_client_rust
bazel test //rust_client:client_test

cmake -S . -B build/cmake-Debug -DCMAKE_BUILD_TYPE=Debug
cmake --build build/cmake-Debug --target subspace_client_rust

cd rust_client && cargo build && cargo test -- --test-threads=1

Java/JNI for Android:

bash
bazel build \
  //android/jni:libsubspace_jni.so \
  //android/java:subspace-java \
  //android/java:subspace-java-test \
  --config=android_x86_64

cmake -S . -B build/android \
  -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
  -DANDROID_ABI=x86_64 \
  -DANDROID_PLATFORM=android-28 \
  -DANDROID_STL=c++_shared \
  -DCMAKE_BUILD_TYPE=Release \
  -DPROTOC_EXECUTABLE=/path/to/matching/host/protoc
cmake --build build/android --target subspace_jni subspace_java subspace_java_test

Soong/Blueprint in AOSP:

bash
m external.subspace-libsubspace_client-soong \
  external.subspace-libsubspace_jni-soong \
  external.subspace-subspace-java-soong \
  external.subspace-subspace_java_client_test-soong

References

  • C++ API: client/client.h
  • Python examples: client/python/client_test.py
  • Rust guide: docs/rust-client.md
  • Java API: android/java/com/subspace/*.java
  • Android build/run details: docs/android.md
  • Platform build skill: .cursor/skills/subspace-builds/SKILL.md

© dallison, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/subspace-clients of dallison/subspace.

Open the folder on GitHubat commit 0998ce5

Compare with similar skills

Subspace Clients next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Subspace Clients compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Subspace Clients this skilldallison/subspace104—~2.4kAutomated safety check: PassApache-2.0
Doca Flow Grpc ServerNVIDIA/skills3.5k—~4.2kAutomated safety check: PassApache-2.0
Rsid SDKrealsenseai/RealSenseID122—~4.1kAutomated safety check: PassApache-2.0
Developing Softwaretelagod/code-abyss243—~410Automated safety check: PassMIT
Databricks Zerobus Ingestdatabricks/databricks-agent-skills345—~3.1kAutomated safety check: PassCustom licence
Fory Version Bumpapache/fory4.6k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    PLAINTEXT-ONLY: the shipped docaflowgrpc server uses grpc::InsecureServerCredentials() with NO TLS / mTLS / token-auth knob on the binary — transport security must come from external infrastructure…

    3.5k GitHub stars~4.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Rsid SDK

    realsenseai/RealSenseID

    RealSenseID face authentication SDK reference. An agent skill from realsenseai/RealSenseID.

    122 GitHub stars~4.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Developing Software

    telagod/code-abyss

    Software development knowledge reference covering Python, Go, Rust, TypeScript, Java, C++, and Shell.

    243 GitHub stars~410 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Databricks Zerobus Ingest

    databricks/databricks-agent-skills

    Official

    Build Zerobus Ingest clients for near real-time data ingestion into Databricks Delta tables via gRPC.

    345 GitHub stars~3.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.

    4.6k GitHub stars~1.1k tokensUpdated yesterday
    MobileAuto-check passed
  • Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).

    4.6k GitHub stars~2.2k tokensUpdated yesterday
    MobileAuto-check passed

More from dallison/subspace

  • Subspace Builds

    dallison/subspace

    Build and test Subspace across supported platforms and build systems.

    104 GitHub stars~990 tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Subspace Clients

What does Subspace Clients do?

Write Subspace clients in C++, Python, Rust, or Java. An agent skill from dallison/subspace. Subspace Clients is an agent skill from dallison/subspace. Write Subspace clients in C++, Python, Rust, or Java.

When should I use Subspace Clients?

Subspace Clients fits situations like: the user asks how to connect to Subspace; create publishers; publish messages; build language client libraries with Bazel.

How do I install Subspace Clients in Claude Code?

Run `npx skills add dallison/subspace --skill subspace-clients -a claude-code`. Or copy the skill folder (.cursor/skills/subspace-clients in dallison/subspace) into .claude/skills/subspace-clients in your project. Claude Code loads it when a task matches its description.

How do I install Subspace Clients in Codex?

Run `npx skills add dallison/subspace --skill subspace-clients -a codex`. Or copy the skill folder (.cursor/skills/subspace-clients in dallison/subspace) into .agents/skills/subspace-clients in your project. Codex loads it when a task matches its description.

Can I use Subspace Clients in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dallison/subspace --skill subspace-clients -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/subspace-clients, .gemini/skills/subspace-clients, .github/skills/subspace-clients and .opencode/skills/subspace-clients in your project.

What does Subspace Clients need to run?

Going by SKILL.md and its folder, Subspace Clients needs the command-line tools its instructions call (cmake, bazel and cargo). Our summary lists: Python 3.

Does Subspace Clients access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Subspace Clients safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Subspace Clients use?

Subspace Clients is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Subspace Clients use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Subspace Clients?

Skills that share tags, products or a category with Subspace Clients: Doca Flow Grpc Server (NVIDIA/skills, 3.5k stars), Rsid SDK (realsenseai/RealSenseID, 122 stars), Developing Software (telagod/code-abyss, 243 stars) and Databricks Zerobus Ingest (databricks/databricks-agent-skills, 345 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Subspace Clients?

dallison (a GitHub user) maintains it in dallison/subspace, which has 104 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: dallison/subspace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.