claude-code
What it does
This skill lets your agent run the Claude Code command line tool to delegate coding work. It is for developers who want a separate coding agent to do a task while they keep working.
When to use it
- βWhen you want a one-off code fix, feature, or review run by Claude Code.
- βWhen a task needs several rounds of edits, tests, and review.
- βWhen you want a long coding job to run in the background.
Skill link
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/claude-code/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want Claude Code to fix the failing tests in my project and report back what it changed.β
5 new skills a week. 1 minute to read.
How it works
The agent first checks that the claude tool is installed and signed in. It then picks print mode, an interactive session, or a background run based on the task.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Claude Code Delegation
Delegate coding work to Claude Code, Anthropic's autonomous coding agent CLI.
Setup (once): npm install -g @anthropic-ai/claude-code && claude auth login Β· verify with claude auth status / claude doctor. CI token: claude setup-token. Full auth/install variants β references/flags.md.
Platform check (before running anything): detect the OS first. All shell examples in this skill are POSIX (bash). Linux/macOS run them as-is. On Windows, run Claude Code natively in PowerShell/Git Bash for print and background modes, but interactive tmux orchestration requires WSL. Shell-syntax translation table (quoting, env vars, piping, paths) β references/platforms.md.
Mode Selection (decide FIRST)
| Task shape | Mode | Why |
|---|---|---|
| One-shot task: fix bug, add feature, review diff, extract data | Print -p β default |
No PTY, no dialogs, structured output |
| Multi-turn iterate: refactor β review β fix β test; needs slash commands | Interactive tmux β references/interactive-tmux.md |
Full REPL, requires dialog handling |
| Long-running, shouldn't block; large fan-out supervision | Background --bg |
Native supervision via claude agents |
| High-stakes PR review | claude ultrareview [pr#] |
Cloud multi-agent, exit-code driven (uploads diff to cloud β never on branches with secrets) |
Do NOT hand-roll tmux fan-outs for parallel work β prefer --bg + claude agents --json --all.
Print Mode (the 90% path)
terminal(command="claude -p 'Fix the auth bug in src/auth.py' \
--allowedTools 'Read,Edit' --max-turns 10 --output-format json",
workdir="/path/to/project", timeout=180)
Always set: workdir Β· --max-turns (5β10; print-mode only) Β· --allowedTools (least privilege: Read,Edit,Write,Bash, patterns like Bash(git *)).
JSON result fields: result (text) Β· session_id (for resume) Β· subtype (success | error_max_turns | error_budget) Β· total_cost_usd Β· num_turns Β· structured_output (with --json-schema).
Common variants:
git diff main... | claude -p 'Review for bugs' --max-turns 1 # pipe input, cheapest review
claude -p 'Continue: add pooling' --resume <session_id> # resume; --continue = latest in cwd; --fork-session = branch
claude -p 'List functions' --output-format json --json-schema '<schema>' --max-turns 5 # structured extraction (needs turns to read files)
claude --bare -p 'task' --settings ci.json # CI: skips hooks/plugins/CLAUDE.md; auth = ANTHROPIC_API_KEY only
claude -p 'task' --max-budget-usd 0.50 --fallback-model haiku # cost cap (min ~$0.05) + overload fallback
Streaming, stream-json events, bidirectional input, cache-reuse (--exclude-dynamic-system-prompt-sections) β references/print-mode.md.
Background Mode
claude --bg 'investigate flaky test in tests/api.test.ts' # NOT compatible with -p
claude agents --json --all # list/inspect
claude attach <id> | logs <id> | stop <id> | respawn <id> | rm <id>
Guardrails & Gotchas (violations break agents)
-pauto-skips trust/permission dialogs (any non-TTY does) β only run in trusted directories.- Interactive mode = tmux required (Windows: only inside WSL β never attempt tmux in PowerShell/cmd; fall back to
-por--bg); two startup dialogs, and the--dangerously-skip-permissionsdialog defaults to "No, exit" (must sendDownthenEnter). Full patterns βreferences/interactive-tmux.md. - Session resume is per-directory β
--continueonly finds sessions from the same cwd. - Slash commands don't work in
-pβ describe the task in natural language instead. - Context >70% degrades quality β in interactive sessions monitor
/context, use/compact. - Clean up: kill tmux sessions and
claude stop/rmbackground sessions when done. - Don't kill slow sessions β capture progress first (
tmux capture-pane/claude logs). - Report back: after completion, summarize what changed (use the JSON
result+git diff).
References (read on demand)
| File | Read when |
|---|---|
references/print-mode.md |
Streaming output, stream-json events, piping, schemas, session mgmt, cache reuse |
references/interactive-tmux.md |
Any tmux/PTY session: dialogs, send-keys, monitoring, slash commands, shortcuts |
references/flags.md |
Full CLI flag & subcommand tables, auth vari |
FAQ
Does it run without my permission?
No. The skill is loaded only when you explicitly authorize it or name Claude Code.
What if Claude Code is not installed?
The agent stops and gives you install and sign-in guidance instead.
Does it work on Windows?
Print and background modes run natively, but interactive sessions need WSL on Windows.
Details
Original description by the author
Operate Claude Code CLI (v2.1+) via the terminal. Load only when the user explicitly authorizes this skill or names Claude Code / claude-code. Before any command, confirm the `claude` binary is available; if missing, stop and give install or auth guidance. Covers print mode (-p), interactive tmux sessions, and background (--bg) orchestration.
repo: XiaomiMiMo/MiMo-Code
Popularity
- GitHub stars
- 14k
- Ranking position
- #11304
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
effect
14kHelps your agent answer questions about the Effect TypeScript framework by checking its source code and docs instead of relying on memory.
arxiv
14kHelps your agent search, read, cite, and track academic papers on arXiv, including abstracts, BibTeX citations, PDF downloads, and citation links.
codex
14kHelps your agent run the OpenAI Codex command line tool without a chat window, for coding tasks, scripts, and automated pipelines.
compose-next
14kRuns a full feature workflow when you ask for it: clarify requirements, write a spec, implement, verify, get a review, and finish the change.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.