Agent skill

cmux Swift Package Architecture

by manaflow-ai in manaflow-ai/cmux

Architecture rules for cmux's move to Swift Packages: acyclic whole-domain packages, minimal public API, group folders, Xcode project wiring and Swift 6 concurrency.

Custom licenceAuto-check passedDevelopment

Install cmux Swift Package Architecture

skills CLI
$ npx skills add manaflow-ai/cmux --skill cmux-architecture -a claude-code

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

GitHub CLI
$ gh skill install manaflow-ai/cmux cmux-architecture --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/manaflow-ai/cmux.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cmux-architecture .claude/skills/cmux-architecture && 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
cmux-architecture
GitHub stars
28k
Used in
1 other repo
Token cost
~4.2k tokens
SKILL.md length
2,101 words
Files
6 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
Custom licence

At a glance

Architecture rules for cmux's move to Swift Packages: acyclic whole-domain packages, minimal public API, group folders, Xcode project wiring and Swift 6 concurrency.

  • Works in 5 steps: Core (CmuxCore): pure Sendable values,… → Services / infrastructure: actors… → Domain / state: @MainActor @Observable… → …
  • Adding a new Swift package to the cmux repository
  • SKILL.md covers Package architecture, Layers, File organization and Documentation, plus 4 more sections
  • Calls python3, swift and git

What it does

cmux is migrating from a single app target into Swift Packages under a Packages directory, and each new package must be ergonomic, acyclic and whole-domain. That means internal access by default with public only for what consumers use, a strict dependency graph checked again for every new edge, and one package owning a full domain such as settings, appearance, workspace, terminal, browser or command palette. When unsure, the guidance is to extract leaf-first, starting with packages that have no internal dependencies.

Packages live in exactly one of three group folders, Shared, iOS or macOS, and the workspace file mirrors that structure. The folder is the source of truth: to move a package the agent uses git mv and then runs a Python script with its write flag, never hand-editing workspace groups, and CI fails on drift. Wiring a package into the Xcode project needs pbxproj entries in both the app and test targets. Existing packages predate the policy and should not be used as design references.

The description also lists refactor layering, dependency inversion, file organization, DocC documentation, testability and Swift 6 concurrency rules, with reference files on concurrency carve-outs, file API discipline, package boundaries and Swift 6 compatibility.

When your agent uses it

  • Adding a new Swift package to the cmux repository
  • Rewriting or moving Swift files, coordinators, services or repositories
  • Deciding what a package should expose publicly
  • Moving a package between the Shared, iOS and macOS groups

Example prompts

  • “Extract the command palette code into its own Swift package and wire it into the Xcode project.”
  • “Move the appearance package from iOS to Shared and update the workspace groups.”
  • “Review this new package for dependency cycles and unnecessary public API.”

Requirements

  • Swift and Xcode
  • Python 3, for the workspace group check script

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Core (CmuxCore): pure Sendable values, IDs, DTOs, errors, shared protocol seams. No AppKit/SwiftUI/I/O. The lift target when two domains…
  2. Services / infrastructure: actors implementing core protocols against the outside world (process/PTY, filesystem, sockets, web API…
  3. Domain / state: @MainActor @Observable models plus Coordinators, one package per feature domain, owning that domain's mutable state…
  4. UI: SwiftUI/AppKit views, one UI package per domain package, depending only on its domain package plus Core, never a Service directly…
  5. Executable (cmuxApp / AppDelegate): thin composition shim, no business logic.

What it can do on your machine

Read from SKILL.md and the folder at commit 1e82fa4. 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:

    • python3
    • swift
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

cmux Swift Package Architecture loads about 4.2k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 2,101 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~4.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 2,101 words (~4,245 tokens).

“cmux is migrating from a single app target into Swift Packages under Packages/. Every new package must be:”

— opening of SKILL.md by manaflow-ai, Custom licence
name
cmux-architecture

Read the full SKILL.md on GitHub

Files

SKILL.md and 5 other files (references) in skills/cmux-architecture of manaflow-ai/cmux.

  • SKILL.md
  • agents/openai.yaml
  • references/concurrency-carveouts.md
  • references/file-api-discipline.md
  • references/package-boundaries.md
  • references/swift-6-0-compatibility.md

Open the folder on GitHubat commit 1e82fa4

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in manaflow-ai/cmux, which our catalogue first saw on October 7, 2026.

Compare with similar skills

cmux Swift Package Architecture 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.

cmux Swift Package Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
cmux Swift Package Architecture this skillmanaflow-ai/cmux28k1 repos~4.2kAutomated safety check: PassCustom licence
Swift Concurrencyjamesrochabrun/skills216—~1.9kAutomated safety check: PassMIT
Swift Concurrencysupabitapp/supaterm172—~3.3kAutomated safety check: PassCustom licence
Py Rigmudrii/hermesd118—~6.3kAutomated safety check: PassMIT
Swift ConcurrencyAFK-surf/OpenBridge430—~2.8kAutomated safety check: PassMIT
Architecture Reviewassafkip/kipi-system112—~817Automated safety check: PassMIT

Similar skills

  • Swift Concurrency

    jamesrochabrun/skills

    Guide for building, auditing, and refactoring Swift code using modern concurrency patterns (Swift 6+).

    216 GitHub stars~1.9k tokensUpdated 9 mo ago
    DevelopmentAuto-check passed
  • Swift Concurrency

    supabitapp/supaterm

    Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration.

    172 GitHub stars~3.3k tokensUpdated 17 days ago
    DevelopmentAuto-check passed
  • Py Rig

    mudrii/hermesd

    A skill your agent uses when building, reviewing, or refactoring Python code that requires strong maintainability discipline: SRP, DRY, OCP, explicit dependency injection, TDD/ATDD workflow, strict…

    118 GitHub stars~6.3k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Swift Concurrency

    AFK-surf/OpenBridge

    Expert guidance on Swift Concurrency best practices, patterns, and implementation.

    430 GitHub stars~2.8k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Architecture Review

    assafkip/kipi-system

    Surfaces architectural friction in real code — shallow modules, tight coupling, untested seams — and proposes deepening refactors using Ousterhout's deep-module principle (small interface hiding a…

    112 GitHub stars~817 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Swift Concurrency

    henrypldev/react-native-nitro-mlx

    Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or…

    100 GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed

More from manaflow-ai/cmux

All 22 skills in this repo
  • cmux Diagnostics

    manaflow-ai/cmux

    Runs a read-only health check for cmux and explains what it finds, covering the CLI and socket, settings, agent hooks, session restore and notifications.

    28k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • cmux Settings Editor

    manaflow-ai/cmux

    Reads and changes cmux preferences in `~/.config/cmux/cmux.json` through a helper that validates each change before writing, covering terminal, browser, viewers and shortcuts.

    28k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • cmux Backend Rules

    manaflow-ai/cmux

    Sets the backend TypeScript and Cloud VM rules for cmux: Effect-based services, thin route handlers, Postgres as source of truth, migrations and provider secrets.

    28k GitHub starsUsed in 1 repo~682 tokens
    Auto-check passed
  • Cmux Debugging Guide

    manaflow-ai/cmux

    Covers debug logging, the Debug menu, profiling rules and runtime pitfalls for working on the cmux macOS terminal app.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Workflow rules for the Ghostty submodule in cmux: rebuilding GhosttyKit.xcframework, pushing fork changes and updating the parent submodule pointer safely.

    28k GitHub starsUsed in 1 repo~580 tokens
    Auto-check passed
  • Cmux Release Workflow

    manaflow-ai/cmux

    Runs the cmux release process: gathers per-PR changelog lines since the last tag, bumps the version, guards against a bad tag, then tags and pushes the macOS DMG release.

    28k GitHub starsUsed in 1 repo~856 tokens
    Auto-check passed

Works with

Questions about cmux Swift Package Architecture

What does cmux Swift Package Architecture do?

Architecture rules for cmux's move to Swift Packages: acyclic whole-domain packages, minimal public API, group folders, Xcode project wiring and Swift 6 concurrency. cmux is migrating from a single app target into Swift Packages under a Packages directory, and each new package must be ergonomic, acyclic and whole-domain. That means internal access by default with public only for what consumers use, a strict dependency graph checked again for every new edge, and one package owning a full domain such as settings, appearance, workspace, terminal, browser or command palette.

When should I use cmux Swift Package Architecture?

cmux Swift Package Architecture fits situations like: adding a new Swift package to the cmux repository; rewriting or moving Swift files, coordinators, services or repositories; deciding what a package should expose publicly; moving a package between the Shared, iOS and macOS groups.

How do I install cmux Swift Package Architecture in Claude Code?

Run `npx skills add manaflow-ai/cmux --skill cmux-architecture -a claude-code`. Or copy the skill folder (skills/cmux-architecture in manaflow-ai/cmux) into .claude/skills/cmux-architecture in your project. Claude Code loads it when a task matches its description.

How do I install cmux Swift Package Architecture in Codex?

Run `npx skills add manaflow-ai/cmux --skill cmux-architecture -a codex`. Or copy the skill folder (skills/cmux-architecture in manaflow-ai/cmux) into .agents/skills/cmux-architecture in your project. Codex loads it when a task matches its description.

Can I use cmux Swift Package Architecture 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 manaflow-ai/cmux --skill cmux-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cmux-architecture, .gemini/skills/cmux-architecture, .github/skills/cmux-architecture and .opencode/skills/cmux-architecture in your project.

What does cmux Swift Package Architecture need to run?

Going by SKILL.md and its folder, cmux Swift Package Architecture needs the command-line tools its instructions call (python3, swift and git). Our summary lists: Swift and Xcode; Python 3, for the workspace group check script.

Does cmux Swift Package Architecture access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is cmux Swift Package Architecture 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 cmux Swift Package Architecture use?

cmux Swift Package Architecture has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does cmux Swift Package Architecture use?

About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to cmux Swift Package Architecture?

Skills that share tags, products or a category with cmux Swift Package Architecture: Swift Concurrency (jamesrochabrun/skills, 216 stars), Swift Concurrency (supabitapp/supaterm, 172 stars), Py Rig (mudrii/hermesd, 118 stars) and Swift Concurrency (AFK-surf/OpenBridge, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains cmux Swift Package Architecture?

manaflow-ai (a GitHub organization) maintains it in manaflow-ai/cmux, which has 28,092 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 11, 2026.

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