orkid: Skill for Claude Code

.claude/skills/orklev2-portaudio/SKILL.md

orklev2-portaudio is a skill for Claude Code from tweakoz/orkid. It costs 63 tokens per session (686 once invoked), scanned A, original, MIT.

A reference for orkid's PortAudio backend, which connects the application to audio devices on different operating systems. It explains callback-based audio input and output and how the Singularity synthesizer processes sound.

In plain words
What is it for?
Use it when working on PortAudio device setup, audio callbacks, input or output buffers, CPU-load tracking, or the connection to the synthesizer.
Why use it?
It gives developers the project-specific details needed to understand device selection, sample conversion, and audio processing without tracing the backend from scratch.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is tweakoz/orkid's own configuration. It tells Claude Code how to work on orkid itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything orkid configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tweakoz/orkid. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tweakoz/orkid/develop/.claude/skills/orklev2-portaudio/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tweakoz/orkid

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for orklev2-portaudio

README.md
[![agentmods](https://agentmods.dev/badge/skills/tweakoz/orkid/orklev2-portaudio/github.svg)](https://agentmods.dev/skills/tweakoz/orkid/orklev2-portaudio)
Your own site
<a href="https://agentmods.dev/skills/tweakoz/orkid/orklev2-portaudio"><img src="https://agentmods.dev/badge/skills/tweakoz/orkid/orklev2-portaudio/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for orklev2-portaudio

Your own site · 80×15
<a href="https://agentmods.dev/skills/tweakoz/orkid/orklev2-portaudio"><img src="https://agentmods.dev/badge/skills/tweakoz/orkid/orklev2-portaudio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 686 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.00686
Opus 5 $0.00032 $0.00343
Sonnet 5 $0.00013 $0.00137
Haiku 4.5 $0.00006 $0.00069

Measured 7d ago against content hash a3d7497db6c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

orklev2-portaudio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/orklev2-portaudio/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Orkid PortAudio Backend Reference

When answering questions about the PortAudio audio backend in orkid, consult the files below. All under ork.lev2/.

Key Files

Component File
AudioDevice Base inc/ork/lev2/aud/audiodevice.h
AudioDevicePa src/aud/portaudio/audiodevice_pa.h
Implementation src/aud/portaudio/audiodevice_pa.cpp
Config Flags inc/ork/lev2/config.h (ENABLE_PORTAUDIO)

Architecture

Single-callback model — PortAudio calls patestCallback() on its audio thread:

PortAudio Thread (patestCallback)
  ├─ Input: int16_t* → convert to float → AudioInputChunk → _input_handler
  ├─ synth->compute(numframes, inputbuffer)
  └─ Output: synth->_obuf._leftBuffer/_rightBuffer → interleave → float* output

AudioDevicePa

  • _the_synth — Singularity synth instance
  • PaImpl._stream — PortAudio stream handle
  • PaImpl._input_override / _output_override — device index overrides
  • PaImpl._actual_input_channels — resolved channel count

Callback (patestCallback)

Input Processing:

  1. Check _input_handler callback
  2. Convert int16 → float, handle stereo→mono mixing
  3. Call handler with AudioInputChunk

Output Processing:

  1. synth->compute(framesPerBuffer, inputbuffer)
  2. Read synth->_obuf._leftBuffer / _rightBuffer
  3. Interleave to float output buffer
  4. Track CPU load: Pa_GetStreamCpuLoad()

Configuration

Parameter Value
Input Format int16_t (paInt16)
Output Format float (paFloat32)
Sample Rate From getSampleRate()
Frames/Buffer 128 (macOS), 256 (Linux)

Device Selection

  • Resolves 4-char base36 short IDs to full device names
  • Enumerates all PortAudio devices via Pa_GetDeviceCount()
  • Matches by name and channel requirements
  • Pa_OpenStream() with selected devices → Pa_StartStream()

Platform Notes

  • macOS: Default backend when CoreAudio not selected; 128 frame buffer for lower latency
  • Linux: Available alongside ALSA and PipeWire; 256 frame buffer

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 77 lines · 63 tokens per session scan A a3d7497db6c8

Subscribe to this mod's changes

orklev2-portaudio is a skill published in the GitHub repository tweakoz/orkid (35 stars, last pushed 27d ago), licensed MIT. It adds 63 tokens to every session and 686 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

evaluating-cosmos-policy

Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments. Use when setting up cosmos-policy for robot manipulation evaluation, running headless GPU evaluations with EGL rendering, or profiling inference latency on cluster or local GPU machines.

Orchestra-Research/AI-Research-SKILLs · 51 tokens

kernel-dev

A development tool for building Linux kernels and kernel modules, which are add-on pieces of kernel code such as drivers. It installs dependencies and supports RPM-based systems, including Alibaba Cloud Linux, on Intel/AMD and ARM 64-bit machines.

alibaba/anolisa · 112 tokens

c-speakers

Control Sonos speakers using the sonos CLI (sonoscli). Play, pause, adjust volume, manage groups, and play favorites across rooms and speaker zones.

daxaur/openpaw · 39 tokens

c-bluetooth

Manage Bluetooth devices on macOS using the blucli (blu) CLI. List paired and available devices, connect to headphones/speakers/keyboards, and disconnect devices by name or MAC address.

daxaur/openpaw · 44 tokens

linux-phone-porting

Use for every hardware bring-up or debug session that ports mainline Linux to a phone (Android handset). Requires an already-unlocked bootloader; locked devices are out of scope.

angelwzr/linux-phone-porting · 41 tokens

apollo-onboarding

Plans and configures a Universal Audio Apollo rig end to end through the uad-console-mcp MCP server, covering the interview questions to ask, which physical input suits which source, the clock master decision for ADAT expanders and other digital gear, ADAT sample-rate and channel-count limits, multi-Apollo Thunderbolt…

fomoPhil/uad-console-mcp · 183 tokens