tmux-real-user-testing
できること
このスキルは、実際のユーザーがするようにtmuxでターミナルアプリを操作して試します。各画面の読みやすいログを保存するので、人がその流れを確認できます。ターミナルのインターフェイスを確認するテスターや開発者向けです。
使う場面
- ✓ターミナルのインターフェイスを、実際のユーザーのように試したいとき。
- ✓ターミナルのテスト中に、各画面の読みやすい記録が必要なとき。
- ✓ターミナルアプリのスラッシュコマンドやダイアログを確認したいとき。
スキルのリンク
https://github.com/QwenLM/qwen-code/blob/main/.qwen/skills/tmux-real-user-testing/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このターミナルアプリのスラッシュコマンドを、実際のユーザーのように試して、すべての画面の読みやすいログを保存してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、tmuxのセッションでアプリを起動し、現実的なキー入力を送ります。変化するたびに画面を取り込みます。生のターミナルの出力ではなく、確認できる読みやすいログに保存します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
tmux Real User Testing
Run Qwen Code in a real tmux TUI session as a user would: navigate dialogs, trigger slash commands, exercise workflows, and save a readable log that maintainers can review. Prefer this workflow when the goal is not just a pass/fail assertion, but a narrative artifact showing what happened on screen.
Core principle
Use tmux as a real-use harness. Drive the TUI with realistic keyboard actions,
then save a step-by-step readable transcript with tmux capture-pane -p after
each meaningful state change.
Avoid relying on tmux pipe-pane as the primary report. pipe-pane captures raw
ANSI/control streams from React Ink TUI output and often looks like garbled text
when opened as plain text. Use pipe-pane only as an optional forensic artifact. Make
tmux-readable-full.log the main deliverable.
When to use
Use this workflow for:
- TUI behavior, rendering, dialogs, keyboard navigation, slash commands, or auth flows.
- Realistic workflows where a maintainer wants to read the journey afterward.
- Regression testing where final state is insufficient and intermediate screens matter.
- User-facing flows such as
/auth,/model,/manage-models, MCP setup, permissions, onboarding, or interactive error recovery.
Use headless JSON E2E instead when only tool execution or model API behavior needs structured assertions.
Standard artifact layout
Create a timestamped directory under project tmp/:
tmp/<scenario>-tmux-YYYYMMDD-HHMMSS/
├── tmux-readable-full.log # primary report: step-by-step readable snapshots
├── tmux-final-capture.log # final screen only
├── current-pane.txt # latest poll/snapshot scratch file
└── report.md # short summary with result and artifact pointers
Do not overwrite previous runs. Preserve complete logs unless the user explicitly asks to sanitize or trim them.
Recommended helper script
Use scripts/tmux-real-user-log.sh to avoid rewriting shell glue. The script can
start a session, append labeled snapshots, send keys, wait for text, and finish.
The start command outputs export statements — use eval to set the variables
directly in your shell:
eval "$(bash .qwen/skills/tmux-real-user-testing/scripts/tmux-real-user-log.sh \
start <scenario> . npm run dev -- --approval-mode yolo)"
# → $SESSION, $OUTDIR, $LOG are now available
Show the full usage before running a new scenario:
bash .qwen/skills/tmux-real-user-testing/scripts/tmux-real-user-log.sh help
Manual workflow
1. Start the TUI
Use a large tmux viewport so dialogs render fully. Wait for the TUI to render before interacting — poll for a known startup string rather than blind sleeping:
TS=$(date +%Y%m%d-%H%M%S)
PROJECT_ROOT="$(pwd)"
OUT="$PROJECT_ROOT/tmp/<scenario>-$TS"
SESSION="<scenario>-$TS"
mkdir -p "$OUT"
tmux new-session -d -s "$SESSION" -x 200 -y 50 \
-c "$PROJECT_ROOT" \
"npm run dev -- --approval-mode yolo"
# Poll until TUI is ready (adjust regex to match your app's startup line)
for i in $(seq 1 30); do
sleep 1
if tmux capture-pane -t "$SESSION" -p -S -100 | grep -q "Ready\|>"; then
break
fi
done
Use node dist/cli.js instead of npm run dev only when verifying a built
bundle. Use the globally installed qwen only when reproducing a user-reported
installed-version bug.
2. Append labeled readable snapshots
After each meaningful action, append a section header plus capture-pane -p to
the full log:
LOG="$OUT/tmux-readable-full.log"
{
printf '\n===== 01 /auth dialog =====\n'
tmux capture-pane -t "$SESSION" -p -S -240
} >> "$LOG"
Increase -S as the session grows (add ~100 lines per section). The important
part is that each section is a rendered frame, not raw ANSI output.
3. Send keys like a user
Split typing and Enter to avoid swallowed submissions:
tmux send-keys -t "$SESSION" "/auth"
sleep 0.5
tmux send-keys -t "$SESSION" Enter
sleep 2
For navigation:
tmux send-keys -t "$SESSION" Down
tmux send-keys -t "$SESSION" Space
tmux send-keys -t "$SESSION" Escape
For text input into Ink fields, prefer one key at a time if bulk text is ignored:
tmux send-keys -t "$SESSION" e n a b l e d
4. Poll for completion instead of blind sleeping
Use text on the screen as the completion condition. On timeout, dump the current pane so the log shows what was on screen when the wait expired:
for i in $(seq 1 60);
よくある質問
なぜ生のターミナルの出力をそのまま保存しないのですか?
生の出力は読みにくいため、スキルは各画面をテキストとして取り込みます。
主な成果物は何ですか?
各画面を通じた流れを示す、読みやすいログです。
他の方法を使うべきなのはどんなときですか?
ツールの結果やAPIの動作を、アサーションで確認するだけであれば、ヘッドレスのテストの方が適しています。
詳細
作者による元の説明
This skill should be used when the user asks to "用 tmux 做真实测试", "保存 tmux 日志", "像真实用户一样测试 Qwen", "生成可复查的 TUI 测试报告", "测试 slash command 交互", or requests a tmux-based real user E2E run with complete readable logs. It guides real TUI usage with step-by-step capture-pane snapshots rather than ANSI raw pipe logs.
repo: QwenLM/qwen-code
人気
- GitHubのスター
- 29k
- ランキング
- #9771
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
codegraph
29kエージェントが、索引化されたコードベースを、呼び出しグラフ、依存関係、デッドコード、ホットスポット、意味検索を通じて分析できるよう支援します。
qwen-code-claw
29kエージェントが、コードベースの理解、バグ修正、リファクタリング、新しいプロジェクトの生成などのコーディング作業を、Qwen Codeに任せられるよう支援します。
structured-debugging
29kエージェントに、難しいバグを段階的に調べる方法を教えます。仮説を立て、的を絞った確認を行い、検証して、修正の前に本当の原因を見つけます。
generated-ui
29kエージェントが、対話型の計算ツール、シミュレーター、比較表をチャットの中に表示し、入力を変えて結果を確かめられるよう支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。