Con CLI E2E
nowledge-co/con-terminal
Validate Con's local socket control plane against a real running app session, and write/run con-test integration tests.
Lets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence.
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimo --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/drive-mimo .claude/skills/drive-mimo && rm -rf skills-srcUse ~/.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/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .claude/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimoType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimo --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/drive-mimo .agents/skills/drive-mimo && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .agents/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimo --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/drive-mimo .cursor/skills/drive-mimo && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .cursor/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/XiaomiMiMo/MiMo-Code.git --path .agents/skills/drive-mimo--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimo --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/drive-mimo .gemini/skills/drive-mimo && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .gemini/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimoInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/drive-mimo .github/skills/drive-mimo && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .github/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code drive-mimo --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/drive-mimo .opencode/skills/drive-mimo && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "drive-mimo" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/.agents/skills/drive-mimo into .opencode/skills/drive-mimo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drive-mimo", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
drive-mimoLets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence.
This skill is for working on the MiMoCode repository, where you need to start a separate mimo process and operate it from the agent. There are two interfaces: headless mimo run --format json for scripted tasks, CI and event validation, and the terminal interface inside tmux for permission dialogs, keybindings and visual regression checks.
Every run is meant to leave parseable evidence rather than something eyeballed, and each driven instance gets a fresh MIMOCODE_HOME and a throwaway workspace so it never touches your own config, memory or session database. The process can be an installed mimo binary or a dev build started from source with bun dev, with the same flags and events either way. A scripts/wait-for-text.sh helper waits for text to appear. It is not meant for ordinary MiMoCode task execution.
Read from SKILL.md and the folder at commit 6babeb0. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
bashbunjqFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Drive MiMo Code loads about 3.9k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 780 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from XiaomiMiMo/MiMo-Code at commit 6babeb0, republished under its MIT licence (© XiaomiMiMo). 780 words, ~3,894 tokens.
.claude/skills/drive-mimo/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Two interfaces for driving a separate mimo process:
| Interface | Command | Use when |
|---|---|---|
| Headless | mimo run --format json | Scripted tasks, CI, event validation |
| TUI | mimo in tmux | Interactive flow, permission dialogs, keybindings, visual regression |
Core principle: Every run produces parseable evidence. No eyeballing.
Always drive an isolated instance: give each run a fresh MIMOCODE_HOME and a throwaway workspace so it never touches your own config, memory, or session DB.
The interface (headless vs TUI, above) is what you drive. How the process is launched is a separate axis — either can be launched either way:
| Launcher | Command | Use when |
|---|---|---|
| Installed binary | mimo … | Testing a released/installed build |
| Dev (from source) | bun dev … | Debugging mimocode itself — runs src/index.ts directly, no build step, picks up local code changes |
Everything below uses mimo for brevity. To drive a dev build instead,
substitute bun dev for mimo and run from the repo root — every flag,
JSON event, and tmux technique is identical. See the Dev Mode section.
# mimo binary must be on PATH (installed-binary launcher)
which mimo || echo "mimo not found on PATH"
# OR: dev launcher — run from the mimocode repo root, needs bun
which bun || echo "bun not found — needed for dev mode"
# tmux (for TUI interface)
which tmux || echo "tmux not found — install it for TUI mode"Running the
wait-for-text.shhelper: invoke it as./scripts/wait-for-text.sh …from this skill's directory. The repository copy is executable and can be called directly.
When the goal is to debug mimocode's own code, launch from source with
bun dev instead of the installed mimo binary. It runs
packages/cli/src/index.ts directly — no build step — so local edits take
effect on the next launch.
Key facts:
bun dev == bun run dev.mimo command: same CLI, same subcommands
and flags. bun dev --help, bun dev run …, bun dev serve, etc.bun dev run --format json --dangerously-skip-permissions …bun dev <workspace> (positional workspace arg, as with mimo)MIMOCODE_HOME is not set, dev defaults it to a repo-local .dev-home
dir. For an isolated driven run, set MIMOCODE_HOME=$(mktemp -d) explicitly
just like with the binary.Substitution rule: anywhere Part 1 / Part 2 / Part 3 below say mimo,
replace it with bun dev (invoked from the repo root) to drive a dev build.
# Headless, dev build (from repo root)
REPO=/path/to/mimocode/checkout # your local mimocode repo root
MIMOCODE_HOME=$(mktemp -d) bun --cwd "$REPO" dev run \
--format json --dangerously-skip-permissions --dir "$WORKSPACE" \
< "$PROMPT" > /tmp/mimo-dev.jsonl 2>&1
# TUI, dev build in tmux (from repo root)
tmux new-session -d -s "$SESSION" -x 120 -y 30 \
"cd $REPO && MIMOCODE_HOME=$(mktemp -d) MIMOCODE_PURE=true bun dev $WORKSPACE; sleep 999"mimo run)PROMPT=$(mktemp -t mimo-drive.XXXXXX)
cat >"$PROMPT" <<'EOF'
Your task here.
EOF
MIMOCODE_HOME=$(mktemp -d) mimo run \
--format json \
--dangerously-skip-permissions \
--dir "$WORKSPACE" \
< "$PROMPT" > /tmp/mimo-out.jsonl 2>&1
EXIT=$?| Flag | Purpose |
|---|---|
--format json | Structured JSONL events to stdout |
--dangerously-skip-permissions | Auto-approve all permissions |
--model provider/model | Override model |
--agent compose | Use compose agent |
--session SID | Continue existing session |
--continue | Continue last session |
--file path | Attach file to message |
--dir path | Working directory |
--format json writes one JSON object per line. Every event has the shape
{"type": ..., "timestamp": <ms>, "sessionID": "ses_...", ...payload} — the
sessionID is a field on each event, not a standalone event. The payload for
most events is nested under part.
Emitted event types (from the run event stream):
{"type":"step_start","timestamp":...,"sessionID":"ses_abc","part":{...}}
{"type":"text","timestamp":...,"sessionID":"ses_abc","part":{"type":"text","text":"I'll create the file...","time":{...}}}
{"type":"reasoning","timestamp":...,"sessionID":"ses_abc","part":{"type":"reasoning","text":"The user wants..."}}
{"type":"tool_use","timestamp":...,"sessionID":"ses_abc","part":{"type":"tool","tool":"write","state":{"status":"completed",...}}}
{"type":"step_finish","timestamp":...,"sessionID":"ses_abc","part":{...}}
{"type":"error","timestamp":...,"sessionID":"ses_abc","error":{...}}Notes that matter for parsing:
session.id, no tool_result, no session.status event. A tool_use
is emitted once per tool part when it reaches completed or error — the
result/output is inside part.state, there is no separate result event.tool_use identifies the tool via part.tool (a bare string, e.g.
"tool":"write") — there is no .tool.name and no top-level .name.text / reasoning text lives at part.text, not top-level .text.reasoning is only emitted when --thinking is passed. Without it, no
reasoning events appear.# Completion — the real signal is the exit code, not a stream event
[ $EXIT -eq 0 ] || echo "FAIL: exit $EXIT"
# No errors
grep -q '"type":"error"' /tmp/mimo-out.jsonl && echo "FAIL: errors found"
# A specific tool was used (match part.tool, the bare string)
grep -q '"tool":"write"' /tmp/mimo-out.jsonl || echo "FAIL: write tool not called"
# Text output contains expected string (text is at .part.text)
grep '"type":"text"' /tmp/mimo-out.jsonl | jq -r '.part.text' | grep -q "expected"
# Robust tool check via jq (works regardless of key ordering)
jq -e 'select(.type=="tool_use") | .part.tool=="write"' /tmp/mimo-out.jsonl >/dev/null \
|| echo "FAIL: write tool not called"timeout 120 mimo run --format json --dangerously-skip-permissions < "$PROMPT"
[ $? -eq 124 ] && echo "FAIL: timed out"| Variable | Purpose |
|---|---|
MIMOCODE_HOME | Required. Fresh mktemp -d per run. Sandboxes DB, config, cache. |
MIMOCODE_PURE=true | Disable external plugins. |
MIMOCODE_DISABLE_GIT=true | Skip git ops if workspace isn't a real repo. |
# Create isolated environment
MHOME=$(mktemp -d)
WORKSPACE=$(mktemp -d)
SESSION="mimo-drive-$$"
# Launch mimo TUI in tmux (workspace is a positional arg, NOT --dir)
tmux new-session -d -s "$SESSION" -x 120 -y 30 \
"MIMOCODE_HOME=$MHOME MIMOCODE_PURE=true mimo $WORKSPACE; sleep 999"
# Wait for the TUI to render its input prompt
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "$PROMPT_RE" -T 15Where PROMPT_RE is a language-neutral pattern for the input prompt. The
prompt placeholder is localized, so match on the stable markers rather than a
localized string:
# Matches the prompt line regardless of UI language:
# the ">" input caret, the "Ask" English placeholder, or a "/" command hint
PROMPT_RE='>|Ask|/[a-z]'If a run's UI language is known and fixed, you may match its literal placeholder instead — but prefer the neutral pattern for portability.
# Type a message (literal text, then Enter)
tmux send-keys -t "$SESSION:0.0" -l -- "Create a file called hello.txt with content 'world'"
tmux send-keys -t "$SESSION:0.0" Enter
# Special keys
tmux send-keys -t "$SESSION:0.0" C-c # Cancel
tmux send-keys -t "$SESSION:0.0" C-d # EOF
tmux send-keys -t "$SESSION:0.0" Escape # Escape
tmux send-keys -t "$SESSION:0.0" Tab # Tab completion
tmux send-keys -t "$SESSION:0.0" Up # History up
tmux send-keys -t "$SESSION:0.0" Down # History down
tmux send-keys -t "$SESSION:0.0" Enter # Submit# Current screen
tmux capture-pane -t "$SESSION:0.0" -p
# Full scrollback
tmux capture-pane -t "$SESSION:0.0" -p -S -
# Last 50 lines
tmux capture-pane -t "$SESSION:0.0" -p -S -50# Wait for agent to start processing
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "thinking\|reading\|writing" -T 30
# Wait for tool permission prompt
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "Allow\|Deny\|permission\|approve" -T 30
# Wait for completion
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "completed\|done\|finished\|idle" -T 120
# Wait for error
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "error\|failed\|Error" -T 30
# Custom regex
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "hello\.txt.*world" -T 30# Wait for permission prompt, then approve
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "Allow\|approve" -T 30
tmux send-keys -t "$SESSION:0.0" -l -- "y"
tmux send-keys -t "$SESSION:0.0" Enter
# Or deny
tmux send-keys -t "$SESSION:0.0" -l -- "n"
tmux send-keys -t "$SESSION:0.0" Enter# Turn 1: send initial message
tmux send-keys -t "$SESSION:0.0" -l -- "Create a TypeScript file that adds two numbers"
tmux send-keys -t "$SESSION:0.0" Enter
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "completed\|done" -T 120
# Turn 2: follow-up
tmux send-keys -t "$SESSION:0.0" -l -- "Now add a test for it"
tmux send-keys -t "$SESSION:0.0" Enter
bash scripts/wait-for-text.sh -t "$SESSION:0.0" -p "completed\|done" -T 120
# Verify result
tmux capture-pane -t "$SESSION:0.0" -p -S - | grep -i "pass\|fail"tmux kill-session -t "$SESSION" 2>/dev/null
rm -rf "$MHOME" "$WORKSPACE"test_smoke() {
local P=$(mktemp) MHOME=$(mktemp -d)
echo "Say hello" > "$P"
MIMOCODE_HOME=$MHOME mimo run --format json --dangerously-skip-permissions \
< "$P" > /tmp/s1.jsonl 2>&1
local E=$?
rm -rf "$MHOME" "$P"
[ $E -eq 0 ] && grep -q '"type":"text"' /tmp/s1.jsonl && echo "PASS" || echo "FAIL"
}test_tool_use() {
local P=$(mktemp) MHOME=$(mktemp -d) WS=$(mktemp -d)
echo 'Create file test.txt with content "hello"' > "$P"
MIMOCODE_HOME=$MHOME mimo run --format json --dangerously-skip-permissions --dir "$WS" \
< "$P" > /tmp/s2.jsonl 2>&1
local E=$?
local OK=true
[ $E -ne 0 ] && OK=false
! grep -q '"tool":"write"' /tmp/s2.jsonl && OK=false
[ ! -f "$WS/test.txt" ] && OK=false
rm -rf "$MHOME" "$WS" "$P"
$OK && echo "PASS" || echo "FAIL"
}test_tui_interactive() {
local MHOME=$(mktemp -d) WS=$(mktemp -d) SID="mimo-s3-$$"
local PROMPT_RE='>|Ask|/[a-z]'
tmux new-session -d -s "$SID" -x 120 -y 30 "MIMOCODE_HOME=$MHOME MIMOCODE_PURE=true mimo $WS; sleep 999"
# Wait for prompt
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "$PROMPT_RE" -T 15 || { echo "FAIL: no prompt"; tmux kill-session -t $SID; return 1; }
# Send task
tmux send-keys -t "$SID:0.0" -l -- "Create hello.txt with content 'world'"
tmux send-keys -t "$SID:0.0" Enter
# Wait for completion (agent shows elapsed time like "· 9.8s")
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "· [0-9]" -T 120 || { echo "FAIL: no completion"; tmux kill-session -t $SID; return 1; }
# Verify file
[ -f "$WS/hello.txt" ] && echo "PASS" || echo "FAIL"
tmux kill-session -t "$SID" 2>/dev/null
rm -rf "$MHOME" "$WS"
}test_tui_permission() {
local MHOME=$(mktemp -d) WS=$(mktemp -d) SID="mimo-s4-$$"
local PROMPT_RE='>|Ask|/[a-z]'
tmux new-session -d -s "$SID" -x 120 -y 30 "MIMOCODE_HOME=$MHOME MIMOCODE_PURE=true mimo $WS; sleep 999"
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "$PROMPT_RE" -T 15
# Ask for something that needs permission (no --dangerously-skip-permissions in TUI)
tmux send-keys -t "$SID:0.0" -l -- "Run the command: echo hello"
tmux send-keys -t "$SID:0.0" Enter
# Wait for permission prompt
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "Allow\|approve\|permission\|y/n" -T 30 || { echo "FAIL: no permission prompt"; tmux kill-session -t $SID; return 1; }
# Approve
tmux send-keys -t "$SID:0.0" -l -- "y"
tmux send-keys -t "$SID:0.0" Enter
# Wait for completion
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "· [0-9]" -T 60
tmux capture-pane -t "$SID:0.0" -p | grep -q "hello" && echo "PASS" || echo "FAIL"
tmux kill-session -t "$SID" 2>/dev/null
rm -rf "$MHOME" "$WS"
}test_tui_keybindings() {
local MHOME=$(mktemp -d) WS=$(mktemp -d) SID="mimo-s5-$$"
local PROMPT_RE='>|Ask|/[a-z]'
tmux new-session -d -s "$SID" -x 120 -y 30 "MIMOCODE_HOME=$MHOME MIMOCODE_PURE=true mimo $WS; sleep 999"
bash scripts/wait-for-text.sh -t "$SID:0.0" -p "$PROMPT_RE" -T 15
# Test Ctrl+C cancels input
tmux send-keys -t "$SID:0.0" -l -- "some partial input"
tmux send-keys -t "$SID:0.0" C-c
# Screen should still show prompt (not exit)
sleep 1
tmux capture-pane -t "$SID:0.0" -p | grep -qE "$PROMPT_RE" && echo "PASS: Ctrl+C didn't exit" || echo "FAIL: Ctrl+C exited"
# Test Escape
tmux send-keys -t "$SID:0.0" Escape
sleep 0.5
tmux kill-session -t "$SID" 2>/dev/null
rm -rf "$MHOME" "$WS"
}run_all() {
local PASS=0 FAIL=0 RESULTS=()
for fn in test_smoke test_tool_use test_tui_interactive test_tui_permission test_tui_keybindings; do
echo "--- $fn ---"
if $fn 2>/dev/null; then PASS=$((PASS+1)); else FAIL=$((FAIL+1)); RESULTS+=("$fn: FAIL"); fi
done
echo "=== $PASS passed, $FAIL failed ==="
[ ${#RESULTS[@]} -gt 0 ] && printf ' %s\n' "${RESULTS[@]}"
[ $FAIL -eq 0 ]
}| Task | Command |
|---|---|
| Headless run | MIMOCODE_HOME=$(mktemp -d) mimo run --format json --dangerously-skip-permissions "prompt" |
| TUI launch | tmux new-session -d -s test -x 120 -y 30 "MIMOCODE_HOME=$(mktemp -d) mimo $WORKSPACE; sleep 999" |
| Send text | tmux send-keys -t test:0.0 -l -- "text" && tmux send-keys -t test:0.0 Enter |
| Capture screen | tmux capture-pane -t test:0.0 -p -S - |
| Wait for text | bash scripts/wait-for-text.sh -t test:0.0 -p "pattern" -T 30 |
| Send Ctrl+C | tmux send-keys -t test:0.0 C-c |
| Approve permission | tmux send-keys -t test:0.0 -l -- "y" && tmux send-keys -t test:0.0 Enter |
| Cleanup | tmux kill-session -t test && rm -rf $MHOME |
© XiaomiMiMo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (scripts) in .agents/skills/drive-mimo of XiaomiMiMo/MiMo-Code.
Open the folder on GitHubat commit 6babeb0
Drive MiMo Code 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Drive MiMo Code this skillXiaomiMiMo/MiMo-Code | 14k | — | ~3.9k | Automated safety check: Pass | MIT | |
| Con CLI E2Enowledge-co/con-terminal | 625 | — | ~1.2k | Automated safety check: Pass | MIT | |
| OpenHarness End-to-End EvalsHKUDS/OpenHarness | 16k | 1 repos | ~2.1k | Automated safety check: Notes | MIT | |
| Senpi Agent QA Harnesscode-yeongyu/senpi | 472 | — | ~2.7k | Automated safety check: Notes | MIT | |
| tmux Real User TestingQwenLM/qwen-code | 28k | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Create a Verification Skillcursor/plugins | 10k | 8 repos | ~1.5k | Automated safety check: Pass | None |
nowledge-co/con-terminal
Validate Con's local socket control plane against a real running app session, and write/run con-test integration tests.
HKUDS/OpenHarness
Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.
code-yeongyu/senpi
Checks changes to the senpi coding agent by driving the real CLI from source in an isolated sandbox, over RPC, terminal UI, mock model and CLI smoke channels.
QwenLM/qwen-code
Drives Qwen Code in a real tmux session the way a user would and saves a readable step-by-step transcript of each screen for maintainers to review.
cursor/plugins
Generates a project-local skill that launches your app, exercises a feature the way a user would and captures evidence, for web, CLI, API or desktop projects.
KonghaYao/peri
Verifies and repairs a feature by using the real Peri terminal UI as a user would, looping verify, decide, fix and review until a fresh round shows no blockers.
XiaomiMiMo/MiMo-Code
Searches arXiv, fetches metadata, generates BibTeX, downloads PDFs and finds citations and related papers using a bundled Python script.
XiaomiMiMo/MiMo-Code
Interactive guide for creating, reviewing and fixing agent skills (SKILL.md folders), covering structure, frontmatter rules, trigger phrases and validation before sharing.
XiaomiMiMo/MiMo-Code
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
XiaomiMiMo/MiMo-Code
Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.
XiaomiMiMo/MiMo-Code
Hands coding work to the Claude Code CLI from the terminal in print, interactive tmux or background mode, only when you explicitly ask for Claude Code.
Works with
Categories
Lets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence. This skill is for working on the MiMoCode repository, where you need to start a separate mimo process and operate it from the agent. There are two interfaces: headless mimo run --format json for scripted tasks, CI and event validation, and the terminal interface inside tmux for permission dialogs, keybindings and visual regression checks.
Drive MiMo Code fits situations like: testing MiMoCode behavior by driving a second mimo process; checking permission dialogs and keybindings in the terminal interface through tmux; debugging MiMoCode itself from source with bun dev.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a claude-code`. Or copy the skill folder (.agents/skills/drive-mimo in XiaomiMiMo/MiMo-Code) into .claude/skills/drive-mimo in your project. Claude Code loads it when a task matches its description.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a codex`. Or copy the skill folder (.agents/skills/drive-mimo in XiaomiMiMo/MiMo-Code) into .agents/skills/drive-mimo in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add XiaomiMiMo/MiMo-Code --skill drive-mimo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drive-mimo, .gemini/skills/drive-mimo, .github/skills/drive-mimo and .opencode/skills/drive-mimo in your project.
Going by SKILL.md and its folder, Drive MiMo Code needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, bun and jq). Our summary lists: A mimo binary on PATH, or Bun to run the dev build from source; tmux for interactive runs.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Drive MiMo Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.9k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Drive MiMo Code: Con CLI E2E (nowledge-co/con-terminal, 625 stars), OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars), Senpi Agent QA Harness (code-yeongyu/senpi, 472 stars) and tmux Real User Testing (QwenLM/qwen-code, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
XiaomiMiMo (a GitHub organization) maintains it in XiaomiMiMo/MiMo-Code, which has 13,611 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 3, 2026.
Source: XiaomiMiMo/MiMo-Code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.