Index of every page on this site: llms.txt
All skills
theprimeagen avatar

/tmux-dev

@fa570dd
by theprimeagentheprimeagen/skills237 stars
8
Run it yourself

Tmux-based dev.sh script conventions

  • 1 file
  • 1.8 KB
  • Updated 9 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/theprimeagen/skills/tmux-dev

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈12 tokens for metadata: the name and description. ≈445 when used: this file.

SKILL.md has missing or invalid fields
  • The name in the SKILL.md header is missing or is not text.
Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Tmux Dev Scripts

Rules

  1. Assign each long-running process (database, dev server, etc.) a dedicated high-numbered window (e.g. 8, 9) and kill any stale instance with tmux kill-window -t "$SESSION:$WIN" 2>/dev/null || true before creating a new one.
  • the highest number should be 9, so if there are 3 processes, 7, 8, and 9 should be the windows
  1. When a process must be healthy before the next step (e.g. Postgres before migrations), poll in a bounded loop (for i in $(seq 1 N)) with a sleep between attempts and exit 1 on timeout — never assume instant readiness.
  2. End every tmux new-window command string with ; exec bash so the window stays open for inspection if the process exits.

Example 1: Full dev.sh with database + worker

#!/usr/bin/env bash
set -euo pipefail

DIR="$(cd "$(dirname "$0")" && pwd)"
SESSION="${TMUX_SESSION:-$(tmux display-message -p '#S')}"
PG_WIN="8"
DEV_WIN="9"
LOCAL_DB="postgresql://postgres:postgres@localhost:54321/myapp"

for win in "$PG_WIN" "$DEV_WIN"; do
  tmux kill-window -t "$SESSION:$win" 2>/dev/null || true
done

tmux new-window -t "$SESSION:$PG_WIN" -n "postgres" -c "$DIR" "bun run db:local; exec bash"

echo "Waiting for postgres on port 54321..."
for i in $(seq 1 30); do
  if DATABASE_URL="$LOCAL_DB" bun run db:migrate 2>/dev/null; then break; fi
  if [ "$i" -eq 30 ]; then echo "Timed out waiting for postgres" >&2; exit 1; fi
  sleep 1
done
echo "Migrations applied."

tmux new-window -t "$SESSION:$DEV_WIN" -n "dev" -c "$DIR" "bun run dev; exec bash"

Example 2: Adding a third window (e.g. frontend dev server)

UI_WIN="7"
tmux kill-window -t "$SESSION:$UI_WIN" 2>/dev/null || true
tmux new-window -t "$SESSION:$UI_WIN" -n "ui" -c "$DIR" "bun run dev:ui; exec bash"

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at fa570dd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Dormantupdated 9 months ago
globs
dev.sh
alwaysApply
false

README badge

README badge for theprimeagen/skills/tmux-dev