Module 1: Foundations

tmux + Claude Code for Ops Work

Lesson 1.1 — Why tmux for Agentic Coding in RevOps / DevOps / SecOps

1. Lesson Overview

This lesson sets the mental model:

You're basically answering: "If I'm already in Cursor/VS Code with AI, why bother adding tmux?"

2. Lesson Deliverables

For learners

For you (course assets)

Architecture Diagram

Architecture: Laptop → SSH → tmux → Claude Code → Infrastructure

tmux Hierarchy

tmux Concept Hierarchy: Sessions → Windows → Panes

DORA Metrics Dashboard

DORA Metrics: AI-Amplified DevOps Performance

3. Step-by-Step Walkthrough

You can present this as an on-screen guided exercise.

Step 1 — Anchor definitions

tmux Definition

"tmux is a terminal multiplexer that lets you create and control multiple terminals from a single screen, detach them, and reattach later."

Claude Code Definition

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and executes routine tasks via natural language.

Have learners write those two definitions in their notes, in their own words.

Step 2 — Draw the architecture

Ask them to draw:

This visually anchors "tmux as the bus" for agentic workflows.

Step 3 — Connect to outcomes

Have them pick two metrics that matter:

DevOps

MTTR, deployment frequency, lead time, change failure rate. DORA's AI report explicitly frames AI as an amplifier for these.

SecOps

Time-to-detect, time-to-contain, number of untriaged alerts.

RevOps

Time-to-fix billing/reporting jobs, reliability of data pipelines that impact revenue.

Exercise: Your Commitment Statement

Write: "I'm adopting tmux + Claude Code to reduce X and improve Y in my role."

This becomes a recurring reference throughout the course.

4. Instructor Suggestions

Hook idea

Open with a live example: you drop Wi-Fi on your laptop while a migration runs, then reattach to tmux and show it kept going. (Great visceral "aha".)

Story angle

Briefly mention Anthropic's internal study: engineers delegate ~20% of tasks to Claude and up to half their work is AI-involved, but they're worried about skill atrophy and collaboration. Then pitch tmux as a structured way to use AI so humans stay in control.

B-roll suggestion

Overlay DORA's "AI as amplifier" phrasing when you connect to MTTR / deployments.

Lesson 1.2 — tmux Basics, Tuned for AI Workflows

1. Lesson Overview

Goal: give learners just enough tmux to comfortably live in it all day with Claude Code.

We focus on:

2. Lesson Deliverables

For learners

For you

tmux Keybindings Quick Reference

tmux Keybindings Quick Reference Download Keybindings Reference

3. Step-by-Step Walkthrough

Step 1 — Install & sanity-check

Have learners confirm:

tmux -V

If it prints a version, they're good. (If not, you can link out to OS-specific install instructions.)

Step 2 — Create & name a session

On screen, demo:

tmux new -s claude-foundations

Explain:

Ask learners to:

  1. Type a command (ls, pwd) so they see normal shell usage inside tmux.
  2. Hit Ctrl-b d to detach.
  3. Run tmux ls to see the session.
  4. Then tmux attach -t claude-foundations to reattach.

The "Always-On" Concept

This cements the "always-on" idea. Your session keeps running even when you disconnect!

Step 3 — Split panes (cheat sheet kata)

Show them the must-know bindings (default prefix Ctrl-b):

# Pane operations
Ctrl-b %     # vertical split
Ctrl-b "     # horizontal split
Ctrl-b arrows # move between panes
Ctrl-b x     # close pane

# Window operations
Ctrl-b c     # new window
Ctrl-b n/p   # next/previous window

60-Second Keybinding Challenge!

From inside claude-foundations:

  1. Hit Ctrl-b % (vertical split)
  2. Then Ctrl-b " (horizontal split in one side)
  3. Move between panes with Ctrl-b + arrows
  4. Close one pane with Ctrl-b x

Can you do it in 60 seconds?

Step 4 — Minimal .tmux.conf for AI sessions

Walk through creating this file:

nano ~/.tmux.conf

Suggested contents (basic starter):

# Make history deep enough for AI logs
set -g history-limit 100000

# Mouse: easier resizing and selecting when teaching
set -g mouse on

# Keep window names stable
setw -g allow-rename off

# Better resizing behaviour over SSH
setw -g aggressive-resize on

Then have learners reload config:

tmux source-file ~/.tmux.conf

or just start a fresh session.

Advanced Configuration

Once you're comfortable with the basics, try this production-ready config with vi-mode, backtick prefix, and clean status bar:

tmux.conf (Advanced Ops Config)

Features: Backtick prefix for faster access, vi-mode navigation, clean minimal status bar, sensible split keybindings (v/h), and optimized history.

Note on Advanced Config

The advanced config uses backtick (`) as the prefix instead of Ctrl-b. This is faster for heavy tmux users but takes adjustment. To send a literal backtick, press ` ` (backtick twice).

4. Instructor Suggestions

Show Keyboard Overlay

On video, zoom in on keyboard overlay (or pop-up text) when showing prefix combos. This is where people usually get lost.

Keep It Simple

Emphasize that this is the only tmux they need today—you're intentionally not going into copy-mode or scripting yet. Reassure: "If you can split panes and reattach, you're ready for Claude."

Lesson 1.3 — Installing & Configuring Claude Code in tmux

1. Lesson Overview

Now we connect the pieces:

2. Lesson Deliverables

For learners

For you

Two-Pane Workflow Diagram

Safe AI Workflow: Two-Pane Philosophy

3. Step-by-Step Walkthrough

Note on Installation

Installation details may vary by platform. Stick to the official docs for commands and keep it high-level on camera.

Step 1 — Install Claude Code (or confirm it's installed)

Refer viewers to the official install page and show the key verification command:

claude --version
claude help

Explain:

Step 2 — Create a Claude session in tmux

In the terminal:

tmux new -s claude-devops

Inside pane 1:

cd /path/to/your/demo-repo
claude

Explain:

Then split a second pane (Ctrl-b " or Ctrl-b %) for manual command execution.

Two-Pane Philosophy

Pane 1: we discuss and plan with Claude.
Pane 2: we run commands and inspect output.

This physical separation is straight out of Anthropic's best-practices: keep AI-proposed actions visible and under human control.

Step 3 — Configure Claude for a repo (first workflow)

From Anthropic's "Best practices for agentic coding": you get better results if you teach Claude your tools and constraints and document them in the repo (e.g. CLAUDE.md).

Have learners inside the repo, create CLAUDE.md with:

# Claude Context for this Repo
## Project overview
- This is a simple CI pipeline config repo for ...
## Tools and constraints
- We run GitHub Actions for CI.
- Production secrets are in 1Password (never commit).
## Common tasks Claude can help with
- Explain a failing pipeline step.
- Generate test stubs.
- Draft incident postmortems.

When Claude starts, it will read this file and tailor suggestions.

Ready-to-Use Prompts

Use this operations copilot prompt to set boundaries and expectations with Claude for ops work:

Ops Copilot Prompt

A system prompt that establishes Claude as your operations copilot with clear guidelines: explain reasoning, propose (don't run) commands, warn about risks, and prefer small safe steps.

Using the Prompt

You can paste this at the start of your Claude session, or save it to your repo's CLAUDE.md file so Claude picks it up automatically when you run claude in that directory.

Step 4 — First real mini-task

Have the learner ask Claude:

I want to check the status of our CI pipeline and summarize any recent failures. 
What commands should I run?

Claude will respond with something like:

# In pane 2:
gh run list --limit 5

The learner copies, pastes to pane 2, runs, and pastes output back into pane 1 for further analysis.

Exercise: Your First AI-Assisted Task

  1. Create a session claude-devops with 2 panes.
  2. In pane 1, start Claude and ask it to check CI status (or any DevOps/SecOps/RevOps task you do weekly).
  3. Run the command Claude suggests in pane 2.
  4. Paste output back into pane 1 for summary.
  5. Save the transcript in notes/first-session.md.

4. Instructor Suggestions

Guardrails Matter

The official Anthropic guidance says Claude Code has agentic permissions (Read/Write/Bash). Emphasize that the two-pane workflow is about respecting those powers but keeping a human checkpoint.

Warning about Secrets

Remind learners: if they paste logs that contain API keys or passwords, Claude will see them. This is a human hygiene issue, not a tmux issue, but good to mention.