[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C18BKGHFSZNXK09SWXR8JR":3,"skill-same:01M7C18BKGHFSZNXK09SWXR8JR":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7C18BKGHFSZNXK09SWXR8JR","use-tmux",null,"Use when you need to run interactive CLI tools (vim, git rebase -i, Python REPL, etc.) that require real-time input\u002Foutput - provides tmux-based approach for controlling interactive sessions through detached sessions and send-keys","zak-keown\u002Fmoe","zak-keown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F320717241?v=4","01M7BZFXME0NW6TQX0H7AZM2KS","01M7BZFXN32VR0JN5AATRD53H4",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.cursor-plugin\u002Fskills\u002Fuse-tmux\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: use-tmux\ndescription: Use when you need to run interactive CLI tools (vim, git rebase -i, Python REPL, etc.) that require real-time input\u002Foutput - provides tmux-based approach for controlling interactive sessions through detached sessions and send-keys\n---\n\n# Using tmux for Interactive Commands\n\n## Overview\n\nInteractive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal. tmux provides detached sessions that can be controlled programmatically via `send-keys` and `capture-pane`.\n\n## When to Use\n\n**Use tmux when:**\n- Running vim, nano, or other text editors programmatically\n- Controlling interactive REPLs (Python, Node, etc.)\n- Handling interactive git commands (`git rebase -i`, `git add -p`)\n- Working with full-screen terminal apps (htop, etc.)\n- Commands that require terminal control codes or readline\n\n**Don't use for:**\n- Simple non-interactive commands (use `Bash`)\n- Commands that accept input via stdin redirection\n- One-shot commands that don't need interaction\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Start session | `tmux new-session -d -s \u003Cname> \u003Ccommand>` |\n| Send input | `tmux send-keys -t \u003Cname> 'text' Enter` |\n| Capture output | `tmux capture-pane -t \u003Cname> -p` |\n| Stop session | `tmux kill-session -t \u003Cname>` |\n| List sessions | `tmux list-sessions` |\n\n## Core Pattern\n\n### Before (Won't Work)\n```bash\n# This hangs because vim expects interactive terminal\nbash -c \"vim file.txt\"\n```\n\n### After (Works)\n```bash\n# Create detached tmux session\ntmux new-session -d -s edit_session vim file.txt\n\n# Send commands (Enter, Escape are tmux key names)\ntmux send-keys -t edit_session 'i' 'Hello World' Escape ':wq' Enter\n\n# Capture what's on screen\ntmux capture-pane -t edit_session -p\n\n# Clean up\ntmux kill-session -t edit_session\n```\n\n## Implementation\n\n### Basic Workflow\n\n1. **Create detached session** with the interactive command\n2. **Wait briefly** for initialization (100-500ms depending on command)\n3. **Send input** using `send-keys` (can send special keys like Enter, Escape)\n4. **Capture output** using `capture-pane -p` to see current screen state\n5. **Repeat** steps 3-4 as needed\n6. **Terminate** session when done\n\n### Special Keys\n\nCommon tmux key names:\n- `Enter` - Return\u002Fnewline\n- `Escape` - ESC key\n- `C-c` - Ctrl+C\n- `C-x` - Ctrl+X\n- `Up`, `Down`, `Left`, `Right` - Arrow keys\n- `Space` - Space bar\n- `BSpace` - Backspace\n\n### Working Directory\n\nSpecify working directory when creating session:\n```bash\ntmux new-session -d -s git_session -c \u002Fpath\u002Fto\u002Frepo git rebase -i HEAD~3\n```\n\n### Helper Wrapper\n\nResolve [skills\u002Fuse-tmux\u002Fscripts\u002Ftmux-wrapper.mjs](scripts\u002Ftmux-wrapper.mjs)\nrelative to this loaded document. Declare that resolved path once, then use it:\n```bash\nWRAPPER=\"\u003Cresolved-tmux-wrapper.mjs>\"\n\n# Start session\nnode \"$WRAPPER\" start \u003Csession-name> \u003Ccommand> [args...]\n\n# Send input\nnode \"$WRAPPER\" send \u003Csession-name> 'text' Enter\n\n# Capture current state\nnode \"$WRAPPER\" capture \u003Csession-name>\n\n# Stop\nnode \"$WRAPPER\" stop \u003Csession-name>\n```\n\n## Common Patterns\n\n### Python REPL\n```bash\ntmux new-session -d -s python python3 -i\ntmux send-keys -t python 'import math' Enter\ntmux send-keys -t python 'print(math.pi)' Enter\ntmux capture-pane -t python -p  # See output\ntmux kill-session -t python\n```\n\n### Vim Editing\n```bash\ntmux new-session -d -s vim vim \u002Ftmp\u002Ffile.txt\nsleep 0.3  # Wait for vim to start\ntmux send-keys -t vim 'i' 'New content' Escape ':wq' Enter\n# File is now saved\n```\n\n### Interactive Git Rebase\n```bash\ntmux new-session -d -s rebase -c \u002Frepo\u002Fpath git rebase -i HEAD~3\nsleep 0.5\ntmux capture-pane -t rebase -p  # See rebase editor\n# Send commands to modify rebase instructions\ntmux send-keys -t rebase 'Down' 'Home' 'squash' Escape\ntmux send-keys -t rebase ':wq' Enter\n```\n\n## Common Mistakes\n\n### Not Waiting After Session Start\n**Problem:** Capturing immediately after `new-session` shows blank screen\n\n**Fix:** Add brief sleep (100-500ms) before first capture\n```bash\ntmux new-session -d -s sess command\nsleep 0.3  # Let command initialize\ntmux capture-pane -t sess -p\n```\n\n### Forgetting Enter Key\n**Problem:** Commands typed but not executed\n\n**Fix:** Explicitly send Enter\n```bash\ntmux send-keys -t sess 'print(\"hello\")' Enter  # Note: Enter is separate argument\n```\n\n### Using Wrong Key Names\n**Problem:** `tmux send-keys -t sess '\\n'` doesn't work\n\n**Fix:** Use tmux key names: `Enter`, not `\\n`\n```bash\ntmux send-keys -t sess 'text' Enter  # ✓\ntmux send-keys -t sess 'text\\n'      # ✗\n```\n\n### Not Cleaning Up Sessions\n**Problem:** Orphaned tmux sessions accumulate\n\n**Fix:** Always kill sessions when done\n```bash\ntmux kill-session -t session_name\n# Or check for existing: tmux has-session -t name 2>\u002Fdev\u002Fnull\n```\n\n## Real-World Impact\n\n- Enables programmatic control of vim\u002Fnano for file editing\n- Allows automation of interactive git workflows (rebase, add -p)\n- Makes REPL-based testing\u002Fdebugging possible\n- Unblocks any tool that requires terminal interaction\n- No need to build custom PTY management - tmux handles it all\n","# Using tmux for Interactive Commands\n\n## Overview\n\nInteractive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal. tmux provides detached sessions that can be controlled programmatically via `send-keys` and `capture-pane`.\n\n## When to Use\n\n**Use tmux when:**\n- Running vim, nano, or other text editors programmatically\n- Controlling interactive REPLs (Python, Node, etc.)\n- Handling interactive git commands (`git rebase -i`, `git add -p`)\n- Working with full-screen terminal apps (htop, etc.)\n- Commands that require terminal control codes or readline\n\n**Don't use for:**\n- Simple non-interactive commands (use `Bash`)\n- Commands that accept input via stdin redirection\n- One-shot commands that don't need interaction\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Start session | `tmux new-session -d -s \u003Cname> \u003Ccommand>` |\n| Send input | `tmux send-keys -t \u003Cname> 'text' Enter` |\n| Capture output | `tmux capture-pane -t \u003Cname> -p` |\n| Stop session | `tmux kill-session -t \u003Cname>` |\n| List sessions | `tmux list-sessions` |\n\n## Core Pattern\n\n### Before (Won't Work)\n```bash\n# This hangs because vim expects interactive terminal\nbash -c \"vim file.txt\"\n```\n\n### After (Works)\n```bash\n# Create detached tmux session\ntmux new-session -d -s edit_session vim file.txt\n\n# Send commands (Enter, Escape are tmux key names)\ntmux send-keys -t edit_session 'i' 'Hello World' Escape ':wq' Enter\n\n# Capture what's on screen\ntmux capture-pane -t edit_session -p\n\n# Clean up\ntmux kill-session -t edit_session\n```\n\n## Implementation\n\n### Basic Workflow\n\n1. **Create detached session** with the interactive command\n2. **Wait briefly** for initialization (100-500ms depending on command)\n3. **Send input** using `send-keys` (can send special keys like Enter, Escape)\n4. **Capture output** using `capture-pane -p` to see current screen state\n5. **Repeat** steps 3-4 as needed\n6. **Terminate** session when done\n\n### Special Keys\n\nCommon tmux key names:\n- `Enter` - Return\u002Fnewline\n- `Escape` - ESC key\n- `C-c` - Ctrl+C\n- `C-x` - Ctrl+X\n- `Up`, `Down`, `Left`, `Right` - Arrow keys\n- `Space` - Space bar\n- `BSpace` - Backspace\n\n### Working Directory\n\nSpecify working directory when creating session:\n```bash\ntmux new-session -d -s git_session -c \u002Fpath\u002Fto\u002Frepo git rebase -i HEAD~3\n```\n\n### Helper Wrapper\n\nResolve [skills\u002Fuse-tmux\u002Fscripts\u002Ftmux-wrapper.mjs](scripts\u002Ftmux-wrapper.mjs)\nrelative to this loaded document. Declare that resolved path once, then use it:\n```bash\nWRAPPER=\"\u003Cresolved-tmux-wrapper.mjs>\"\n\n# Start session\nnode \"$WRAPPER\" start \u003Csession-name> \u003Ccommand> [args...]\n\n# Send input\nnode \"$WRAPPER\" send \u003Csession-name> 'text' Enter\n\n# Capture current state\nnode \"$WRAPPER\" capture \u003Csession-name>\n\n# Stop\nnode \"$WRAPPER\" stop \u003Csession-name>\n```\n\n## Common Patterns\n\n### Python REPL\n```bash\ntmux new-session -d -s python python3 -i\ntmux send-keys -t python 'import math' Enter\ntmux send-keys -t python 'print(math.pi)' Enter\ntmux capture-pane -t python -p  # See output\ntmux kill-session -t python\n```\n\n### Vim Editing\n```bash\ntmux new-session -d -s vim vim \u002Ftmp\u002Ffile.txt\nsleep 0.3  # Wait for vim to start\ntmux send-keys -t vim 'i' 'New content' Escape ':wq' Enter\n# File is now saved\n```\n\n### Interactive Git Rebase\n```bash\ntmux new-session -d -s rebase -c \u002Frepo\u002Fpath git rebase -i HEAD~3\nsleep 0.5\ntmux capture-pane -t rebase -p  # See rebase editor\n# Send commands to modify rebase instructions\ntmux send-keys -t rebase 'Down' 'Home' 'squash' Escape\ntmux send-keys -t rebase ':wq' Enter\n```\n\n## Common Mistakes\n\n### Not Waiting After Session Start\n**Problem:** Capturing immediately after `new-session` shows blank screen\n\n**Fix:** Add brief sleep (100-500ms) before first capture\n```bash\ntmux new-session -d -s sess command\nsleep 0.3  # Let command initialize\ntmux capture-pane -t sess -p\n```\n\n### Forgetting Enter Key\n**Problem:** Commands typed but not executed\n\n**Fix:** Explicitly send Enter\n```bash\ntmux send-keys -t sess 'print(\"hello\")' Enter  # Note: Enter is separate argument\n```\n\n### Using Wrong Key Names\n**Problem:** `tmux send-keys -t sess '\\n'` doesn't work\n\n**Fix:** Use tmux key names: `Enter`, not `\\n`\n```bash\ntmux send-keys -t sess 'text' Enter  # ✓\ntmux send-keys -t sess 'text\\n'      # ✗\n```\n\n### Not Cleaning Up Sessions\n**Problem:** Orphaned tmux sessions accumulate\n\n**Fix:** Always kill sessions when done\n```bash\ntmux kill-session -t session_name\n# Or check for existing: tmux has-session -t name 2>\u002Fdev\u002Fnull\n```\n\n## Real-World Impact\n\n- Enables programmatic control of vim\u002Fnano for file editing\n- Allows automation of interactive git workflows (rebase, add -p)\n- Makes REPL-based testing\u002Fdebugging possible\n- Unblocks any tool that requires terminal interaction\n- No need to build custom PTY management - tmux handles it all\n",{"name":5,"description":7},"main","728894f3f85fbd4e788f015ddfd72bb6155d5dd5","plugins\u002Fmoe\u002F.cursor-plugin\u002Fskills\u002Fuse-tmux",1,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe","https:\u002F\u002Fgithub.com\u002Fzak-keown","2026-09-05 06:29:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add zak-keown\u002Fmoe --skill use-tmux",{"tool":36,"command":37},"bunx","bunx skills add zak-keown\u002Fmoe --skill use-tmux",{"tool":39,"command":40},"pnpm","pnpm dlx skills add zak-keown\u002Fmoe --skill use-tmux","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.cursor-plugin\u002Fskills\u002Fuse-tmux\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"scripts\u002Ftmux-wrapper.mjs","SCRIPT","脚本",4020,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.cursor-plugin\u002Fskills\u002Fuse-tmux\u002Fscripts\u002Ftmux-wrapper.mjs",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7C1Z5362Y8NVRZ69HWP0ZD0","write-skill","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7C1YZ9966WK9R6ZRPCGWF3G","write-plan","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7C1YMR4SJD7BPBBPXZCVGVH","write-clearly","Apply Strunk's timeless writing rules to ANY prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-clearly\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7C1YH9805YSM0N20VQAVSXF","windows-vm","Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7C1YD87SCNEJ2C9B8HFR2NQ","verify-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating MRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fverify-completion\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M7C1YARDEHT0TJ9BRG30ZCF4","using-moe","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fusing-moe\u002FSKILL.md",[],[]]