[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M744EH0MYC30EM51E60N0CD2":3,"skill-same:01M744EH0MYC30EM51E60N0CD2":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M744EH0MYC30EM51E60N0CD2","tmux",null,"Remote control tmux sessions for interactive CLIs, background tasks, and services. Supports sub-tasks, long-running processes, and service management with session persistence and automatic cleanup.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: tmux\ndescription: \"Remote control tmux sessions for interactive CLIs, background tasks, and services. Supports sub-tasks, long-running processes, and service management with session persistence and automatic cleanup.\"\nlicense: MIT\n---\n\n# tmux Skill\n\nUse tmux as a programmable terminal multiplexer for interactive work, background tasks, and service management. Works on Linux and macOS with stock tmux; uses a private socket to avoid interfering with your personal tmux configuration.\n\n## Quickstart (isolated socket)\n\n```bash\n# Create a new session\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create my-task \"echo 'Hello World'\" task\n\n# List all sessions\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\n\n# Capture output\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-my-task-20250107-123456\n\n# Kill a session\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-my-task-20250107-123456\n```\n\n## Socket Convention\n\n- **Socket Directory**: `${TMPDIR:-\u002Ftmp}\u002Fpi-tmux-sockets`\n- **Default Socket**: `\u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock`\n- **Environment Variable**: `PI_TMUX_SOCKET_DIR` (optional override)\n\nAll Agent sessions use a private socket to avoid conflicts with your personal tmux configuration.\n\n## Session Naming\n\nSessions are named using the pattern: `pi-{category}-{name}-{timestamp}`\n\n- **Categories**:\n  - `task`: Temporary sub-tasks (compilation, testing)\n  - `service`: Long-running services (dev servers, databases)\n  - `agent`: Agent-specific tasks (training, data processing)\n\n- **Examples**:\n  - `pi-task-compile-20250107-123456`\n  - `pi-service-dev-server-20250107-123456`\n  - `pi-agent-training-20250107-123456`\n\n## CLI Commands\n\n### Create Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create \u003Cname> \u003Ccommand> [category]\n```\n\nCreates a new tmux session and automatically prints the monitoring command.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create compile \"make clean && make all\" task\n```\n\n### List Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list [filter]\n```\n\nLists all sessions with status and last activity time.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list service\n```\n\n### Session Status\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts status \u003Cid>\n```\n\nShows detailed information about a session.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts status pi-task-compile-20250107-123456\n```\n\n### Send Keys\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send \u003Cid> \u003Ckeys>\n```\n\nSends keystrokes to a session. Uses literal mode to avoid shell escaping.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"print('Hello')\"\n```\n\n### Capture Output\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture \u003Cid> [lines]\n```\n\nCaptures pane output (default: 200 lines).\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456 500\n```\n\n### Kill Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill \u003Cid>\n```\n\nTerminates a tmux session.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-compile-20250107-123456\n```\n\n### Cleanup Old Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup [hours]\n```\n\nRemoves inactive sessions older than the specified age (default: 24 hours).\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup 48\n```\n\n### Attach to Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts attach \u003Cid>\n```\n\nPrints the command to attach to a session interactively.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts attach pi-task-python-20250107-123456\n# Output: tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-task-python-20250107-123456\n```\n\n### Sync Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts sync\n```\n\nSynchronizes session status with tmux actual state.\n\n## Session Persistence\n\nSession information is stored in `${TMPDIR:-\u002Ftmp}\u002Fpi-tmux-sessions.json`. This allows:\n- Cross-session recovery\n- State tracking across Agent restarts\n- Automatic cleanup of stale sessions\n\n**Storage Format**:\n```json\n{\n  \"sessions\": {\n    \"pi-task-compile-20250107-123456\": {\n      \"id\": \"pi-task-compile-20250107-123456\",\n      \"name\": \"compile\",\n      \"category\": \"task\",\n      \"socket\": \"\u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock\",\n      \"target\": \"pi-task-compile-20250107-123456:0.0\",\n      \"command\": \"make clean && make all\",\n      \"status\": \"running\",\n      \"createdAt\": \"2025-01-07T12:34:56Z\",\n      \"lastActivityAt\": \"2025-01-07T12:35:00Z\"\n    }\n  },\n  \"lastSync\": \"2025-01-07T12:35:00Z\"\n}\n```\n\n## Use Cases\n\n### Sub-task Execution\nExecute temporary tasks that require monitoring:\n\n```bash\n# Start compilation\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create compile \"make all\" task\n\n# Wait for completion (in script)\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456 | grep \"Build successful\"\n\n# Get result\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456\n\n# Cleanup\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-compile-20250107-123456\n```\n\n### Long-running Tasks\nRun tasks in the background and check progress later:\n\n```bash\n# Start training\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create training \"python train.py --epochs 100\" task\n\n# Check progress later\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-training-20250107-123456\n```\n\n### Service Management\nStart development servers or services:\n\n```bash\n# Start dev server\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create dev-server \"npm run dev\" service\n\n# Monitor logs\ntmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-service-dev-server-20250107-123456\n\n# Stop when done\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-service-dev-server-20250107-123456\n```\n\n### Interactive Tools\nUse interactive tools like Python REPL, gdb, or databases:\n\n```bash\n# Python REPL (always use PYTHON_BASIC_REPL=1)\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create python \"PYTHON_BASIC_REPL=1 python3 -q\" task\n\n# Send commands\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"print('Hello')\"\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"2 + 2\"\n```\n\n## Status Detection\n\nSessions have three possible states:\n- **running**: Process is active with recent output\n- **idle**: Process exists but no recent output\n- **exited**: Process has terminated\n\nStatus is automatically synced with tmux actual state.\n\n## Automatic Cleanup\n\nBy default, sessions inactive for more than 24 hours are automatically cleaned up. You can:\n\n- Trigger manual cleanup:\n  ```bash\n  bun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup [hours]\n  ```\n\n- Disable auto-cleanup in code:\n  ```typescript\n  const tmux = new TmuxManager({ autoCleanup: false });\n  ```\n\n## Helper Scripts\n\n### wait-for-text.sh\nPolls a pane for a regex pattern with timeout.\n\n```bash\n.\u002Fscripts\u002Fwait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t\u002F--target`: Pane target (required)\n- `-p\u002F--pattern`: Regex to match (required); add `-F` for fixed string\n- `-T`: Timeout in seconds (default: 15)\n- `-i`: Poll interval in seconds (default: 0.5)\n- `-l`: History lines to search (default: 1000)\n\n### find-sessions.sh\nLists tmux sessions with metadata.\n\n```bash\n.\u002Fscripts\u002Ffind-sessions.sh -S \"$SOCKET\"\n.\u002Fscripts\u002Ffind-sessions.sh --all  # Scan all sockets\n```\n\n## Examples\n\nSee the `examples\u002F` directory for complete examples:\n- `python-repl.ts`: Interactive Python REPL\n- `long-task.ts`: Long-running task with progress\n- `start-service.ts`: Service management\n\n## TypeScript API\n\nYou can also use the TypeScript API directly:\n\n```typescript\nimport { TmuxManager } from \"~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts\";\n\nconst tmux = new TmuxManager();\n\n\u002F\u002F Create session\nconst session = await tmux.createSession('compile', 'make all', 'task');\n\n\u002F\u002F Wait for output\nconst success = await tmux.waitForText(session.target, 'Build successful', { timeout: 60 });\n\n\u002F\u002F Capture output\nconst output = await tmux.capturePane(session.target, 200);\n\n\u002F\u002F Cleanup\nawait tmux.killSession(session.id);\n```\n\n## Monitoring Sessions\n\nAfter creating a session, ALWAYS tell the user how to monitor it:\n\n```\nTo monitor this session yourself:\n  tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-task-compile-20250107-123456\n\nOr to capture the output once:\n  tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock capture-pane -p -J -t pi-task-compile-20250107-123456:0.0 -S -200\n```\n\nThis must be printed immediately after session creation and at the end of the tool loop.\n\n## Security Considerations\n\n- Uses private socket path to avoid conflicts\n- Sends keys in literal mode (`-l`) to prevent shell injection\n- Checks tmux actual state before cleanup\n- Requires explicit confirmation for destructive operations\n\n## Troubleshooting\n\n### Session not found\nRun sync to update session state:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts sync\n```\n\n### Cannot attach to session\nEnsure tmux is installed and the socket path is correct:\n```bash\ntmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t \u003Csession-id>\n```\n\n### Sessions not cleaning up\nManually trigger cleanup:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup\n```\n\n### Permission denied on socket\nCheck socket directory permissions:\n```bash\nls -la \u002Ftmp\u002Fpi-tmux-sockets\u002F\n```\n\n## Requirements\n\n- tmux (Linux\u002FmacOS)\n- Bun runtime\n- Bash (for helper scripts)","# tmux Skill\n\nUse tmux as a programmable terminal multiplexer for interactive work, background tasks, and service management. Works on Linux and macOS with stock tmux; uses a private socket to avoid interfering with your personal tmux configuration.\n\n## Quickstart (isolated socket)\n\n```bash\n# Create a new session\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create my-task \"echo 'Hello World'\" task\n\n# List all sessions\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\n\n# Capture output\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-my-task-20250107-123456\n\n# Kill a session\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-my-task-20250107-123456\n```\n\n## Socket Convention\n\n- **Socket Directory**: `${TMPDIR:-\u002Ftmp}\u002Fpi-tmux-sockets`\n- **Default Socket**: `\u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock`\n- **Environment Variable**: `PI_TMUX_SOCKET_DIR` (optional override)\n\nAll Agent sessions use a private socket to avoid conflicts with your personal tmux configuration.\n\n## Session Naming\n\nSessions are named using the pattern: `pi-{category}-{name}-{timestamp}`\n\n- **Categories**:\n  - `task`: Temporary sub-tasks (compilation, testing)\n  - `service`: Long-running services (dev servers, databases)\n  - `agent`: Agent-specific tasks (training, data processing)\n\n- **Examples**:\n  - `pi-task-compile-20250107-123456`\n  - `pi-service-dev-server-20250107-123456`\n  - `pi-agent-training-20250107-123456`\n\n## CLI Commands\n\n### Create Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create \u003Cname> \u003Ccommand> [category]\n```\n\nCreates a new tmux session and automatically prints the monitoring command.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create compile \"make clean && make all\" task\n```\n\n### List Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list [filter]\n```\n\nLists all sessions with status and last activity time.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list service\n```\n\n### Session Status\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts status \u003Cid>\n```\n\nShows detailed information about a session.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts status pi-task-compile-20250107-123456\n```\n\n### Send Keys\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send \u003Cid> \u003Ckeys>\n```\n\nSends keystrokes to a session. Uses literal mode to avoid shell escaping.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"print('Hello')\"\n```\n\n### Capture Output\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture \u003Cid> [lines]\n```\n\nCaptures pane output (default: 200 lines).\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456 500\n```\n\n### Kill Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill \u003Cid>\n```\n\nTerminates a tmux session.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-compile-20250107-123456\n```\n\n### Cleanup Old Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup [hours]\n```\n\nRemoves inactive sessions older than the specified age (default: 24 hours).\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup 48\n```\n\n### Attach to Session\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts attach \u003Cid>\n```\n\nPrints the command to attach to a session interactively.\n\n**Example**:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts attach pi-task-python-20250107-123456\n# Output: tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-task-python-20250107-123456\n```\n\n### Sync Sessions\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts sync\n```\n\nSynchronizes session status with tmux actual state.\n\n## Session Persistence\n\nSession information is stored in `${TMPDIR:-\u002Ftmp}\u002Fpi-tmux-sessions.json`. This allows:\n- Cross-session recovery\n- State tracking across Agent restarts\n- Automatic cleanup of stale sessions\n\n**Storage Format**:\n```json\n{\n  \"sessions\": {\n    \"pi-task-compile-20250107-123456\": {\n      \"id\": \"pi-task-compile-20250107-123456\",\n      \"name\": \"compile\",\n      \"category\": \"task\",\n      \"socket\": \"\u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock\",\n      \"target\": \"pi-task-compile-20250107-123456:0.0\",\n      \"command\": \"make clean && make all\",\n      \"status\": \"running\",\n      \"createdAt\": \"2025-01-07T12:34:56Z\",\n      \"lastActivityAt\": \"2025-01-07T12:35:00Z\"\n    }\n  },\n  \"lastSync\": \"2025-01-07T12:35:00Z\"\n}\n```\n\n## Use Cases\n\n### Sub-task Execution\nExecute temporary tasks that require monitoring:\n\n```bash\n# Start compilation\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create compile \"make all\" task\n\n# Wait for completion (in script)\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456 | grep \"Build successful\"\n\n# Get result\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-compile-20250107-123456\n\n# Cleanup\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-task-compile-20250107-123456\n```\n\n### Long-running Tasks\nRun tasks in the background and check progress later:\n\n```bash\n# Start training\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create training \"python train.py --epochs 100\" task\n\n# Check progress later\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts list\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts capture pi-task-training-20250107-123456\n```\n\n### Service Management\nStart development servers or services:\n\n```bash\n# Start dev server\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create dev-server \"npm run dev\" service\n\n# Monitor logs\ntmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-service-dev-server-20250107-123456\n\n# Stop when done\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts kill pi-service-dev-server-20250107-123456\n```\n\n### Interactive Tools\nUse interactive tools like Python REPL, gdb, or databases:\n\n```bash\n# Python REPL (always use PYTHON_BASIC_REPL=1)\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts create python \"PYTHON_BASIC_REPL=1 python3 -q\" task\n\n# Send commands\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"print('Hello')\"\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts send pi-task-python-20250107-123456 \"2 + 2\"\n```\n\n## Status Detection\n\nSessions have three possible states:\n- **running**: Process is active with recent output\n- **idle**: Process exists but no recent output\n- **exited**: Process has terminated\n\nStatus is automatically synced with tmux actual state.\n\n## Automatic Cleanup\n\nBy default, sessions inactive for more than 24 hours are automatically cleaned up. You can:\n\n- Trigger manual cleanup:\n  ```bash\n  bun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup [hours]\n  ```\n\n- Disable auto-cleanup in code:\n  ```typescript\n  const tmux = new TmuxManager({ autoCleanup: false });\n  ```\n\n## Helper Scripts\n\n### wait-for-text.sh\nPolls a pane for a regex pattern with timeout.\n\n```bash\n.\u002Fscripts\u002Fwait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t\u002F--target`: Pane target (required)\n- `-p\u002F--pattern`: Regex to match (required); add `-F` for fixed string\n- `-T`: Timeout in seconds (default: 15)\n- `-i`: Poll interval in seconds (default: 0.5)\n- `-l`: History lines to search (default: 1000)\n\n### find-sessions.sh\nLists tmux sessions with metadata.\n\n```bash\n.\u002Fscripts\u002Ffind-sessions.sh -S \"$SOCKET\"\n.\u002Fscripts\u002Ffind-sessions.sh --all  # Scan all sockets\n```\n\n## Examples\n\nSee the `examples\u002F` directory for complete examples:\n- `python-repl.ts`: Interactive Python REPL\n- `long-task.ts`: Long-running task with progress\n- `start-service.ts`: Service management\n\n## TypeScript API\n\nYou can also use the TypeScript API directly:\n\n```typescript\nimport { TmuxManager } from \"~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts\";\n\nconst tmux = new TmuxManager();\n\n\u002F\u002F Create session\nconst session = await tmux.createSession('compile', 'make all', 'task');\n\n\u002F\u002F Wait for output\nconst success = await tmux.waitForText(session.target, 'Build successful', { timeout: 60 });\n\n\u002F\u002F Capture output\nconst output = await tmux.capturePane(session.target, 200);\n\n\u002F\u002F Cleanup\nawait tmux.killSession(session.id);\n```\n\n## Monitoring Sessions\n\nAfter creating a session, ALWAYS tell the user how to monitor it:\n\n```\nTo monitor this session yourself:\n  tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t pi-task-compile-20250107-123456\n\nOr to capture the output once:\n  tmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock capture-pane -p -J -t pi-task-compile-20250107-123456:0.0 -S -200\n```\n\nThis must be printed immediately after session creation and at the end of the tool loop.\n\n## Security Considerations\n\n- Uses private socket path to avoid conflicts\n- Sends keys in literal mode (`-l`) to prevent shell injection\n- Checks tmux actual state before cleanup\n- Requires explicit confirmation for destructive operations\n\n## Troubleshooting\n\n### Session not found\nRun sync to update session state:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts sync\n```\n\n### Cannot attach to session\nEnsure tmux is installed and the socket path is correct:\n```bash\ntmux -S \u002Ftmp\u002Fpi-tmux-sockets\u002Fpi.sock attach -t \u003Csession-id>\n```\n\n### Sessions not cleaning up\nManually trigger cleanup:\n```bash\nbun ~\u002F.pi\u002Fagent\u002Fskills\u002Ftmux\u002Flib.ts cleanup\n```\n\n### Permission denied on socket\nCheck socket directory permissions:\n```bash\nls -la \u002Ftmp\u002Fpi-tmux-sockets\u002F\n```\n\n## Requirements\n\n- tmux (Linux\u002FmacOS)\n- Bun runtime\n- Bash (for helper scripts)",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill tmux",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill tmux",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill tmux","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux\u002FSKILL.md",true,[48,54,60],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"lib.ts","SCRIPT","脚本",12721,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux\u002Flib.ts",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"skill-report.json","REFERENCE","参考文档",215089,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux\u002Fskill-report.json",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"tsconfig.json",345,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Ftmux__skills-dwsy-tmux\u002Ftsconfig.json",[65,73,80,87,94,101],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":72},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":72},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":72},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":72},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":72},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":72},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]