Agent skill

Ghostty Use

by daymade in daymade/claude-code-skills

Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots.

MITAuto-check passedBusiness, Finance & HR

Install Ghostty Use

skills CLI
$ npx skills add daymade/claude-code-skills --skill ghostty-use -a claude-code

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

GitHub CLI
$ gh skill install daymade/claude-code-skills ghostty-use --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/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ghostty-use .claude/skills/ghostty-use && 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
ghostty-use
GitHub stars
1.4k
Token cost
~3.3k tokens
SKILL.md length
1,461 words
Files
12 (incl. scripts, references)
Skills in repo
103
Repo updated
First seen
Licence
MIT

At a glance

Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots.

  • Quitting the Mac for an update (保存终端会话 / 重启前备份终端)
  • SKILL.md covers Entry decision tree, Codex account switch, Quick start and Automatic change-only backups, plus 6 more sections
  • Runs Python scripts from its folder; calls python3, codex and osascript
  • After restart to reopen tabs with their original session IDs (恢复之前的窗口 / restore my ghostty tabs)

What it does

Ghostty Use is an agent skill from daymade/claude-code-skills. Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots. Use when quitting the Mac for an update (保存终端会话 / 重启前备份终端), after restart to reopen tabs with their original session IDs (恢复之前的窗口 / restore my ghostty tabs), or to audit which sessions survived. Not for resuming one conversation via its own --resume, terminal screenshots, or tmux state. Also use for periodic change-only snapshots (定期增量快照 / 没变化不记录). Also use before or after a manual Codex account switch (额度耗尽换号 /…

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts and reference files (for example `references/automatic-snapshots.md`, `references/codex-account-switch.md` and `references/restore_mechanics.md`).

It sits in Business, Finance & HR. It works with tmux. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

When your agent uses it

  • Quitting the Mac for an update (保存终端会话 / 重启前备份终端)
  • After restart to reopen tabs with their original session IDs (恢复之前的窗口 / restore my ghostty tabs)
  • Audit which sessions survived
  • Periodic change-only snapshots (定期增量快照 / 没变化不记录)

Example prompts

  • “/ghostty-use”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 91bed2b. 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

    Ships 7 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • codex
    • osascript

    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

Ghostty Use loads about 3.3k tokens when it runs, and up to ~9.9k if it reads all its reference files. Until then it costs about 136 tokens; SKILL.md has 1,461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.9k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 91bed2b, republished under its MIT licence (© daymade). 1,461 words, ~3,297 tokens.

Download SKILL.mdSave it as .claude/skills/ghostty-use/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
ghostty-use
description
Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots. Use when quitting the Mac for an update (保存终端会话 / 重启前备份终端), after restart to reopen tabs with their original session IDs (恢复之前的窗口 / restore my ghostty tabs), or to audit which sessions survived. Not for resuming one conversation via its own --resume, terminal screenshots, or tmux state. Also use for periodic change-only snapshots (定期增量快照 / 没变化不记录). Also use before or after a manual Codex account switch (额度耗尽换号 / 换号后恢复全部 Codex).

ghostty-use

Capture identifiable Claude Code and Codex terminal sessions before a reboot and reopen recorded IDs afterwards. Manual snapshots grade liveness; automatic backups store recovery metadata with explicit partial coverage and unknown liveness.

Ghostty on macOS has no session-restoration CLI or AppleScript tab dictionary (verified on Ghostty 1.3.1, 2026-10-04), so this skill walks a practical loop around that limit: manual ps inventory → liveness-graded snapshot → keystroke-paste restore → automatic reconciliation that makes every paste failure visible.

Entry decision tree

You just said / wantRun
Quitting for an update / reboot ("重启前保存会话")snapshot
Periodic backup, save only changes ("定期增量快照")Read automatic-snapshots.md, then ghostty_watch.py install --apply
Rebooted, want tabs back ("恢复之前的窗口")Use a suitable snapshot; if absent or outdated, reconstruct, then restore --all on the selected manifest
"Was anything lost?" / suspicion after restorecheck
One specific session to bring backrestore --only <id-prefix>
Codex quota running out; manually switching account, keeping all Codex workRead codex-account-switch.md; switch-prepare → manual exit/login → switch-restore

Codex account switch

Preserve all Ghostty Codex sessions before the user manually switches ChatGPT accounts, then reopen the original session IDs in one batch. Exclude Claude Code. Read codex-account-switch.md before this route. Use scripts/ghostty_session.py switch-prepare and switch-restore; the bundled scripts/ghostty_switch.py owns fixed-manifest selection, account/process checks, duplicate-safe retries and separate authentication reporting.

bash
python3 <skill-dir>/scripts/ghostty_session.py switch-prepare
# User: finish work, exit the saved Codex TUIs and manually switch account.
python3 <skill-dir>/scripts/ghostty_session.py switch-restore

Default to tabs in one window; use --layout windows only when independent windows are requested. Keep the printed fixed manifest through the handoff. Treat unresolved capture, unchanged account or still-running old processes as an incomplete handoff. Never terminate processes or switch credentials through this route. Ask for a bounded Ghostty keyboard/mouse handoff before actual opening; --dry-run and --check remain read-only. Distinguish reopened IDs from new-account requests that worked: the script reports authentication as not_checked and sends no test prompt.

Quick start

bash
# Before quitting (from any directory):
python3 <skill-dir>/scripts/ghostty_session.py snapshot

# After restart (from any directory; needs Accessibility permission for keystrokes):
python3 <skill-dir>/scripts/ghostty_session.py restore        # manual: active only; automatic: full recorded set
python3 <skill-dir>/scripts/ghostty_session.py restore --all  # include waiting/quota/dead/stale/unknown records

The snapshot lands in ~/.ghostty-session/snapshots/ (home-relative, survives reboot). The report accounts for every live TUI: captured sessions plus an unresolved section for fresh tabs that have no transcript yet — a session count lower than the tab count is explained there, not silently lost. restore skips already-live IDs by default. It finishes with a bounded auto-check that prints N/M present, a manual reopen command and a retry command containing only missing IDs. Read that result before declaring success; per-tab SENT (unverified) is a paste acknowledgement, not proof that a session reopened. Re-running the same manifest opens only the IDs still missing. --dry-run prints commands without GUI actions.

Automatic change-only backups

Read automatic-snapshots.md before installing or operating scripts/ghostty_watch.py. It saves only changed restore state and keeps all prior versions. Unchanged rounds write no snapshot or routine log. Automatic manifests cover Ghostty process descendants without transcript reads; their liveness is explicitly unknown and restore selects the whole recorded set. UUID-less TUIs remain unresolved in automatic manifests — the watcher's bounded scan deliberately reads no transcripts; manual snapshot/check/restore resolve them (see the anchor bullet below). Partial observations preserve prior missing IDs conservatively. The watcher never opens apps or tabs. Manual snapshots keep their active-only restore default.

No suitable snapshot: reconstruct the recovery manifest

For Codex identity and indexed recovery, use the maintained daymade-claude-code:read-codex-history dependency. Resolve that Skill's directory from the current host; install its daymade-claude-code plugin through the host's ordinary marketplace flow when authorized and absent. The script discovers a source checkout or a separately installed sibling read-codex-history; other layouts use --history-reader <reader-skill-dir> or GHOSTTY_CODEX_HISTORY_READER. Missing reader or state index fails explicitly; do not replace it with a rollout corpus scan.

bash
# Review candidates without writing state or opening tabs:
python3 <skill-dir>/scripts/ghostty_session.py reconstruct \
  --history-reader <reader-skill-dir> --recent-hours 72 --limit 100 --dry-run

# Build one chosen set in a NEW file; --only accepts unambiguous ID prefixes:
python3 <skill-dir>/scripts/ghostty_session.py reconstruct \
  --history-reader <reader-skill-dir> --since <YYYY-MM-DD> \
  --only <id-prefix-1> <id-prefix-2> --out <recovery-manifest.json>

# Restore the full selected set in one invocation, including waiting/quota rows:
python3 <skill-dir>/scripts/ghostty_session.py restore \
  --snapshot <recovery-manifest.json> --all

Reconstruction merges the optional --snapshot (otherwise latest, if present) with bounded recent indexed Codex candidates. It verifies internal rollout identity using the owning reader and marks each row past-snapshot or indexed-terminal-candidate. Terminal evidence is source=cli or originator=codex-tui; actual TUIs can report source=vscode. --terminal-source and --terminal-originator customize those accepted metadata values. Subagents are excluded by the owning inventory's metadata, not by underscores in filenames. --codex-home selects a nondefault Codex store.

Past membership proves only that a session appeared in that snapshot. Indexed terminal candidates prove terminal origin, not that the tab was live at shutdown. Review timestamps/titles and select the intended set before restore. --limit is a hard cap on indexed candidates inspected; widen discovery bounds only when needed. No snapshot means Claude membership remains unknown; reconstruction does not discover Claude sessions. Preserve explicit Claude records from a known snapshot rather than claiming an exhaustive recovery.

The new manifest never changes snapshots/latest.json and refuses to overwrite an existing output. Exit 0 means the selected evidence was verified; exit 1 means the manifest lists rejected candidates requiring attention; exit 2 means invalid input or unavailable evidence. Dry-run output is JSON for inspection.

Show full SKILL.md (708 more words)Show less

What manual snapshot records per session

  • Anchor: the session UUID from the process command line when present (never match on process names — argv[0] flips between bare claude and /usr/local/bin/claude, and name matching produced two false "all sessions gone" reports on 2026-10-04). Fresh TUIs carry no UUID on argv (only resume/fork writes one), so they are anchored from transcript storage instead: the session file born at or after the process started, in the project bucket of the same cwd, internal identity verified (2026-10-07: 11 of 25 live sessions were fresh TUIs, invisible to argv-only matching). When several fresh TUIs share one bucket, transcripts are assigned disjointly — one file per TUI; an undecidable race (equidistant claims) refuses to the unresolved section rather than guessing. Live TUIs matching neither way are printed as unresolved rows in the snapshot report — visible, never silently dropped.
  • Liveness: last real interaction time read from the content of the session file — not the file mtime (idle TUIs keep touching files; on 2026-10-04 an "active this afternoon" read was contradicted by in-file timestamps showing death at 03:21).
  • Channel health: dead-channel when a Claude transcript's tail carries a structured isApiErrorMessage with "Login expired" — restoring such a tab reopens history but the session stops at /login; the snapshot marks it so you can skip it. Prose inside a conversation that merely discusses an error never counts (a healthy session that once talked about "Login expired" was misclassified before this rule).
  • Profile: parsed from --settings .../settings/<name>.json when present, else direct.

Restore mechanics and limits

  • Reopen = activate Ghostty → Cmd+T → clipboard-paste the reopen command → Return, one tab per missing session, followed by mandatory auto-reconciliation. Keystroke paste is timing-sensitive: an interruption between Cmd+T and the paste leaves an empty tab whose command was silently lost (measured 2026-10-04). The auto-check exists to make that visible; never skip it, and never declare success from paste return codes alone.
  • Before any paste, tell the user to leave keyboard and mouse untouched through reconciliation. The script repeats this notice before its first GUI action.
  • Requires Accessibility permission for osascript keystrokes (System Events). If the current host denies Ghostty UI automation, do not switch channels to bypass it: prepare the selected manifest and exact user-run restore command, then use read-only check --snapshot <manifest> --strict after the user runs it.
  • Window grouping is not restorable — Ghostty's macOS accessibility surface exposes no tab→window mapping. All tabs reopen into one window; reorder manually if needed.
  • Rollout files that codex itself cannot find anymore print no-artifact; restoring them replays the same codex resume <id> and stays a best effort.

Profile environment mapping (optional)

If your Claude profiles inject config via environment (e.g. CLAUDE_CONFIG_DIR), record prefixes in ~/.ghostty-session/profile-env.json so restored tabs boot the same profile context:

json
{"research": "CLAUDE_CONFIG_DIR=~/.claude-profiles/research", "family": "HTTP_PROXY=http://127.0.0.1:7890"}

Without it, restores replay captured settings, profile and permission/model flags; process environment beyond argv remains unknown. The mapping is user-local data outside the skill bundle; no default mapping ships.

Troubleshooting

SymptomCause / fix
restore reports STILL MISSINGrun the printed missing-only retry, or the exact reopen command by hand in a new tab
no-artifact on a Codex sessionthe verified indexed session has no usable rollout; resume remains best-effort
unknown Codex livenessreader/index unavailable or identity ambiguous; resolve the dependency/store instead of choosing the first filename match
dead-channel sessions restored anywayexpected: history reopens, session stops at /login; re-auth or switch provider
check says present but tab looks emptyanother live process already claimed that session id (e.g. resumed in another tab)
osascript refuses keystrokesgrant Accessibility (System Events) permission; verify with osascript -e 'tell application "System Events" to get UI elements enabled'
a brand-new tab is missing from the session lista fresh TUI has no argv UUID and its transcript file appears with its first message; until then it shows under unresolved live TUIs. If the first message came >20 minutes after the tab opened, the birth window has passed and the tab stays unresolved by design

Deeper details

  • references/session_liveness.md — storage layouts (Claude projects / Codex sessions), transcript structures, resume-fork naming, liveness rules and the misclassification cases behind them. Read when a liveness result looks wrong or layouts changed after an app update.
  • references/restore_mechanics.md — why Ghostty offers no CLI/AX restore path, the keystroke-paste protocol, reconciliation design, and the window-grouping boundary. Read before modifying the restore path.

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

Files

SKILL.md and 11 other files (scripts, references) in ghostty-use of daymade/claude-code-skills.

  • SKILL.md
  • references/automatic-snapshots.md
  • references/codex-account-switch.md
  • references/restore_mechanics.md
  • references/session_liveness.md
  • scripts/ghostty_session.py
  • scripts/ghostty_storage.py
  • scripts/ghostty_switch.py
  • scripts/ghostty_watch.py
  • scripts/test_ghostty_session.py
  • scripts/test_ghostty_switch.py
  • scripts/test_ghostty_watch.py

Open the folder on GitHubat commit 91bed2b

Compare with similar skills

Ghostty Use 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.

Ghostty Use compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ghostty Use this skilldaymade/claude-code-skills1.4k—~3.3kAutomated safety check: PassMIT
Workeryangyuan-zhen/PolyWeather3151 repos~1.4kAutomated safety check: PassAGPL-3.0
Inbox Writeyohey-w/multi-agent-shogun1.4k—~186Automated safety check: PassMIT
Shogun Agent Statusyohey-w/multi-agent-shogun1.4k—~310Automated safety check: PassMIT
Agent Manager Skilldavila7/claude-code-templates32k8 repos~264Automated safety check: PassMIT
Codex Plugin QAcode-yeongyu/oh-my-openagent70k1 repos~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Worker

    yangyuan-zhen/PolyWeather

    [OMX] Team worker protocol (ACK, mailbox, task lifecycle) for tmux-based OMX teams

    315 GitHub starsUsed in 1 repo~1.4k tokens
    Productivity & AutomationAuto-check passed
  • Inbox Write

    yohey-w/multi-agent-shogun

    別エージェントのinboxにメッセージを送信する。agent-to-agent通信の唯一の手段. An agent skill from yohey-w/multi-agent-shogun.

    1.4k GitHub stars~186 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Shogun Agent Status

    yohey-w/multi-agent-shogun

    全エージェント(家老・足軽1-7・軍師)の稼働状態を一覧表示するスキル。tmux pane状態(稼働中/待機中/不在)とタスクYAML状態(taskid, status)と未読inbox数を統合表示。「稼働確認」「エージェント状態」「布陣確認」「agent status」で起動。

    1.4k GitHub stars~310 tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Agent Manager Skill

    davila7/claude-code-templates

    Manage multiple local CLI agents via tmux sessions (start/stop/monitor/assign) with cron-friendly scheduling.

    32k GitHub starsUsed in 8 repos~264 tokens
    Productivity & AutomationAuto-check passed
  • Codex Plugin QA

    code-yeongyu/oh-my-openagent

    Tests the omo Codex plugin in an isolated CODEX_HOME with a local mock model, proving hooks fired through app-server notifications without touching ~/.codex.

    70k GitHub starsUsed in 1 repo~1.9k tokens
    Testing & QAAuto-check passed
  • Tmux

    openclaw/openclaw

    Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.

    392k GitHub starsUsed in 2 repos~640 tokens
    Auto-check passed

More from daymade/claude-code-skills

All 103 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.4k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Bigdata Skill

    daymade/claude-code-skills

    Pulls Bigdata.com (RavenPack) financial and news data via the official bigdata-client SDK and /v1/ REST endpoints — structured financials, prices, analyst estimates, entity-sentiment series…

    1.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Ghostty Use

What does Ghostty Use do?

Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots. Ghostty Use is an agent skill from daymade/claude-code-skills. Snapshots, restores and reconciles Claude Code / Codex sessions inside Ghostty tabs across reboots.

When should I use Ghostty Use?

Ghostty Use fits situations like: quitting the Mac for an update (保存终端会话 / 重启前备份终端); after restart to reopen tabs with their original session IDs (恢复之前的窗口 / restore my ghostty tabs); audit which sessions survived; periodic change-only snapshots (定期增量快照 / 没变化不记录).

How do I install Ghostty Use in Claude Code?

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

How do I install Ghostty Use in Codex?

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

Can I use Ghostty Use 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 daymade/claude-code-skills --skill ghostty-use -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ghostty-use, .gemini/skills/ghostty-use, .github/skills/ghostty-use and .opencode/skills/ghostty-use in your project.

What does Ghostty Use need to run?

Going by SKILL.md and its folder, Ghostty Use needs Python for the scripts in its folder and the command-line tools its instructions call (python3, codex and osascript). Our summary lists: Python 3.

Does Ghostty Use 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 Ghostty Use 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Ghostty Use use?

Ghostty Use 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 Ghostty Use use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.6k tokens, read only when the agent opens those files.

What are the alternatives to Ghostty Use?

Skills that share tags, products or a category with Ghostty Use: Worker (yangyuan-zhen/PolyWeather, 315 stars), Inbox Write (yohey-w/multi-agent-shogun, 1.4k stars), Shogun Agent Status (yohey-w/multi-agent-shogun, 1.4k stars) and Agent Manager Skill (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ghostty Use?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,444 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 8, 2026.

Source: daymade/claude-code-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.