Agent skill

Sesh Terminal Sessions

by joshmedeski in joshmedeski/sesh

Starts work in tmux sessions and windows through sesh instead of raw tmux commands, resolving names, directories, zoxide results and configured sessions.

MITAuto-check passedProductivity & Automation

Install Sesh Terminal Sessions

skills CLI
$ npx skills add joshmedeski/sesh --skill sesh -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install joshmedeski/sesh sesh --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/joshmedeski/sesh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sesh .claude/skills/sesh && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sesh
GitHub stars
2.9k
Token cost
~2.3k tokens
SKILL.md length
960 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Starts work in tmux sessions and windows through sesh instead of raw tmux commands, resolving names, directories, zoxide results and configured sessions.

  • Opening a project or directory in a terminal session
  • SKILL.md covers Session or window?, Sessions, Windows and Focus: don't yank the user out…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Connecting to an existing session by name

What it does

When work needs to start somewhere other than the current shell, the agent is told to call sesh rather than tmux. Sesh resolves a rough name or a directory to the right session, starts it from its configured root with its startup commands, reuses what is already running and decides whether to move you or leave you where you are. If sesh is not on the PATH, the agent falls back to raw tmux.

The first decision is session versus window. A session suits a unit of work with its own directory, through sesh connect with a path or name, and a window suits work that belongs inside a session that already exists, through sesh window connect, for example a second track such as tests, logs, an agent or a dev server. Both select or create, so they are safe to run without checking first. The connect command accepts a path, a session name, a zoxide result, a configured session or a tmuxinator config.

When your agent uses it

  • Opening a project or directory in a terminal session
  • Connecting to an existing session by name
  • Running a command or coding agent in another session or window
  • Cloning a repo to work in

Example prompts

  • “Open my dotfiles project in a sesh session.”
  • “Run the test watcher in a new window of my current session.”
  • “Start a Claude session in my second brain session.”

Requirements

  • sesh on the PATH, with tmux

What it can do on your machine

Read from SKILL.md and the folder at commit 59b8478. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sesh Terminal Sessions loads about 2.3k tokens when it runs. Until then it costs about 101 tokens; SKILL.md has 960 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from joshmedeski/sesh at commit 59b8478, republished under its MIT licence (© joshmedeski). 960 words, ~2,314 tokens.

Download SKILL.mdSave it as .claude/skills/sesh/SKILL.md (or your agent's skills folder).
name
sesh
description
Use when starting work in a terminal session — opening a project or directory, connecting to a session by name, cloning a repo to work in, or running a command or coding agent somewhere other than the current shell. Sesh resolves names and directories to sessions across tmux, zoxide, config, and tmuxinator. Use instead of `tmux new-session`, `tmux new-window`, `tmux attach`, or `tmux send-keys`.

Starting work with sesh

When work needs to start somewhere other than the shell you're in, call sesh, not tmux.

Reaching for tmux new-session -s <name> or tmux new-window -t <session> throws away what the user set sesh up to do: resolve a rough name or a directory to the right session, start it from its configured root with its startup commands, reuse what's already running instead of duplicating it, and decide whether to move the user or leave them where they are.

If sesh is not on PATH, fall back to raw tmux. Otherwise use the commands below.

Session or window?

This is the first decision, and the one most worth getting right.

A session per unit of work. That's the model — a project, a repo, a directory. If the work has its own directory, it wants its own session:

bash
sesh connect ~/c/sesh
sesh connect sesh          # a name works too; sesh resolves it

A window when it belongs inside a context that already exists. Reach for a window when the work is part of a session that's already running rather than a thing of its own:

bash
sesh window connect claude -t 'second brain' -c 'claude "<prompt>"'

Good reasons to add a window instead of a session:

  • The user named a session to put it in ("in my dotfiles session", "next to what I'm working on")
  • The work is a second track in the same project — tests, logs, an agent, a dev server — and the session for that project is already open
  • You're already inside the right session and just need another place to run something

If neither applies, use a session. Don't create a window in an unrelated session just because that session happens to be attached.

Either way, both commands select-or-create: they reuse what's there and only create on a miss, so it's safe to run them without checking first.

Sessions

bash
sesh connect <name|directory>

Connects to the session, creating it if it isn't running. The argument can be a path, a session name, a zoxide result, a configured session, or a tmuxinator config — sesh resolves across all of them, which is the main reason to call it instead of tmux.

bash
sesh connect ~/c/sesh              # by path
sesh connect sesh                  # by rough name
sesh connect 'second brain' -s     # names with spaces need quoting
sesh connect ~/c/api -c 'npm run dev'
FlagMeaning
-s, --switchSwitch the client rather than attach. Use when triggering sesh from outside the terminal — a hotkey, a script, another app.
-c, --commandStartup command. Only runs on a cold start — silently ignored if the session already exists.
-T, --tmuxinatorStart via tmuxinator if the session isn't running.

That -c caveat is the sharp edge: if the user might already have the session open, sesh connect -c may do nothing at all. To run a command in a session that may already be running, add a window (next section).

Two related entry points, for when the directory doesn't exist yet:

bash
sesh mkdir ~/c/new-project -c '<command>'   # create the directory, then connect to it
sesh clone <repo>                           # clone a git repo and connect to it

Use sesh mkdir rather than mkdir && sesh connect — it's one step and doesn't wait on zoxide.

Windows

bash
sesh window connect <name|directory> -t <session> -c '<command>'

Selects the window called <name> in <session>, creating it if it isn't there. Prints the window's session:index target.

bash
sesh window connect tests -c 'npm test -- --watch'   # in the current session
sesh window connect ~/c/sesh -t dotfiles             # window "sesh", rooted at that path

A directory argument is named after its basename and rooted there, so running it twice selects the window the first run created rather than duplicating it.

--command means different things on create and reuse

Identity is the window name:

  • Created window — the command becomes the window's process. The window closes when it exits.
  • Existing window — the command is typed in as keystrokes, into whatever is already running. If that's a shell, it runs. If it's a long-running process, you just typed at that process.

So launching an agent twice with the same window name starts one agent, then types the second prompt into the first agent's input. When each invocation must get its own window, pass --new:

bash
sesh window connect claude -t 'second brain' --new -c 'claude "<prompt>"'

--new always creates, letting windows share a name; a later connect without it reuses the lowest-indexed one. Omitting the name also always creates — there's nothing to match on.

Show full SKILL.md (341 more words)Show less
Targeting

-t <session> resolves the same way sesh connect does and starts the session if it isn't running, without moving the user's client. So you don't have to check whether the session is up, and cold and warm targets take the same command.

With no -t, the target is the attached session. Outside tmux that fails with Not inside a tmux session, use --target to specify one. — pass -t.

Focus: don't yank the user out of their work

Both commands move the user to what they connected to. That's right when they asked for it and wrong when it's a background step.

SituationFlag
The user asked for this and wants to land there(default)
Background work; leave them where they are-b (windows only)
Triggered from outside tmux — hotkey, script, another app-s

-b / --background creates the window without selecting it or moving the client. Prefer it for anything the user didn't explicitly ask to be taken to. Sessions have no -b; a window connect with -t is the way to set something up without moving.

Finding the right target

Don't guess a session name and don't invent one:

bash
sesh list -j                       # every source: tmux, zoxide, config, tmuxinator
sesh list -t                       # running tmux sessions only
sesh window list -t <session>      # windows in a session (-j for json)

When the user names a project or directory, pass what they said — sesh resolves it. Session names contain spaces (second brain) more often than you'd expect, so quote arguments.

Do not

  • Do not use tmux new-session, tmux attach, tmux new-window, or tmux split-window to start work. Use sesh connect or sesh window connect.
  • Do not use tmux send-keys to run a command. Use -c, which knows whether the target is new or already running.
  • Do not create a second session for a directory or name that already has one — both commands already select-or-create.
  • Do not put unrelated work in a window of whatever session happens to be attached. New work with its own directory gets its own session.
  • Do not guess session names. Run sesh list.
  • Do not move the user for background work. Use -b.

Panes are outside sesh's scope; tmux split-window and tmux send-keys remain correct there.

Command reference

sesh connect <name|directory>          Connect to a session, creating it if it doesn't exist
  -s, --switch             Switch the client rather than attach
  -c, --command <cmd>      Startup command; ignored if the session already exists
  -T, --tmuxinator         Start via tmuxinator if the session isn't running

sesh mkdir <path>                      Create a directory and connect to it as a session
  -c, --command <cmd>      Startup command
  -s, --switch             Switch rather than attach

sesh clone <repo>                      Clone a git repo and connect to it as a session
  -d, --dir <name>         Directory git creates
  -c, --cmdDir <dir>       Directory to run git in

sesh window connect [name|directory]   Select a window, creating it if it doesn't exist
  -t, --target <session>   Target session (default: current attached session)
  -c, --command <cmd>      Command to run in the target
  -p, --path <dir>         Start directory (default: the target session's root)
  -b, --background         Create without selecting it or moving the client
  -s, --switch             Switch the client rather than attach
      --new                Always create, even when the name matches an existing window

sesh window list                       List the windows of a session
  -t, --target <session>   Target session (default: current attached session)
  -j, --json               Output as json

sesh list                              List sessions from all sources
  -j, --json               Output as json
  -t, --tmux               tmux sessions only
  -z, --zoxide             zoxide results only

sesh last                              Connect to the last tmux session
sesh root                              Print the root directory of the active session

© joshmedeski, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/sesh of joshmedeski/sesh.

Open the folder on GitHubat commit 59b8478

Compare with similar skills

Sesh Terminal Sessions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sesh Terminal Sessions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sesh Terminal Sessions this skilljoshmedeski/sesh2.9k—~2.3kAutomated safety check: PassMIT
QAteam-attention/hoyeon173—~2.6kAutomated safety check: NotesMIT
TuiosGaurav-Gosain/tuios5.1k—~3.7kAutomated safety check: PassMIT
Kanvibe Release Deployrookedsysc/kanvibe143—~12kAutomated safety check: NotesAGPL-3.0
Council Executionhex/claude-council851—~824Automated safety check: PassMIT
Drive Screencoleam00/skills674—~5.4kAutomated safety check: PassMIT

Similar skills

  • QA

    team-attention/hoyeon

    Systematically QA test any application — web apps, native macOS apps, Electron apps, CLI tools, interactive REPLs, or anything on screen.

    173 GitHub stars~2.6k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check: notes
  • Tuios

    Gaurav-Gosain/tuios

    Drive tuios from inside one of its panes. An agent skill from Gaurav-Gosain/tuios.

    5.1k GitHub stars~3.7k tokensUpdated yesterday
    MobileAuto-check passed
  • Kanvibe Release Deploy

    rookedsysc/kanvibe

    A skill your agent uses whenever releasing or deploying KanVibe desktop from a clean, up-to-date dev checkout: ask only for the target version and release-note approval, then let the AI update…

    143 GitHub stars~12k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Council Execution

    hex/claude-council

    Executes council queries by running the query pipeline across selected AI providers (Gemini, OpenAI, Grok, Perplexity), displaying formatted responses verbatim, and generating a synthesis of…

    851 GitHub stars~824 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Drive Screen

    coleam00/skills

    Take real control of the desktop - list and focus windows, type, paste, click, scroll, and screenshot - on Windows, macOS or Linux, and drive other coding-agent sessions running in terminals.

    674 GitHub stars~5.4k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Turns a described workflow preference into cmux keyboard shortcut bindings, proposing templates such as tmux-style or Vim-style and applying only what the user picks.

    28k GitHub starsUsed in 1 repo~3.1k tokens
    Productivity & AutomationAuto-check passed

More from joshmedeski/sesh

  • Checks that every TOML field added, renamed or removed in Go code has a matching update in sesh's JSON schema, so TOML editors don't reject valid config with a schema error.

    2.9k GitHub stars~731 tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Sesh Terminal Sessions

What does Sesh Terminal Sessions do?

Starts work in tmux sessions and windows through sesh instead of raw tmux commands, resolving names, directories, zoxide results and configured sessions. When work needs to start somewhere other than the current shell, the agent is told to call sesh rather than tmux. Sesh resolves a rough name or a directory to the right session, starts it from its configured root with its startup commands, reuses what is already running and decides whether to move you or leave you where you are.

When should I use Sesh Terminal Sessions?

Sesh Terminal Sessions fits situations like: opening a project or directory in a terminal session; connecting to an existing session by name; running a command or coding agent in another session or window; cloning a repo to work in.

How do I install Sesh Terminal Sessions in Claude Code?

Run `npx skills add joshmedeski/sesh --skill sesh -a claude-code`. Or copy the skill folder (skills/sesh in joshmedeski/sesh) into .claude/skills/sesh in your project. Claude Code loads it when a task matches its description.

How do I install Sesh Terminal Sessions in Codex?

Run `npx skills add joshmedeski/sesh --skill sesh -a codex`. Or copy the skill folder (skills/sesh in joshmedeski/sesh) into .agents/skills/sesh in your project. Codex loads it when a task matches its description.

Can I use Sesh Terminal Sessions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add joshmedeski/sesh --skill sesh -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sesh, .gemini/skills/sesh, .github/skills/sesh and .opencode/skills/sesh in your project.

What does Sesh Terminal Sessions need to run?

SKILL.md names no scripts, command-line tools or credentials: Sesh Terminal Sessions is instructions for the agent only. Our summary lists: sesh on the PATH, with tmux.

Does Sesh Terminal Sessions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sesh Terminal Sessions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sesh Terminal Sessions use?

Sesh Terminal Sessions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sesh Terminal Sessions use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sesh Terminal Sessions?

Skills that share tags, products or a category with Sesh Terminal Sessions: QA (team-attention/hoyeon, 173 stars), Tuios (Gaurav-Gosain/tuios, 5.1k stars), Kanvibe Release Deploy (rookedsysc/kanvibe, 143 stars) and Council Execution (hex/claude-council, 851 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sesh Terminal Sessions?

joshmedeski (a GitHub user) maintains it in joshmedeski/sesh, which has 2,862 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: joshmedeski/sesh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.