Ak Dev New Queue Transport
yaalalabs/agent-kernel
Step-by-step guide for adding a new queue transport to Agent Kernel's execution pipeline.
Write tests for the bocpy message queue — the lock-free tag-based MPSC ring buffer.
$ npx skills add microsoft/bocpy --skill testing-message-queue -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/bocpy testing-message-queue --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/testing-message-queue .claude/skills/testing-message-queue && rm -rf skills-srcUse ~/.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/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .claude/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queueType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/bocpy --skill testing-message-queue -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/bocpy testing-message-queue --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/testing-message-queue .agents/skills/testing-message-queue && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .agents/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/bocpy --skill testing-message-queue -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/bocpy testing-message-queue --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/testing-message-queue .cursor/skills/testing-message-queue && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .cursor/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/bocpy.git --path .github/skills/testing-message-queue--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/bocpy --skill testing-message-queue -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/bocpy testing-message-queue --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/testing-message-queue .gemini/skills/testing-message-queue && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .gemini/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/bocpy testing-message-queueInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/bocpy --skill testing-message-queue -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/testing-message-queue .github/skills/testing-message-queue && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .github/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/bocpy --skill testing-message-queue -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/bocpy testing-message-queue --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/bocpy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/testing-message-queue .opencode/skills/testing-message-queue && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "testing-message-queue" agent skill from https://github.com/microsoft/bocpy/tree/main/.github/skills/testing-message-queue into .opencode/skills/testing-message-queue/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-message-queue", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
testing-message-queueWrite tests for the bocpy message queue — the lock-free tag-based MPSC ring buffer.
Testing Message Queue is an agent skill from microsoft/bocpy, published by the product's own GitHub organization. Write tests for the bocpy message queue — the lock-free tag-based MPSC ring buffer. Use when: testing send/receive, FIFO ordering, selective receive, timeouts, cross-thread messaging, multi-producer scenarios, tag capacity limits, settags behavior, or payload round-trip fidelity.
Its SKILL.md is about 2.3k 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, covering Event-driven systems and Test generation. The repository describes itself as: Behavior-Oriented Concurrency in Python. The licence is MIT.
Read from SKILL.md and the folder at commit c8f3ceb. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Testing Message Queue loads about 2.3k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 685 words of instructions outside code blocks.
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.
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.
The full file from microsoft/bocpy at commit c8f3ceb, republished under its MIT licence (© microsoft). 685 words, ~2,284 tokens.
.claude/skills/testing-message-queue/SKILL.md (or your agent's skills folder).This skill describes how to write tests for the bocpy message queue — the
lock-free, tag-based MPSC ring buffer implemented in C that underlies
send()/receive().
| Component | Detail |
|---|---|
| Queues | 16 statically allocated ring buffers (BOC_QUEUE_COUNT = 16), each with capacity 16 384. |
| Tags | String labels that map 1:1 to queues. Each unique tag occupies one queue slot. |
| Assignment modes | Automatic (default): tags claim a queue on first send/receive. Explicit: set_tags() pre-assigns tags, clears all messages, and resets queues. |
set_tags([]) | Drains every queue, frees all tag associations, and sets all queues to UNASSIGNED — effectively restoring auto-assign mode. |
| Thread safety | Enqueue is lock-free (atomic CAS on tail). Multiple threads can send to the same tag concurrently. receive spins on the queue with a sleep until a message is available or a timeout elapses. |
Message queue tests live in test/test_message_queue.py.
Every test must start with a clean slate. Use an autouse fixture that calls
set_tags([]) before and after each test. This drains all queues and returns
them to auto-assign mode — no set_tags call is needed inside individual tests
unless the test is specifically exercising set_tags behavior.
MAX_QUEUES = 16
@pytest.fixture(autouse=True)
def reset_queues():
set_tags([])
yield
set_tags([])set_tags([]) instead of set_tags([...16 tags...])?Calling set_tags is optional. The system auto-assigns tags to queues on
first use. The purpose of the fixture is to clear stale state, not to
pre-allocate tags. Using set_tags([]) resets all 16 queues to UNASSIGNED so
every test starts fresh, and most tests can exercise the auto-assignment path
naturally.
The simplest test: send a message, receive it, assert on the result. No
set_tags needed — the tag auto-assigns.
def test_basic():
send("my_tag", "hello")
tag, val = receive("my_tag", 1)
assert tag == "my_tag"
assert val == "hello"Always pass a timeout to receive so tests fail fast rather than hanging.
Messages on the same tag are delivered in FIFO order. Send a sequence, then receive and compare element-by-element.
def test_fifo():
for i in range(10):
send("fifo", i)
for i in range(10):
_, val = receive("fifo", 1)
assert val == ireceive accepts a list or tuple of tags and returns the first available match.
Messages on non-matching tags remain in their queues.
def test_selective():
send("skip", "no")
send("want", "yes")
_, val = receive("want", 1)
assert val == "yes"
# "skip" message is still there
_, val = receive("skip", 1)
assert val == "no"
def test_multi_tag_receive():
send("b", "found")
tag, val = receive(["a", "b", "c"], 1)
assert tag == "b"
assert val == "found"| Timeout value | Behavior |
|---|---|
0 | Return immediately — delivers a queued message or (TIMEOUT, None). |
| Positive float | Wait up to that many seconds. |
| Negative (default) | Block indefinitely until a message arrives. |
The optional after callback fires only on timeout and replaces the default
(TIMEOUT, None) return value.
def test_zero_timeout():
tag, val = receive("empty", 0)
assert tag == TIMEOUT
assert val is None
def test_after_callback():
tag, val = receive("miss", 0.05, lambda: ("fallback", 99))
assert tag == "fallback"
assert val == 99
def test_after_not_called_on_success():
called = []
send("ok", "payload")
tag, val = receive(
"ok", 1,
lambda: (called.append(True), ("fb", -1))[-1],
)
assert tag == "ok"
assert called == []send and receive are thread-safe. Use threading.Thread to test
cross-thread delivery.
def test_cross_thread():
def sender():
send("ct", "from_thread")
t = threading.Thread(target=sender)
t.start()
tag, val = receive("ct", 5)
t.join()
assert tag == "ct"
assert val == "from_thread"
def test_bidirectional():
def echo():
_, val = receive("ping", 5)
send("pong", val * 2)
t = threading.Thread(target=echo)
t.start()
send("ping", 21)
_, val = receive("pong", 5)
t.join()
assert val == 42Multiple threads sending to the same tag exercises the lock-free MPSC enqueue. Collect all messages and verify completeness. Per-producer FIFO ordering is guaranteed (messages from a single thread arrive in send order).
def test_multi_producer():
n_producers = 8
msgs_per = 200
def producer(pid):
for i in range(msgs_per):
send("mp", (pid, i))
threads = [threading.Thread(target=producer, args=(p,))
for p in range(n_producers)]
for t in threads:
t.start()
received = []
for _ in range(n_producers * msgs_per):
_, val = receive("mp", 10)
received.append(val)
for t in threads:
t.join()
# Every (pid, seq) pair delivered exactly once
assert sorted(received) == sorted(
(p, i) for p in range(n_producers) for i in range(msgs_per)
)There are exactly 16 queue slots. Exceeding them raises KeyError.
def test_capacity_exceeded():
for i in range(MAX_QUEUES):
send(f"tag{i}", "fill")
with pytest.raises(KeyError, match="tag capacity exceeded"):
send("one_too_many", "boom")set_tags ExplicitlyUse set_tags tests to verify pre-assignment, clearing, overflow, and reset
behavior. These tests call set_tags directly inside the test body.
def test_set_tags_clears():
send("old", "stale")
set_tags(["new"])
# Old messages are gone; "new" starts empty.
tag, val = receive("new", 0)
assert tag == TIMEOUT
def test_set_tags_resets_to_auto():
set_tags(["pre"])
send("pre", "msg")
set_tags([]) # back to auto-assign
send("fresh", "works")
tag, val = receive("fresh", 1)
assert val == "works"
def test_set_tags_overflow():
set_tags([f"t{i}" for i in range(MAX_QUEUES)])
with pytest.raises(KeyError, match="tag capacity exceeded"):
send("extra", "x")
def test_set_tags_rejects_too_many():
with pytest.raises(IndexError):
set_tags([f"t{i}" for i in range(MAX_QUEUES + 1)])Messages cross interpreter boundaries via cross-interpreter data (XIData) or
pickle. Use @pytest.mark.parametrize to sweep payload types.
@pytest.mark.parametrize("payload", [
0, -1, 2**31, 3.14, float("inf"),
True, False, None,
"", "hello",
(), (1,), (1, (2, (3,))),
])
def test_roundtrip(payload):
send("rt", payload)
_, val = receive("rt", 1)
assert val == payload| Error | How to trigger | Expected exception |
|---|---|---|
Non-string tag in send | send(123, "x") | TypeError |
Empty tag list in receive | receive([], 0) | RuntimeError |
| Non-string in tag list | receive([123], 0) | TypeError |
| Tag capacity exceeded | send on 17th unique tag | KeyError |
Too many tags in set_tags | set_tags([...17 items...]) | IndexError |
Non-str in set_tags | set_tags([123]) | TypeError |
Non-sequence in set_tags | set_tags(42) | TypeError |
| Pitfall | Fix |
|---|---|
Calling receive without a timeout | Tests hang forever if no message arrives. Always pass a timeout. |
| Using too many unique tags across tests | Each unique tag consumes a queue slot. The fixture must reset queues between tests via set_tags([]). |
| Forgetting the fixture resets queues | Without the autouse fixture, stale messages or tag assignments leak between tests, causing flaky failures. |
Assuming set_tags is required | It isn't. Tags auto-assign on first use. Only call set_tags when you need to pre-assign or clear queues. |
| Not joining threads before asserting | A thread may still hold the GIL or be mid-send. Always t.join() before final assertions. |
| Sending from more threads than queue capacity | If threads use distinct tags, you'll hit the 16-queue limit. Have concurrent threads share a single tag. |
© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .github/skills/testing-message-queue of microsoft/bocpy.
Open the folder on GitHubat commit c8f3ceb
Testing Message Queue 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Testing Message Queue this skillmicrosoft/bocpy | 200 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Ak Dev New Queue Transportyaalalabs/agent-kernel | 191 | — | ~2.7k | Automated safety check: Pass | Apache-2.0 | |
| Stripe Projectsfossasia/eventyay | 1.7k | 5 repos | ~2k | Automated safety check: Notes | Apache-2.0 | |
| MQTTX CLIemqx/MQTTX | 5.1k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| AWS Serverless Edazxkane/aws-skills | 367 | 4 repos | ~3.2k | Automated safety check: Pass | MIT | |
| Windmill Trigger Type Checklistwindmill-labs/windmill | 18k | — | ~4.7k | Automated safety check: Pass | Custom licence |
yaalalabs/agent-kernel
Step-by-step guide for adding a new queue transport to Agent Kernel's execution pipeline.
fossasia/eventyay
A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.
emqx/MQTTX
Operates the `mqttx` command line client to connect, publish, subscribe, benchmark and simulate data against an MQTT broker, with TLS and MQTT 5 support.
zxkane/aws-skills
AWS serverless and event-driven architecture expert based on Well-Architected Framework.
windmill-labs/windmill
Checklist of every backend, frontend, CLI and capture change needed to add a new TriggerCrud-based trigger type, such as Azure, GCP or Kafka, to Windmill.
FoundatioFx/Foundatio
A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.
microsoft/bocpy
Multi-perspective code review for a branch before merging. An agent skill from microsoft/bocpy.
microsoft/bocpy
Write a C extension whose custom types can live inside a bocpy Cown and travel between worker sub-interpreters.
microsoft/bocpy
Follow bocpy commenting and documentation conventions. An agent skill from microsoft/bocpy.
microsoft/bocpy
Finalize a feature branch for merge. An agent skill from microsoft/bocpy.
microsoft/bocpy
Multi-perspective planning with rebuttal rounds and adversarial review loop.
microsoft/bocpy
Think in Behavior-Oriented Concurrency, not threads-and-locks.
Categories
Write tests for the bocpy message queue — the lock-free tag-based MPSC ring buffer. Testing Message Queue is an agent skill from microsoft/bocpy, published by the product's own GitHub organization. Write tests for the bocpy message queue — the lock-free tag-based MPSC ring buffer.
Testing Message Queue fits situations like: : testing send/receive; selective receive; cross-thread messaging; multi-producer scenarios.
Run `npx skills add microsoft/bocpy --skill testing-message-queue -a claude-code`. Or copy the skill folder (.github/skills/testing-message-queue in microsoft/bocpy) into .claude/skills/testing-message-queue in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/bocpy --skill testing-message-queue -a codex`. Or copy the skill folder (.github/skills/testing-message-queue in microsoft/bocpy) into .agents/skills/testing-message-queue in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/bocpy --skill testing-message-queue -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-message-queue, .gemini/skills/testing-message-queue, .github/skills/testing-message-queue and .opencode/skills/testing-message-queue in your project.
SKILL.md names no scripts, command-line tools or credentials: Testing Message Queue is instructions for the agent only. Our summary lists: Python 3.
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.
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.
Testing Message Queue is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Testing Message Queue: Ak Dev New Queue Transport (yaalalabs/agent-kernel, 191 stars), Stripe Projects (fossasia/eventyay, 1.7k stars), MQTTX CLI (emqx/MQTTX, 5.1k stars) and AWS Serverless Eda (zxkane/aws-skills, 367 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/bocpy, which has 200 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 28, 2026.
Source: microsoft/bocpy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.