cui-skills
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- execSync — Synchronous shell command execution in setup.mjs
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
A collection of specialized AI agent skills for building desktop and web applications with CUI and Nexa UI — covering C/C++, Python, WebAssembly, and CUI-based web styling, with practical patterns and built-in RTL/Persian support.
cui-skills
Install · /cui-setup · Skills: cui-app · cui-web · cui-py · cui-style · CUI docs · MIT
Four agent skills for building UIs with CUI — one visual language across C, WebAssembly, Python and plain CSS, written from real build and test sessions (Windows and Linux), not from reading docs alone.
- ~210 native components in C99, zero dependencies, ~250 KB apps — see
cui-app - The same C app in the browser with plain clang +
wasm32, no Emscripten — seecui-web - Desktop apps in Python via nexa, the CUI port — see
cui-py - The CUI look in HTML/CSS for sites and web UIs without any C — see
cui-style
Contents
- The four skills
- How the layers fit together
- Requirements per skill
- Setup
- Recorded clone paths (
paths.json) - Installing the skills into an agent
- RTL / Persian support
- Repository layout
The four skills
cui-app — native desktop (C/C++)
The main skill. CUI is an immediate-mode UI library for native apps, written in C99, built with CMake, zero external dependencies.
Contains:
- The mental model (immediate mode, tokens, springs, hit rects)
- Full component map of all ~210 components by category (
api.md) - Copyable UI patterns: app skeleton, sidebar, list+detail, forms, tables, threads, RTL (
patterns.md) - Working CMake template:
template/CMakeLists.txt+template/main.c - The Windows/MSVC build recipe and the pitfalls actually hit (
C2099on compound literals, multi-config generators) - Icons (Lucide), theming, fonts, screenshots, headless testing
When to use: "build me a desktop tool/app in C", "add a component to my CUI app", questions about CUI itself.
cui-web — WebAssembly in the browser
The web layer only: the same C codebase compiled to WebAssembly with plain clang and drawn with WebGL2.
Contains:
- The contract your app must satisfy (
int main(void)+cui_app_run, no manual loop) - Build & run:
web/tools/build.sh app my_app.c+serve.sh→http://localhost:8765/#/app/my_app - Browser constraints verified in the source, not guessed:
fopenalways returnsNULL,cui_app_file_dialog/cui_app_open_urlare no-ops - Hosting:
web/site/is plain static files — any static host works - Toolchain notes (clang
wasm32+wasm-ld+llvm-ar+ python3; Windows gotchas)
When to use: "run my C/C++ app in the browser", "build it as WASM".
cui-py — desktop apps in Python (nexa)
nexa (pip install nexa-ui) is the Python port of CUI: same components, same tokens, zero Python dependencies.
Contains:
- Install and the value-returning immediate-mode mental model
- The two scope kinds (unconditional vs. conditional — the #1 beginner bug) and ID rules
- Theming from Python:
Accent,Tone,Token,ThemeMode - OOP layer with a working example:
Application,Component,Router/View,Store[T] - RTL/Persian shaping (on by default), headless screenshot testing
- Docs map: which file in
docs/answers which question - Windows build troubleshooting
When to use: "make me a Python GUI", "port this CUI app to Python", anything with nexa.
cui-style — the CUI look in plain CSS
The theme layer as CSS: the same tokens cui-app uses, implemented with CSS variables — for sites and UIs with no C or WASM.
Contains:
- Dark + light token sets, Geist typography, pill controls, 1px-bordered surfaces, word-blur motion
- Lucide mechanics (re-running
createIcons(), pinned CDN, self-hosting) - Persian/RTL section: tested font URLs,
@font-face, logical properties, always-RTL rules, Latin digits - React/Tailwind recipes, a restyle workflow for existing projects
- Scaffolder script (
cui.py), startertokens.css/components.css,example.html
When to use: "style this site like CUI", "make a landing page in this look" — no build step involved.
How the layers fit together
| You want | Skill |
|---|---|
| A desktop window (Windows/macOS/Linux) in C/C++ | cui-app |
| The same C app running in the browser (WASM) | cui-web |
| A desktop app in Python | cui-py |
| A plain HTML/CSS site or UI in the CUI look | cui-style |
One codebase can ship both ways: a cui_app_run app builds natively with CMake and as WASM with build.sh app. All four skills share one token system — cui-app is the reference for components and theming; the others cover their own layer and point back to it.
Requirements per skill
| Skill | Needs installed | Needs cloned |
|---|---|---|
cui-app |
git, CMake 3.14+, a C compiler (Visual Studio Build Tools / gcc / clang) | CUI |
cui-web |
git, clang with wasm32 target (LLVM), Git Bash, python3 |
CUI |
cui-py |
Python 3.9+ (pip install nexa-ui); a C compiler only when building from source |
nexa (development only) |
cui-style |
nothing — a browser | no |
cui-setup |
nothing — it checks and installs the rest | — |
Setup
Two ways:
- Ask your agent directly — install the skills (
npx -y skills add ChiakoRh/cui-skills, restart the agent), then say "set up the CUI skills". The bundledcui-setupskill asks what you need, installs only that chain, and runs the flow below. - Slash command (optional) — copy
commands/cui-setup.mdinto your agent's command directory (OpenCode:~/.config/opencode/command/), then run/cui-setup.
Or, without an agent, the bundled setup script (checks tools, clones the projects, writes paths.json, then installs the skills through npx skills add so installs are counted on skills.sh):
npx github:ChiakoRh/cui-skills # or: git clone … && node setup.mjs
The flow (for AI agents)
- Ask which skill branch the user wants (multiple is fine):
cui-app(native C),cui-web(WASM),cui-py(Python),cui-style(CSS only). - Check what already exists before installing anything:
git --version,cmake --version,clang --version(forcui-web, alsoclang --print-targetsand look forwasm32),python --version. - Install only the missing tools for the chosen branches:
- Debian/Ubuntu:
sudo apt install git cmake clang lld llvm python3 - Fedora/RHEL:
sudo dnf install git cmake clang lld llvm python3 - Arch:
sudo pacman -S git cmake clang lld llvm python - openSUSE:
sudo zypper install git cmake clang lld llvm python3 - Alpine:
sudo apk add git cmake clang lld llvm python3 build-base - macOS:
brew install git cmake llvm python(LLVM provideswasm-ld) - Windows: git, CMake, LLVM, Python from official installers; Visual Studio Build Tools for
cui-app cui-stylealone needs nothing
- Debian/Ubuntu:
- Clone the projects into a location the user approves (suggest
~/Git/CUIand~/Git/nexa):
Forgit clone https://github.com/yappologistic/CUI.git # cui-app, cui-web git clone https://github.com/x017/nexa.git # cui-py development onlycui-pyalone,pip install nexa-uiis enough — no clone needed. - Record the paths in
paths.jsonat the repo root (see below). - Install the skills for any chosen branch the agent doesn't have yet:
npx -y skills add ChiakoRh/cui-skills --skill <names> -y. - Verify one cheap check per branch — configure the template (
cui-app),clang --print-targets | grep wasm32(cui-web),python -c "import nexa"(cui-py);cui-styleneeds nothing.
Finish with a table: branch → tools found/installed → clone path → verified or not.
Recorded clone paths (paths.json)
Each skill points at a local clone of the upstream project as its source of truth. Instead of hardcoding paths (which differ on every machine), setup writes them here:
{
"cui_clone": "/home/you/Git/CUI",
"nexa_clone": null
}
paths.json is gitignored — it holds machine-local paths, so it is not part of a fresh clone; the setup flow creates it and fills in the values. The skills themselves never hardcode paths: if the file is missing (you installed the skills by copying folders only), just ask the user where their CUI clone is — or clone it.
Installing the skills into an agent
Copy (or symlink) the five skill folders into your agent's skills directory:
| Agent | Destination |
|---|---|
| OpenCode | ~/.config/opencode/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex / others | any directory your agent reads skills from |
The files are plain Markdown — any agent that can follow instructions can use them even outside these formats.
RTL / Persian support
Covered at every layer, because CUI ships real BiDi + OpenType shaping:
cui-app:CUI_DIRECTION_RTL/AUTO,CUI_TEXT_SHAPINGbuild option, font-fallback recipecui-py: shaping is on by default (fonts.supports_text_shaping()),direction=on containers,ctx.use_rtl_font(), localized calendarscui-style: tested webfont URLs,@font-face, logical properties, always-RTL rules, Latin digits in Persian prose
Repository layout
cui-skills/
├── README.md ← you are here
├── setup.mjs ← agent-less setup (npx github:ChiakoRh/cui-skills)
├── package.json ← makes the npx invocation work
├── paths.json ← written by setup (gitignored, not in a fresh clone)
├── commands/
│ └── cui-setup.md ← optional /cui-setup slash command
├── cui-setup/
│ └── SKILL.md ← first-time setup flow (asks, installs, verifies)
├── cui-app/
│ ├── SKILL.md ← the main guide
│ ├── api.md ← ~210 components by category
│ ├── patterns.md ← copyable UI shapes
│ └── template/ ← CMakeLists.txt + main.c starter
├── cui-web/
│ └── SKILL.md ← build, browser constraints, hosting
├── cui-py/
│ └── SKILL.md ← nexa: install, model, theming, RTL, docs map
└── cui-style/
├── SKILL.md ← tokens, Lucide, RTL, restyle workflow
├── tokens.css ← the design tokens
├── components.css ← ready-made components
├── react-tailwind.md
├── cui.py ← scaffolder
├── example.html ← full styled demo page
└── fonts/ ← Geist + OFL license
Upstream: CUI · docs: https://yappologistic.github.io/CUI/ · Python port: nexa
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi