cmux-architecture — Claude Code skill: what it does, how to install
Guides modular Swift package architecture, strict 5-layer dependency inversion, and Swift 6 concurrency rules in the cmux codebase.
npx skills add manaflow-ai/cmux --skill cmux-architecture -a claude-codeWhat cmux-architecture does
The skill directs the migration of cmux from a monolithic app target into modular Swift packages under Packages/. It enforces a strict downward five-layer hierarchy: pure Sendable primitives in CmuxCore, infrastructure actors, @Observable domain state, SwiftUI packages, and a thin executable root. Singletons and global containers are banned in favor of initializer-based dependency injection.
Project integrity relies on local Python verification scripts. Moving or adding packages requires running python3 scripts/check-workspace-package-groups.py, while CI checks Package.resolved files using python3 scripts/check-package-resolved-policy.py. Existing modules in the repository must not serve as reference designs, because they predate this strict architecture standard. Every new file must hold only one primary type.
What it helps with
- split the cmux monolith into isolated Swift packages
- refactor legacy shared singletons into initializer dependency injection
- migrate UI state models from ObservableObject to Observable
- isolate process and PTY operations into dedicated background actors
Example prompts for the agent
- Extract CmuxAppearance into an isolated Swift package using cmux-architecture rules
- Refactor this settings manager into an actor service and an observable coordinator
- Check this package structure to verify the dependency graph remains acyclic
How to install cmux-architecture
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-architecture -a claude-code2Manually: put the files in place
~/.claude/skills/cmux-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cmux-architecture/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-architecture -a codex2Manually: put the files in place
.agents/skills/cmux-architecture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-architecture -a cursor2Manually: put the files in place
.cursor/skills/cmux-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manaflow-ai/cmux cmux-architecture2Manually: put the files in place
.github/skills/cmux-architecture/SKILL.md1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-architecture -a gemini-cli2Platform CLI
gemini skills install https://github.com/manaflow-ai/cmux --path skills/cmux-architectureManually: put the files in place
.devin/skills/cmux-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-architecture -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set12
The whole set →Similar
Questions about cmux-architecture
How do I install cmux-architecture in Claude Code?
Run npx skills add manaflow-ai/cmux --skill cmux-architecture -a claude-code in your terminal.
What does cmux-architecture do?
It provides architecture constraints for cmux, enforcing a five-layer hierarchy, protocol-based dependency inversion, actor-isolated services, and SwiftUI @Observable state.
How does cmux-architecture handle feature flags?
It requires runtime flags to use PostHog via CmuxFeatureFlags with explicit fallback values, unless a local setting or build flag is requested directly.