supermux-core

supermux-core is a skill for Claude Code, Codex from UstaLabs/supermux. It costs 46 tokens per session (4,310 once invoked), scanned A, original, MIT.

A TypeScript library for running several coding-agent command-line programs through one interface. TypeScript is a programming language; the library also provides a common stream of events, permission handling, questions, and host-defined tools.

In plain words
What is it for?
It is for building TypeScript apps, scripts, bots, and services that send messages to Claude Code, Codex, Cursor, OpenCode, Grok Build, or Antigravity and handle their responses and requests.
Why use it?
It removes the need to write separate process-control code for each supported coding agent. It also lets an agent session continue behind a keeper process and be reattached later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Good fit It is for building TypeScript apps, scripts, bots, and services that send messages to Claude Code, Codex, Cursor, OpenCode, Grok Build, or Antigravity and handle their responses and requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ustalabs/supermux/supermux-core
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add UstaLabs/supermux --skill supermux-core
Clone the repo
git clone --depth 1 https://github.com/UstaLabs/supermux

Made for: Claude Code, Codex.

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 supermux-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/ustalabs/supermux/supermux-core/github.svg)](https://agentmods.dev/skills/ustalabs/supermux/supermux-core)
Your own site
<a href="https://agentmods.dev/skills/ustalabs/supermux/supermux-core"><img src="https://agentmods.dev/badge/skills/ustalabs/supermux/supermux-core/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 supermux-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/ustalabs/supermux/supermux-core"><img src="https://agentmods.dev/badge/skills/ustalabs/supermux/supermux-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,310 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.
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.00046 $0.04310
Opus 5.5 $0.00018 $0.01724
Sonnet 5.5 $0.00009 $0.00862
Haiku 4.5 $0.00005 $0.00431

Measured 4d ago against content hash 891e7397f1d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

supermux-core 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 4d 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.

packages/supermux-core/skills/supermux-core/SKILL.md · 206 lines

How it starts

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

Building with @supermux/core

@supermux/core runs coding-agent CLIs as sessions behind one TypeScript API: you send messages, read one normalized event stream, answer the agents' permission prompts and questions, and give them tools that are functions in your process. Each agent runs behind a small keeper process, so it can outlive your process and be re-attached.

Install

npm i @supermux/core
npm i zod     # only to write host tools (zod 4)
  • Node 22 or newer (22.18+ to run a .ts file directly, as the examples do), or Bun; ESM only. Node runs a .ts file as it is only when its TypeScript is erasable (no enum, no namespace, import type for types).
  • The CLI of each agent you use, installed and logged in: claude, codex, cursor-agent, opencode, grok, agy. The library runs them with the user's own login and never logs in for you.
  • TypeScript: "module" and "moduleResolution" set to "NodeNext", @types/node 22.

A first program

One turn on Claude Code and one on Codex: it prints the replies, allows each permission once and declines each question. Run it from a project folder, not your home folder: its state directory is under ~, and supermux() refuses a working directory that contains the state directory (invalid_workdir).

import { randomUUID } from "node:crypto"
import { homedir } from "node:os"
import { join } from "node:path"
import { supermux } from "@supermux/core"

// The agents by name, each with its defaults: its CLI's own asking mode, so its prompts come here.
// The state directory holds the session records and the keepers: a folder of its own, outside the folders agents work in.
const core = supermux({ stateDirectory: join(homedir(), ".supermux-demo"), agents: { claude: {}, codex: {} } })

// One observer sees the events of every session. Nothing is stored: keep what you need.
core.subscribe(event => {
  if (event.type !== "session.event") return
  const body = event.event
  if (body.kind === "assistant-message") console.log(`${body.agent}: ${body.text}`)
  // A request waits until it is answered: never leave one pending.
  const session = core.sessions.live(event.sessionId)
  if (body.kind === "permission-request") {
    const allow = body.options.find(option => option.kind === "allow_once")
    if (allow) session?.requests.respond(body.requestId, { optionId: allow.id }).catch(console.error)
    else session?.interrupt({ pending: "discard" }).catch(console.error)
  }
  if (body.kind === "user-question" && body.blocking) {
    session?.requests.respond(body.requestId, { decline: true }).catch(console.error)
  }
})

for (const agent of ["claude", "codex"]) {
  const session = await core.sessions.create({ id: randomUUID(), agent, cwd: process.cwd() })
  const receipt = await session.send({ content: [{ type: "text", text: "List the files here." }], whenBusy: "queue" })
  const completion = await receipt.completed // status "completed", "cancelled" or "failed" (with error)
  console.log(`${agent}: ${completion.status}`)
}

// Stops every agent: without it they keep running behind their keepers after this process ends.
await core.close({ agents: "shutdown" })
// expect-stdout: ^claude: completed$
// expect-stdout: ^codex: completed$

Read the full file on GitHub · 206 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 206 lines · 46 tokens per session scan A 891e7397f1d2

Subscribe to this mod's changes

supermux-core is a skill published in the GitHub repository UstaLabs/supermux (26 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 4,310 once invoked, about $0.0002 per session on Opus 5.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-10-21.

Related

Other skills, from other repositories

architecture-audit

Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…

org2AI/ORG2 · 70 tokens

review-deep

Drive the deep-review phase of an automated PR review. Consumes the walkthrough, runs the deterministic deep-review workflow (parallel lenses → adversarial validation → code-enforced threshold/caps), drafts the surviving findings, and completes the review run.

ShreyPaharia/octomux · 52 tokens

review-orchestrator

Drive an automated PR review. Produces a structured walkthrough plus inline draft comments via the octomux review CLI. NEVER posts to GitHub directly — publishing is human-gated.

ShreyPaharia/octomux · 41 tokens

review-pr

Use when reviewing a pull request, posting PR review comments, or when user says /review-pr. Reviews code with parallel agents and posts a pending GitHub review with inline comments.

ShreyPaharia/octomux · 39 tokens

review-walkthrough

Drive the walkthrough phase of an automated PR review. Produces a structured walkthrough JSON only — no inline comment drafts. The deep-review agent is attached automatically by the server after this agent finishes.

ShreyPaharia/octomux · 43 tokens

create-pr

Use when creating a pull request, opening a PR, or pushing and creating a PR for an octomux task.

ShreyPaharia/octomux · 26 tokens